@illinois-grad/grad-vue 3.0.5 → 3.0.6
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 +1 -1
- package/dist/components/GTreeMenu.vue.d.ts +7 -3
- package/dist/{grad-vue-DuwqGzJU.js → grad-vue-CAmKhHhp.js} +836 -812
- package/dist/grad-vue-CAmKhHhp.js.map +1 -0
- package/dist/grad-vue-elements.css +28 -28
- package/dist/grad-vue-elements.js +52 -28
- package/dist/grad-vue-elements.js.map +1 -1
- package/dist/grad-vue.js +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
- package/dist/grad-vue-DuwqGzJU.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
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,
|
|
2
|
-
import { createEventHook as
|
|
3
|
-
import { createFocusTrap as
|
|
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, onUnmounted as C, onUpdated as w, openBlock as T, provide as E, reactive as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, shallowReactive as M, shallowRef as N, toDisplayString as P, toRaw as F, toRef as I, toValue as L, unref as R, useAttrs as z, useId as B, useModel as V, useSlots as H, useTemplateRef as U, vModelCheckbox as W, vShow as G, watch as K, watchEffect as q, withCtx as J, withDirectives as Y, withModifiers as X } from "vue";
|
|
2
|
+
import { createEventHook as ee, toArray as Z, tryOnScopeDispose as te, unrefElement as ne, useClipboard as re, useDebounceFn as ie, useFocusWithin as ae, useIntersectionObserver as oe, useMediaQuery as se, useMutationObserver as ce, useResizeObserver as le, useSessionStorage as ue } from "@vueuse/core";
|
|
3
|
+
import { createFocusTrap as de } from "focus-trap";
|
|
4
4
|
//#region src/compose/useCustomElementAttrs.ts
|
|
5
|
-
function
|
|
5
|
+
function fe() {
|
|
6
6
|
return globalThis.__GRAD_VUE_IS_WEB_COMPONENTS_BUILD__ === !0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
let t =
|
|
8
|
+
function pe(e = {}) {
|
|
9
|
+
let t = z(), n = globalThis.__GRAD_VUE_IS_WEB_COMPONENTS_BUILD__ === !0, i = e.omitInCustomElement ?? [];
|
|
10
10
|
return {
|
|
11
11
|
attrs: t,
|
|
12
12
|
isCustomElement: n,
|
|
@@ -20,7 +20,7 @@ function fe(e = {}) {
|
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/components/GButton.vue?vue&type=script&setup=true&lang.ts
|
|
23
|
-
var
|
|
23
|
+
var me = { class: "g-btn--icon" }, he = { class: "g-btn--label" }, Q = /* @__PURE__ */ u({
|
|
24
24
|
inheritAttrs: !1,
|
|
25
25
|
__name: "GButton",
|
|
26
26
|
props: {
|
|
@@ -51,7 +51,7 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
51
51
|
"mouseleave"
|
|
52
52
|
],
|
|
53
53
|
setup(t) {
|
|
54
|
-
let n = t, a =
|
|
54
|
+
let n = t, a = H(), { forwardedAttrs: c } = pe({ omitInCustomElement: ["id"] }), l = r(() => [
|
|
55
55
|
"g-btn",
|
|
56
56
|
`g-btn--${n.size}`,
|
|
57
57
|
`g-btn--${n.theme}`,
|
|
@@ -65,7 +65,7 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
65
65
|
"g-btn-has-icon-svg": !!a.icon
|
|
66
66
|
}
|
|
67
67
|
]);
|
|
68
|
-
return (r, u) => (
|
|
68
|
+
return (r, u) => (T(), i(j(n.component ? n.component : "button"), h(R(c), {
|
|
69
69
|
to: n.to,
|
|
70
70
|
class: l.value,
|
|
71
71
|
type: n.to ? void 0 : n.type,
|
|
@@ -79,11 +79,11 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
79
79
|
onMouseenter: u[7] ||= (e) => r.$emit("mouseenter", e),
|
|
80
80
|
onMouseleave: u[8] ||= (e) => r.$emit("mouseleave", e)
|
|
81
81
|
}), {
|
|
82
|
-
default:
|
|
82
|
+
default: J(() => [t.icon || a.icon ? (T(), o(e, { key: 0 }, [s("span", me, [a.icon ? A(r.$slots, "icon", { key: 0 }) : (T(), o("span", {
|
|
83
83
|
key: 1,
|
|
84
84
|
class: _(t.icon + " g-btn--icon-span"),
|
|
85
85
|
"aria-hidden": "true"
|
|
86
|
-
}, null, 2))]), s("span",
|
|
86
|
+
}, null, 2))]), s("span", he, [A(r.$slots, "default")])], 64)) : A(r.$slots, "default", { key: 1 })]),
|
|
87
87
|
_: 3
|
|
88
88
|
}, 16, [
|
|
89
89
|
"to",
|
|
@@ -91,10 +91,10 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
91
91
|
"type"
|
|
92
92
|
]));
|
|
93
93
|
}
|
|
94
|
-
}),
|
|
94
|
+
}), ge = ["id"], _e = { class: "g-tree-menu__divider" }, ve = {
|
|
95
95
|
key: 0,
|
|
96
96
|
class: "g-tree-menu__expand-all-wrapper"
|
|
97
|
-
},
|
|
97
|
+
}, ye = { class: "g-tree-menu__content" }, be = /* @__PURE__ */ u({
|
|
98
98
|
__name: "GTreeMenu",
|
|
99
99
|
props: {
|
|
100
100
|
heading: {},
|
|
@@ -107,33 +107,54 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
setup(e) {
|
|
110
|
-
let t = e, n =
|
|
111
|
-
|
|
112
|
-
let i =
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
let t = e, n = B();
|
|
111
|
+
E("g-tree-menu-list-type", t.listType), E("g-tree-menu-expanded-storage", t.storageKey ? ue(t.storageKey, {}) : null);
|
|
112
|
+
let i = U("nav-el"), l = t.storageKey ? ue(`${t.storageKey}:scroll`, 0, { writeDefaults: !1 }) : null;
|
|
113
|
+
function u(e) {
|
|
114
|
+
let t = e.parentElement;
|
|
115
|
+
for (; t && t !== document.documentElement && t !== document.body;) {
|
|
116
|
+
let e = window.getComputedStyle(t);
|
|
117
|
+
if (e.overflowY === "auto" || e.overflowY === "scroll") return t;
|
|
118
|
+
t = t.parentElement;
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
let d = null;
|
|
123
|
+
function f() {
|
|
124
|
+
l && d && (l.value = d.scrollTop);
|
|
125
|
+
}
|
|
126
|
+
S(() => {
|
|
127
|
+
!l || !i.value || (d = u(i.value), d && (l.value > 0 && g(() => {
|
|
128
|
+
d && (d.scrollTop = l.value);
|
|
129
|
+
}), d.addEventListener("scroll", f)));
|
|
130
|
+
}), C(() => {
|
|
131
|
+
d &&= (d.removeEventListener("scroll", f), null);
|
|
132
|
+
});
|
|
133
|
+
let p = D(/* @__PURE__ */ new Map());
|
|
134
|
+
E("g-tree-menu-expandable-items", p);
|
|
135
|
+
let m = O({
|
|
115
136
|
expanded: !0,
|
|
116
137
|
version: 0
|
|
117
138
|
});
|
|
118
|
-
|
|
119
|
-
let
|
|
120
|
-
if (
|
|
121
|
-
for (let e of
|
|
139
|
+
E("g-tree-menu-expand-all-signal", m);
|
|
140
|
+
let v = r(() => {
|
|
141
|
+
if (p.size === 0) return !1;
|
|
142
|
+
for (let e of p.values()) if (!e) return !1;
|
|
122
143
|
return !0;
|
|
123
144
|
});
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
expanded: !
|
|
127
|
-
version:
|
|
145
|
+
function y() {
|
|
146
|
+
m.value = {
|
|
147
|
+
expanded: !v.value,
|
|
148
|
+
version: m.value.version + 1
|
|
128
149
|
};
|
|
129
150
|
}
|
|
130
|
-
function
|
|
151
|
+
function b(e) {
|
|
131
152
|
return e.querySelector("a, button, [tabindex='0']") || e;
|
|
132
153
|
}
|
|
133
|
-
function
|
|
154
|
+
function x(e) {
|
|
134
155
|
return Array.from(e.querySelectorAll("[data-tree-primary]"));
|
|
135
156
|
}
|
|
136
|
-
function
|
|
157
|
+
function w(e) {
|
|
137
158
|
let t = e.currentTarget, n = document.activeElement;
|
|
138
159
|
if (!t.contains(n) || ![
|
|
139
160
|
"ArrowUp",
|
|
@@ -143,16 +164,16 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
143
164
|
"Home",
|
|
144
165
|
"End"
|
|
145
166
|
].includes(e.key)) return;
|
|
146
|
-
let r = n.closest(".g-tree-menu__item"), i = r?.querySelector("[data-tree-primary]") ?? null, a =
|
|
167
|
+
let r = n.closest(".g-tree-menu__item"), i = r?.querySelector("[data-tree-primary]") ?? null, a = x(t), o = i ? a.indexOf(i) : -1;
|
|
147
168
|
switch (e.key) {
|
|
148
169
|
case "ArrowDown": {
|
|
149
170
|
let e = a[o + 1];
|
|
150
|
-
e &&
|
|
171
|
+
e && b(e).focus();
|
|
151
172
|
break;
|
|
152
173
|
}
|
|
153
174
|
case "ArrowUp": {
|
|
154
175
|
let e = a[o - 1];
|
|
155
|
-
e &&
|
|
176
|
+
e && b(e).focus();
|
|
156
177
|
break;
|
|
157
178
|
}
|
|
158
179
|
case "ArrowRight":
|
|
@@ -162,83 +183,86 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
162
183
|
e && e.click();
|
|
163
184
|
} else {
|
|
164
185
|
let e = a[o + 1];
|
|
165
|
-
e &&
|
|
186
|
+
e && b(e).focus();
|
|
166
187
|
}
|
|
167
188
|
break;
|
|
168
189
|
case "ArrowLeft":
|
|
169
190
|
if (!r) break;
|
|
170
191
|
if (r.querySelector("[aria-expanded='true']") !== null) {
|
|
171
192
|
let e = r.querySelector(".g-tree-menu__toggle-btn");
|
|
172
|
-
e && e.click(), i && g(() =>
|
|
193
|
+
e && e.click(), i && g(() => b(i).focus());
|
|
173
194
|
} else {
|
|
174
195
|
let e = r.parentElement?.closest(".g-tree-menu__item");
|
|
175
196
|
if (e) {
|
|
176
197
|
let t = e.querySelector("[data-tree-primary]");
|
|
177
|
-
t &&
|
|
198
|
+
t && b(t).focus();
|
|
178
199
|
}
|
|
179
200
|
}
|
|
180
201
|
break;
|
|
181
202
|
case "Home":
|
|
182
|
-
a.length > 0 &&
|
|
203
|
+
a.length > 0 && b(a[0]).focus();
|
|
183
204
|
break;
|
|
184
205
|
case "End":
|
|
185
|
-
a.length > 0 &&
|
|
206
|
+
a.length > 0 && b(a[a.length - 1]).focus();
|
|
186
207
|
break;
|
|
187
208
|
}
|
|
188
209
|
e.preventDefault();
|
|
189
210
|
}
|
|
190
|
-
return (r, i) => (
|
|
191
|
-
"
|
|
211
|
+
return (r, i) => (T(), o("nav", h({
|
|
212
|
+
ref: "nav-el",
|
|
213
|
+
class: ["g-tree-menu", `g-tree-menu--${t.theme}`]
|
|
214
|
+
}, {
|
|
215
|
+
"aria-labelledby": e.heading ? R(n) : void 0,
|
|
192
216
|
"aria-label": e.heading ? void 0 : "Tree Menu"
|
|
193
|
-
}, { onKeydown:
|
|
194
|
-
e.heading ? (
|
|
217
|
+
}, { onKeydown: w }), [
|
|
218
|
+
e.heading ? (T(), o("h2", {
|
|
195
219
|
key: 0,
|
|
196
|
-
id:
|
|
220
|
+
id: R(n),
|
|
197
221
|
class: "g-tree-menu__title"
|
|
198
|
-
},
|
|
199
|
-
s("div",
|
|
222
|
+
}, P(e.heading), 9, ge)) : a("", !0),
|
|
223
|
+
s("div", _e, [i[1] ||= s("div", { class: "g-tree-menu__divider-line" }, null, -1), e.showExpandAll ? (T(), o("div", ve, [s("button", {
|
|
200
224
|
class: "g-tree-menu__expand-all-btn",
|
|
201
|
-
onClick:
|
|
202
|
-
}, [(
|
|
203
|
-
class: _(["g-tree-menu__expand-all-icon", { "g-tree-menu__expand-all-icon--collapse":
|
|
204
|
-
role: "none
|
|
225
|
+
onClick: y
|
|
226
|
+
}, [(T(), o("svg", {
|
|
227
|
+
class: _(["g-tree-menu__expand-all-icon", { "g-tree-menu__expand-all-icon--collapse": v.value }]),
|
|
228
|
+
role: "none",
|
|
205
229
|
viewBox: "0 0 24 24",
|
|
206
230
|
fill: "none",
|
|
207
231
|
stroke: "currentColor",
|
|
208
232
|
"stroke-width": "2.5",
|
|
209
233
|
"stroke-linecap": "round",
|
|
210
234
|
"stroke-linejoin": "round"
|
|
211
|
-
}, [...i[0] ||= [s("polyline", { points: "7 8 12 13 17 8" }, null, -1), s("polyline", { points: "7 13 12 18 17 13" }, null, -1)]], 2)), c(" " +
|
|
212
|
-
s("div",
|
|
235
|
+
}, [...i[0] ||= [s("polyline", { points: "7 8 12 13 17 8" }, null, -1), s("polyline", { points: "7 13 12 18 17 13" }, null, -1)]], 2)), c(" " + P(v.value ? "Collapse all" : "Expand all"), 1)])])) : a("", !0)]),
|
|
236
|
+
s("div", ye, [A(r.$slots, "default")])
|
|
213
237
|
], 16));
|
|
214
238
|
}
|
|
215
|
-
}),
|
|
239
|
+
}), xe = /* @__PURE__ */ u({
|
|
216
240
|
name: "GTreeMenuList",
|
|
217
241
|
props: { listType: { default: void 0 } },
|
|
218
242
|
setup(e) {
|
|
219
|
-
let t = e, n = p("g-tree-menu-list-type", "ul"), a = r(() => t.listType ?? n ?? "ul"), o =
|
|
243
|
+
let t = e, n = p("g-tree-menu-list-type", "ul"), a = r(() => t.listType ?? n ?? "ul"), o = fe(), s = d();
|
|
220
244
|
return S(() => {
|
|
221
245
|
if (!o) return;
|
|
222
246
|
let e = s?.ce;
|
|
223
247
|
e && e.setAttribute("data-list-type", a.value);
|
|
224
|
-
}), (e, t) => (
|
|
225
|
-
role:
|
|
248
|
+
}), (e, t) => (T(), i(j(R(o) ? "div" : a.value), {
|
|
249
|
+
role: R(o) ? "list" : void 0,
|
|
226
250
|
class: "g-tree-menu__list"
|
|
227
251
|
}, {
|
|
228
|
-
default:
|
|
252
|
+
default: J(() => [A(e.$slots, "default")]),
|
|
229
253
|
_: 3
|
|
230
254
|
}, 8, ["role"]));
|
|
231
255
|
}
|
|
232
|
-
}),
|
|
256
|
+
}), Se = {
|
|
233
257
|
key: 0,
|
|
234
258
|
class: "g-tree-menu__row"
|
|
235
|
-
},
|
|
259
|
+
}, Ce = { class: "g-tree-menu__row-content-text" }, we = {
|
|
236
260
|
key: 1,
|
|
237
261
|
class: "g-tree-menu__row g-tree-menu__row--leaf"
|
|
238
|
-
},
|
|
262
|
+
}, Te = {
|
|
239
263
|
class: "g-tree-menu__row-content",
|
|
240
264
|
"data-tree-primary": ""
|
|
241
|
-
},
|
|
265
|
+
}, Ee = /* @__PURE__ */ u({
|
|
242
266
|
name: "GTreeMenuItem",
|
|
243
267
|
inheritAttrs: !1,
|
|
244
268
|
props: {
|
|
@@ -250,7 +274,7 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
250
274
|
},
|
|
251
275
|
emits: ["expand", "collapse"],
|
|
252
276
|
setup(e, { emit: t }) {
|
|
253
|
-
let n = e, c = t, l =
|
|
277
|
+
let n = e, c = t, l = H(), u = d(), f = B(), m = (u?.ce)?._slots?.children?.length > 0, g = r(() => !!l.children || m), v = p("g-tree-menu-expanded-storage", null);
|
|
254
278
|
function y() {
|
|
255
279
|
if (v && n.label !== void 0) {
|
|
256
280
|
if (v.value[n.label] === !0) return !0;
|
|
@@ -258,62 +282,62 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
258
282
|
}
|
|
259
283
|
return n.expanded;
|
|
260
284
|
}
|
|
261
|
-
let b =
|
|
262
|
-
|
|
285
|
+
let b = O(y());
|
|
286
|
+
K(() => n.expanded, (e) => {
|
|
263
287
|
v && n.label !== void 0 || (b.value = e);
|
|
264
|
-
}),
|
|
288
|
+
}), K(b, (e) => {
|
|
265
289
|
v && n.label !== void 0 && (e ? v.value[n.label] = !0 : delete v.value[n.label]), E();
|
|
266
290
|
});
|
|
267
|
-
let
|
|
291
|
+
let C = O(null);
|
|
268
292
|
function E() {
|
|
269
|
-
if (!g.value || !
|
|
270
|
-
let e =
|
|
293
|
+
if (!g.value || !C.value) return;
|
|
294
|
+
let e = C.value.querySelector("a, button");
|
|
271
295
|
e ? (e.setAttribute("aria-controls", f + "-children"), e.setAttribute("aria-expanded", b.value ? "true" : "false")) : console.warn("No focusable element found for GTreeMenuItem with label:", n.label, "Every item must at least have a plain button to properly work for accessibility.");
|
|
272
296
|
}
|
|
273
|
-
S(E),
|
|
274
|
-
function
|
|
297
|
+
S(E), w(E);
|
|
298
|
+
function D() {
|
|
275
299
|
b.value = !b.value, b.value ? c("expand") : c("collapse");
|
|
276
300
|
}
|
|
277
|
-
let
|
|
301
|
+
let k = Symbol(), M = p("g-tree-menu-expandable-items", null), N = p("g-tree-menu-expand-all-signal", null), P = O(0);
|
|
278
302
|
function F() {
|
|
279
|
-
M && g.value && M.set(
|
|
303
|
+
M && g.value && M.set(k, b.value);
|
|
280
304
|
}
|
|
281
305
|
function I() {
|
|
282
|
-
M?.delete(
|
|
306
|
+
M?.delete(k);
|
|
283
307
|
}
|
|
284
|
-
|
|
285
|
-
M && g.value && M.set(
|
|
286
|
-
}), N &&
|
|
308
|
+
K(b, (e) => {
|
|
309
|
+
M && g.value && M.set(k, e);
|
|
310
|
+
}), N && K(() => N.value.version, () => {
|
|
287
311
|
g.value && (b.value = N.value.expanded, P.value = N.value.version);
|
|
288
312
|
}), S(() => {
|
|
289
313
|
F(), N && g.value && N.value.version > P.value && N.value.expanded && (b.value = !0, P.value = N.value.version);
|
|
290
314
|
}), x(() => {
|
|
291
315
|
I();
|
|
292
316
|
});
|
|
293
|
-
function
|
|
294
|
-
e.target.closest("a") ||
|
|
317
|
+
function L(e) {
|
|
318
|
+
e.target.closest("a") || D();
|
|
295
319
|
}
|
|
296
|
-
function
|
|
297
|
-
(e.key === "Enter" || e.key === " ") && (
|
|
320
|
+
function V(e) {
|
|
321
|
+
(e.key === "Enter" || e.key === " ") && (D(), e.preventDefault());
|
|
298
322
|
}
|
|
299
|
-
let U =
|
|
323
|
+
let U = fe(), W = u?.ce;
|
|
300
324
|
S(() => {
|
|
301
325
|
U && W && W.setAttribute("role", "listitem");
|
|
302
326
|
});
|
|
303
|
-
let
|
|
304
|
-
if (!U) return
|
|
305
|
-
let { role: e, ...t } =
|
|
327
|
+
let G = z(), q = r(() => {
|
|
328
|
+
if (!U) return G;
|
|
329
|
+
let { role: e, ...t } = G;
|
|
306
330
|
return t;
|
|
307
331
|
});
|
|
308
|
-
return (e, t) => (
|
|
309
|
-
role:
|
|
332
|
+
return (e, t) => (T(), i(j(R(U) ? "div" : "li"), h(q.value, {
|
|
333
|
+
role: R(U) ? "presentation" : void 0,
|
|
310
334
|
class: "g-tree-menu__item",
|
|
311
335
|
"data-tree-expandable": g.value ? "true" : void 0
|
|
312
336
|
}), {
|
|
313
|
-
default:
|
|
337
|
+
default: J(() => [g.value ? (T(), o("div", Se, [s("div", {
|
|
314
338
|
class: "g-tree-menu__toggle-btn",
|
|
315
|
-
onClick:
|
|
316
|
-
}, [(
|
|
339
|
+
onClick: D
|
|
340
|
+
}, [(T(), o("svg", {
|
|
317
341
|
class: _(["g-tree-menu__chevron", { "g-tree-menu__chevron--expanded": b.value }]),
|
|
318
342
|
role: "none presentation",
|
|
319
343
|
viewBox: "0 0 24 24",
|
|
@@ -324,16 +348,16 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
324
348
|
"stroke-linejoin": "round"
|
|
325
349
|
}, [...t[0] ||= [s("polyline", { points: "9 18 15 12 9 6" }, null, -1)]], 2))]), s("span", {
|
|
326
350
|
ref_key: "contentRef",
|
|
327
|
-
ref:
|
|
351
|
+
ref: C,
|
|
328
352
|
class: "g-tree-menu__row-content",
|
|
329
353
|
"data-tree-primary": "",
|
|
330
|
-
onClick:
|
|
331
|
-
onKeydown:
|
|
332
|
-
}, [s("span",
|
|
354
|
+
onClick: L,
|
|
355
|
+
onKeydown: V
|
|
356
|
+
}, [s("span", Ce, [A(e.$slots, "default")])], 544)])) : (T(), o("div", we, [t[1] ||= s("span", { class: "g-tree-menu__spacer" }, null, -1), s("span", Te, [A(e.$slots, "default")])])), g.value && b.value ? (T(), i(xe, {
|
|
333
357
|
key: 2,
|
|
334
|
-
id:
|
|
358
|
+
id: R(f) + "-children"
|
|
335
359
|
}, {
|
|
336
|
-
default:
|
|
360
|
+
default: J(() => [A(e.$slots, "children")]),
|
|
337
361
|
_: 3
|
|
338
362
|
}, 8, ["id"])) : a("", !0)]),
|
|
339
363
|
_: 3
|
|
@@ -342,8 +366,8 @@ var pe = { class: "g-btn--icon" }, me = { class: "g-btn--label" }, Q = /* @__PUR
|
|
|
342
366
|
});
|
|
343
367
|
//#endregion
|
|
344
368
|
//#region src/compose/useForm.ts
|
|
345
|
-
function
|
|
346
|
-
let e =
|
|
369
|
+
function De() {
|
|
370
|
+
let e = M({}), t = O(!1), n = r(() => {
|
|
347
371
|
let t = {};
|
|
348
372
|
return Object.entries(e).forEach(([e, n]) => {
|
|
349
373
|
n && n.value && (t[e] = n.value.value);
|
|
@@ -384,18 +408,18 @@ function Ee() {
|
|
|
384
408
|
}
|
|
385
409
|
//#endregion
|
|
386
410
|
//#region src/compose/useWebComponentForm.ts
|
|
387
|
-
function
|
|
411
|
+
function Oe() {
|
|
388
412
|
let e = globalThis;
|
|
389
413
|
return e.__GRAD_VUE_WC_FORMS__ ||= /* @__PURE__ */ new Map(), e.__GRAD_VUE_WC_FORMS__;
|
|
390
414
|
}
|
|
391
|
-
function
|
|
392
|
-
let t =
|
|
393
|
-
return t.has(n) || t.set(n,
|
|
415
|
+
function ke(e = "default") {
|
|
416
|
+
let t = Oe(), n = e || "default";
|
|
417
|
+
return t.has(n) || t.set(n, De()), t.get(n);
|
|
394
418
|
}
|
|
395
419
|
//#endregion
|
|
396
420
|
//#region src/compose/useFormField.ts
|
|
397
421
|
function $(e) {
|
|
398
|
-
let t =
|
|
422
|
+
let t = z(), n = typeof t["form-key"] == "string" ? t["form-key"] : void 0, i = e.formKey ?? n ?? "default", a = p("form", null) ?? (fe() ? ke(i) : null), o = r(() => {
|
|
399
423
|
let t = [];
|
|
400
424
|
return e.errors && t.push(...e.errors.value.filter(Boolean)), t;
|
|
401
425
|
}), s = r(() => o.value.length > 0), c = e.name;
|
|
@@ -414,19 +438,19 @@ function $(e) {
|
|
|
414
438
|
}
|
|
415
439
|
//#endregion
|
|
416
440
|
//#region src/components/form/GFormErrorMessages.vue?vue&type=script&setup=true&lang.ts
|
|
417
|
-
var
|
|
441
|
+
var Ae = ["id"], je = /* @__PURE__ */ u({
|
|
418
442
|
__name: "GFormErrorMessages",
|
|
419
443
|
props: {
|
|
420
444
|
errors: {},
|
|
421
445
|
id: {}
|
|
422
446
|
},
|
|
423
447
|
setup(t) {
|
|
424
|
-
return (n, r) => t.errors.length > 0 ? (
|
|
448
|
+
return (n, r) => t.errors.length > 0 ? (T(), o("div", {
|
|
425
449
|
key: 0,
|
|
426
450
|
class: "g-form-error-messages",
|
|
427
451
|
id: t.id,
|
|
428
452
|
role: "alert"
|
|
429
|
-
}, [(
|
|
453
|
+
}, [(T(!0), o(e, null, k(t.errors, (e, t) => (T(), o("div", {
|
|
430
454
|
key: t,
|
|
431
455
|
class: "g-form-error-message"
|
|
432
456
|
}, [r[0] ||= s("svg", {
|
|
@@ -436,25 +460,25 @@ var ke = ["id"], Ae = /* @__PURE__ */ u({
|
|
|
436
460
|
}, [s("path", {
|
|
437
461
|
fill: "currentColor",
|
|
438
462
|
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"
|
|
439
|
-
})], -1), c(" " +
|
|
463
|
+
})], -1), c(" " + P(e), 1)]))), 128))], 8, Ae)) : a("", !0);
|
|
440
464
|
}
|
|
441
|
-
}),
|
|
465
|
+
}), Me = ["for"], Ne = {
|
|
442
466
|
key: 0,
|
|
443
467
|
class: "g-text-input-required",
|
|
444
468
|
"aria-hidden": "true"
|
|
445
|
-
},
|
|
469
|
+
}, Pe = ["id"], Fe = {
|
|
446
470
|
key: 0,
|
|
447
471
|
class: "g-text-input-prefix"
|
|
448
|
-
},
|
|
472
|
+
}, Ie = [
|
|
449
473
|
"value",
|
|
450
474
|
"placeholder",
|
|
451
475
|
"disabled",
|
|
452
476
|
"required",
|
|
453
477
|
"aria-invalid"
|
|
454
|
-
],
|
|
478
|
+
], Le = {
|
|
455
479
|
key: 1,
|
|
456
480
|
class: "g-text-input-suffix"
|
|
457
|
-
},
|
|
481
|
+
}, Re = /* @__PURE__ */ u({
|
|
458
482
|
inheritAttrs: !1,
|
|
459
483
|
__name: "GTextInput",
|
|
460
484
|
props: /* @__PURE__ */ m({
|
|
@@ -481,12 +505,12 @@ var ke = ["id"], Ae = /* @__PURE__ */ u({
|
|
|
481
505
|
}),
|
|
482
506
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
483
507
|
setup(e, { emit: t }) {
|
|
484
|
-
let n = e, i =
|
|
508
|
+
let n = e, i = V(e, "modelValue"), u = B(), { attrs: d, isCustomElement: f, forwardedAttrs: p } = pe({ omitInCustomElement: ["id"] }), m = r(() => f ? u : d.id || u), { displayErrors: g, hasErrors: v } = $({
|
|
485
509
|
name: n.name,
|
|
486
510
|
value: i,
|
|
487
|
-
errors:
|
|
511
|
+
errors: I(n, "errors"),
|
|
488
512
|
formKey: n.formKey
|
|
489
|
-
}), y = t, b =
|
|
513
|
+
}), y = t, b = O(i.value ?? ""), x = null;
|
|
490
514
|
function S(e) {
|
|
491
515
|
if (e !== i.value) {
|
|
492
516
|
let t = i.value;
|
|
@@ -501,7 +525,7 @@ var ke = ["id"], Ae = /* @__PURE__ */ u({
|
|
|
501
525
|
S(b.value), x = null;
|
|
502
526
|
}, n.debounce);
|
|
503
527
|
}
|
|
504
|
-
function
|
|
528
|
+
function w(e) {
|
|
505
529
|
x &&= (clearTimeout(x), null), S(e.target.value);
|
|
506
530
|
}
|
|
507
531
|
function E(e) {
|
|
@@ -510,69 +534,69 @@ var ke = ["id"], Ae = /* @__PURE__ */ u({
|
|
|
510
534
|
S(t);
|
|
511
535
|
}, 0);
|
|
512
536
|
}
|
|
513
|
-
function
|
|
537
|
+
function D(e) {
|
|
514
538
|
(e.key === "PageUp" || e.key === "PageDown") && (x &&= (clearTimeout(x), null), S(e.target.value)), e.key === "Enter" && S(e.target.value);
|
|
515
539
|
}
|
|
516
|
-
return (t, r) => (
|
|
517
|
-
n.label ? (
|
|
540
|
+
return (t, r) => (T(), o("div", { class: _(["g-text-input-wrap", { "g-text-input-has-error": R(v) }]) }, [
|
|
541
|
+
n.label ? (T(), o("label", {
|
|
518
542
|
key: 0,
|
|
519
543
|
for: m.value,
|
|
520
544
|
class: "g-text-input-label"
|
|
521
|
-
}, [c(
|
|
522
|
-
t.$slots.instructions || e.instructions ? (
|
|
545
|
+
}, [c(P(n.label), 1), n.required ? (T(), o("span", Ne, " *")) : a("", !0)], 8, Me)) : a("", !0),
|
|
546
|
+
t.$slots.instructions || e.instructions ? (T(), o("div", {
|
|
523
547
|
key: 1,
|
|
524
|
-
id: "instructions-" +
|
|
548
|
+
id: "instructions-" + R(u),
|
|
525
549
|
class: "g-text-input-instructions"
|
|
526
|
-
}, [
|
|
550
|
+
}, [A(t.$slots, "instructions", {}, () => [c(P(e.instructions), 1)])], 8, Pe)) : a("", !0),
|
|
527
551
|
s("div", { class: _([{ "g-text-input-field-wrapper": !0 }, `g-text-input-field-wrapper--${e.name || "nameless"}`]) }, [
|
|
528
|
-
n.prefix ? (
|
|
552
|
+
n.prefix ? (T(), o("span", Fe, P(n.prefix), 1)) : a("", !0),
|
|
529
553
|
s("input", h({
|
|
530
554
|
value: i.value,
|
|
531
555
|
placeholder: n.placeholder,
|
|
532
556
|
disabled: n.disabled,
|
|
533
557
|
required: n.required,
|
|
534
558
|
onInput: C,
|
|
535
|
-
onBlur:
|
|
559
|
+
onBlur: w,
|
|
536
560
|
onPaste: E,
|
|
537
|
-
onKeydown:
|
|
561
|
+
onKeydown: D,
|
|
538
562
|
type: "text",
|
|
539
563
|
class: "g-text-input"
|
|
540
564
|
}, {
|
|
541
|
-
...
|
|
565
|
+
...R(p),
|
|
542
566
|
id: m.value,
|
|
543
|
-
"aria-describedby": t.$slots.instructions || e.instructions ? "instructions-" +
|
|
544
|
-
"aria-errormessage":
|
|
545
|
-
}, { "aria-invalid":
|
|
546
|
-
n.suffix ? (
|
|
567
|
+
"aria-describedby": t.$slots.instructions || e.instructions ? "instructions-" + R(u) : void 0,
|
|
568
|
+
"aria-errormessage": R(v) ? "error-message-" + R(u) : void 0
|
|
569
|
+
}, { "aria-invalid": R(v) ? "true" : "false" }), null, 16, Ie),
|
|
570
|
+
n.suffix ? (T(), o("span", Le, P(n.suffix), 1)) : a("", !0)
|
|
547
571
|
], 2),
|
|
548
|
-
l(
|
|
549
|
-
errors:
|
|
550
|
-
id: "error-message-" +
|
|
572
|
+
l(je, {
|
|
573
|
+
errors: R(g),
|
|
574
|
+
id: "error-message-" + R(u)
|
|
551
575
|
}, null, 8, ["errors", "id"])
|
|
552
576
|
], 2));
|
|
553
577
|
}
|
|
554
|
-
}),
|
|
555
|
-
function
|
|
556
|
-
if (!(typeof document > "u")) if (
|
|
578
|
+
}), ze = 100, Be = 200, Ve = 102, He = O([]), Ue = O([]), We = O([]);
|
|
579
|
+
function Ge() {
|
|
580
|
+
if (!(typeof document > "u")) if (We.value.length > 0) {
|
|
557
581
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
558
582
|
document.body.classList.add("g-scroll-lock"), document.body.style.paddingRight = `${e}px`, document.body.style.setProperty("--g-scrollbar-width", `${e}px`);
|
|
559
583
|
} else document.body.style.paddingRight = "0", document.body.classList.remove("g-scroll-lock"), document.body.style.removeProperty("--g-scrollbar-width");
|
|
560
584
|
}
|
|
561
|
-
function
|
|
585
|
+
function Ke(e, t = !1, n = !1) {
|
|
562
586
|
if (typeof document > "u") return {};
|
|
563
|
-
let i = t ?
|
|
587
|
+
let i = t ? Ue : He;
|
|
564
588
|
function a() {
|
|
565
|
-
i.value.push(e), n && !
|
|
589
|
+
i.value.push(e), n && !We.value.includes(e) && (We.value.push(e), Ge());
|
|
566
590
|
}
|
|
567
591
|
function o() {
|
|
568
592
|
let t = i.value.lastIndexOf(e);
|
|
569
593
|
t !== -1 && i.value.splice(t, 1);
|
|
570
|
-
let n =
|
|
571
|
-
n !== -1 && (
|
|
594
|
+
let n = We.value.lastIndexOf(e);
|
|
595
|
+
n !== -1 && (We.value.splice(n, 1), Ge());
|
|
572
596
|
}
|
|
573
|
-
let s = r(() => !t &&
|
|
597
|
+
let s = r(() => !t && Ue.value.length > 0 ? !1 : i.value.length > 0 && i.value[i.value.length - 1] === e), c = r(() => {
|
|
574
598
|
let n = i.value.indexOf(e);
|
|
575
|
-
return n === -1 ? 0 : (t ?
|
|
599
|
+
return n === -1 ? 0 : (t ? Be : ze) + n;
|
|
576
600
|
});
|
|
577
601
|
return x(o), {
|
|
578
602
|
push: a,
|
|
@@ -581,32 +605,32 @@ function Ge(e, t = !1, n = !1) {
|
|
|
581
605
|
zIndex: c
|
|
582
606
|
};
|
|
583
607
|
}
|
|
584
|
-
function
|
|
608
|
+
function qe() {
|
|
585
609
|
return typeof document > "u" ? {} : {
|
|
586
|
-
hasModal: r(() =>
|
|
587
|
-
hasOverlay: r(() =>
|
|
588
|
-
hasScrollLock: r(() =>
|
|
610
|
+
hasModal: r(() => Ue.value.length > 0),
|
|
611
|
+
hasOverlay: r(() => He.value.length > 0 || Ue.value.length > 0),
|
|
612
|
+
hasScrollLock: r(() => We.value.length > 0)
|
|
589
613
|
};
|
|
590
614
|
}
|
|
591
|
-
function
|
|
615
|
+
function Je() {
|
|
592
616
|
let e = 0;
|
|
593
|
-
return
|
|
594
|
-
e = Math.max(e, Re + n);
|
|
595
|
-
}), He.value.forEach((t, n) => {
|
|
617
|
+
return He.value.forEach((t, n) => {
|
|
596
618
|
e = Math.max(e, ze + n);
|
|
597
|
-
}),
|
|
619
|
+
}), Ue.value.forEach((t, n) => {
|
|
620
|
+
e = Math.max(e, Be + n);
|
|
621
|
+
}), e > 0 ? e + 1 : Ve;
|
|
598
622
|
}
|
|
599
623
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
600
|
-
var
|
|
624
|
+
var Ye = (e) => e != null;
|
|
601
625
|
//#endregion
|
|
602
626
|
//#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap-lXZ_YG-8.js
|
|
603
|
-
function
|
|
604
|
-
let n, { immediate: i, ...a } = t, o =
|
|
605
|
-
return
|
|
606
|
-
let t =
|
|
607
|
-
return typeof t == "string" ? t :
|
|
608
|
-
}).filter(
|
|
609
|
-
if (e.length) if (!n) n =
|
|
627
|
+
function Xe(e, t = {}) {
|
|
628
|
+
let n, { immediate: i, ...a } = t, o = N(!1), s = N(!1), c = (e) => n && n.activate(e), l = (e) => n && n.deactivate(e);
|
|
629
|
+
return K(r(() => Z(L(e)).map((e) => {
|
|
630
|
+
let t = L(e);
|
|
631
|
+
return typeof t == "string" ? t : ne(t);
|
|
632
|
+
}).filter(Ye)), (e) => {
|
|
633
|
+
if (e.length) if (!n) n = de(e, {
|
|
610
634
|
...a,
|
|
611
635
|
onActivate() {
|
|
612
636
|
o.value = !0, t.onActivate && t.onActivate();
|
|
@@ -619,7 +643,7 @@ function Ye(e, t = {}) {
|
|
|
619
643
|
let t = n?.active;
|
|
620
644
|
n?.updateContainerElements(e), !t && i && c();
|
|
621
645
|
}
|
|
622
|
-
}, { flush: "post" }),
|
|
646
|
+
}, { flush: "post" }), te(() => l()), {
|
|
623
647
|
hasFocus: o,
|
|
624
648
|
isPaused: s,
|
|
625
649
|
activate: c,
|
|
@@ -634,7 +658,7 @@ function Ye(e, t = {}) {
|
|
|
634
658
|
}
|
|
635
659
|
//#endregion
|
|
636
660
|
//#region src/compose/useOverlayFocus.ts
|
|
637
|
-
var
|
|
661
|
+
var Ze = [
|
|
638
662
|
"a[href]",
|
|
639
663
|
"button:not([disabled])",
|
|
640
664
|
"input:not([disabled])",
|
|
@@ -643,8 +667,8 @@ var Xe = [
|
|
|
643
667
|
"[tabindex]:not([tabindex='-1'])",
|
|
644
668
|
"[contenteditable='true']"
|
|
645
669
|
].join(",");
|
|
646
|
-
function
|
|
647
|
-
let r =
|
|
670
|
+
function Qe(e, t, n = !1) {
|
|
671
|
+
let r = O(!1), i = () => !!e.value?.querySelector(Ze), { activate: a, deactivate: o, pause: s, unpause: c } = Xe(e, {
|
|
648
672
|
immediate: !1,
|
|
649
673
|
clickOutsideDeactivates: n,
|
|
650
674
|
initialFocus: () => {
|
|
@@ -665,7 +689,7 @@ function Ze(e, t, n = !1) {
|
|
|
665
689
|
});
|
|
666
690
|
}
|
|
667
691
|
});
|
|
668
|
-
return
|
|
692
|
+
return K(t, (e) => {
|
|
669
693
|
e ? g(() => {
|
|
670
694
|
i() && c();
|
|
671
695
|
}).catch((e) => {
|
|
@@ -688,7 +712,7 @@ function Ze(e, t, n = !1) {
|
|
|
688
712
|
}
|
|
689
713
|
//#endregion
|
|
690
714
|
//#region src/compose/useOverlayEscape.ts
|
|
691
|
-
function
|
|
715
|
+
function $e(e, t, n, r, i) {
|
|
692
716
|
function a(i) {
|
|
693
717
|
if (!(!n.value || !t.value)) {
|
|
694
718
|
for (let t of e) if (t.value?.contains(i.target)) return;
|
|
@@ -708,7 +732,7 @@ function Qe(e, t, n, r, i) {
|
|
|
708
732
|
}
|
|
709
733
|
//#endregion
|
|
710
734
|
//#region src/compose/popoverPosition.ts
|
|
711
|
-
function
|
|
735
|
+
function et(e, t, n, r) {
|
|
712
736
|
let i = r?.gap ?? 8, a = r?.margin ?? 16, o = r?.preferAbove ?? !1, s = !1, c = !1, l;
|
|
713
737
|
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;
|
|
714
738
|
let u = e.left + (e.width - t.width) / 2;
|
|
@@ -724,7 +748,7 @@ function $e(e, t, n, r) {
|
|
|
724
748
|
}
|
|
725
749
|
//#endregion
|
|
726
750
|
//#region src/components/GPopover.vue?vue&type=script&setup=true&lang.ts
|
|
727
|
-
var
|
|
751
|
+
var tt = { class: "g-popover-wrap" }, nt = ["id"], rt = ["aria-labelledby", "aria-label"], it = /* @__PURE__ */ u({
|
|
728
752
|
__name: "GPopover",
|
|
729
753
|
props: {
|
|
730
754
|
minimal: {
|
|
@@ -742,29 +766,29 @@ var et = { class: "g-popover-wrap" }, tt = ["id"], nt = ["aria-labelledby", "ari
|
|
|
742
766
|
"update:modelValue"
|
|
743
767
|
],
|
|
744
768
|
setup(e, { expose: c, emit: u }) {
|
|
745
|
-
let d = e, f = u, p =
|
|
746
|
-
|
|
769
|
+
let d = e, f = u, p = O(d.modelValue);
|
|
770
|
+
K(I(d, "modelValue"), (e) => {
|
|
747
771
|
p.value = e;
|
|
748
772
|
});
|
|
749
|
-
let m =
|
|
750
|
-
|
|
773
|
+
let m = H(), h = r(() => !!m.trigger), v = U("triggerRef"), b = U("popoverRef"), { isCustomElement: S } = pe(), C = S, w = B(), { push: E, pop: D, isTop: k, zIndex: j } = Ke(w, !0), { activate: M, deactivate: N } = Qe(b, k, !0);
|
|
774
|
+
$e([b, v], k, p, F, D), K(p, (e) => {
|
|
751
775
|
e ? (g(() => {
|
|
752
776
|
g(() => M());
|
|
753
|
-
}), E(), f("show")) : (N(),
|
|
777
|
+
}), E(), f("show")) : (N(), D(), f("hide"));
|
|
754
778
|
});
|
|
755
779
|
function P() {
|
|
756
780
|
p.value = !0, f("update:modelValue", !0);
|
|
757
781
|
}
|
|
758
|
-
function
|
|
782
|
+
function F() {
|
|
759
783
|
p.value = !1, f("update:modelValue", !1);
|
|
760
784
|
}
|
|
761
|
-
function
|
|
785
|
+
function L() {
|
|
762
786
|
p.value = !p.value, f("update:modelValue", p.value);
|
|
763
787
|
}
|
|
764
|
-
let
|
|
788
|
+
let z = O({
|
|
765
789
|
top: 0,
|
|
766
790
|
left: 0
|
|
767
|
-
}),
|
|
791
|
+
}), V = O({ left: "50%" }), W = O(!1), q = O(!1), X = null;
|
|
768
792
|
function ee() {
|
|
769
793
|
if (v.value) return v.value;
|
|
770
794
|
let e = b.value?.parentElement ?? null;
|
|
@@ -776,23 +800,23 @@ var et = { class: "g-popover-wrap" }, tt = ["id"], nt = ["aria-labelledby", "ari
|
|
|
776
800
|
if (!b.value) return;
|
|
777
801
|
let e = new DOMRect(0, 0, b.value.offsetWidth, b.value.offsetHeight), t = new DOMRect(0, 0, window.innerWidth, window.innerHeight), n = ee();
|
|
778
802
|
if (!n) {
|
|
779
|
-
|
|
803
|
+
z.value = {
|
|
780
804
|
top: Math.max((t.height - e.height) / 2, 8),
|
|
781
805
|
left: Math.max((t.width - e.width) / 2, 8)
|
|
782
|
-
},
|
|
806
|
+
}, q.value = !1, W.value = !1, V.value = { left: "50%" };
|
|
783
807
|
return;
|
|
784
808
|
}
|
|
785
|
-
let { top: r, left: i, xOffset: a, placedAbove: o, overlay: s } =
|
|
786
|
-
|
|
809
|
+
let { top: r, left: i, xOffset: a, placedAbove: o, overlay: s } = et(n.getBoundingClientRect(), e, t, { gap: d.minimal ? 0 : 8 });
|
|
810
|
+
z.value = {
|
|
787
811
|
top: r,
|
|
788
812
|
left: i
|
|
789
|
-
},
|
|
813
|
+
}, V.value = {
|
|
790
814
|
left: `${e.width / 2 - a}px`,
|
|
791
815
|
top: o ? "auto" : void 0,
|
|
792
816
|
bottom: o ? "-8px" : void 0
|
|
793
|
-
},
|
|
817
|
+
}, W.value = o, q.value = s;
|
|
794
818
|
}
|
|
795
|
-
return
|
|
819
|
+
return K(p, (e) => {
|
|
796
820
|
e ? g(() => {
|
|
797
821
|
Z(), window.addEventListener("resize", Z), window.addEventListener("scroll", Z, { capture: !0 }), b.value && (X && X.disconnect(), X = new ResizeObserver(() => Z()), X.observe(b.value));
|
|
798
822
|
}) : (window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, { capture: !0 }), X && X.disconnect());
|
|
@@ -800,54 +824,54 @@ var et = { class: "g-popover-wrap" }, tt = ["id"], nt = ["aria-labelledby", "ari
|
|
|
800
824
|
window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, { capture: !0 }), X && X.disconnect();
|
|
801
825
|
}), c({
|
|
802
826
|
show: P,
|
|
803
|
-
hide:
|
|
804
|
-
toggle:
|
|
805
|
-
}), (r, c) => (
|
|
827
|
+
hide: F,
|
|
828
|
+
toggle: L
|
|
829
|
+
}), (r, c) => (T(), o("div", tt, [h.value ? (T(), o("div", {
|
|
806
830
|
key: 0,
|
|
807
831
|
ref_key: "triggerRef",
|
|
808
832
|
ref: v,
|
|
809
833
|
class: "g-popover-trigger",
|
|
810
|
-
id: `${
|
|
811
|
-
}, [
|
|
834
|
+
id: `${R(w)}-trigger`
|
|
835
|
+
}, [A(r.$slots, "trigger", { toggle: L })], 8, nt)) : a("", !0), (T(), i(t, {
|
|
812
836
|
to: "#modal-root",
|
|
813
|
-
disabled:
|
|
837
|
+
disabled: R(C)
|
|
814
838
|
}, [l(n, {
|
|
815
839
|
name: "g-popover-expand",
|
|
816
840
|
appear: ""
|
|
817
841
|
}, {
|
|
818
|
-
default:
|
|
842
|
+
default: J(() => [R(S) || p.value ? Y((T(), o("div", {
|
|
819
843
|
key: 0,
|
|
820
844
|
ref_key: "popoverRef",
|
|
821
845
|
ref: b,
|
|
822
846
|
class: _({
|
|
823
847
|
"g-popover": !0,
|
|
824
|
-
"g-popover-above":
|
|
825
|
-
"g-popover-below": !
|
|
848
|
+
"g-popover-above": W.value,
|
|
849
|
+
"g-popover-below": !W.value,
|
|
826
850
|
"g-popover-minimal": e.minimal
|
|
827
851
|
}),
|
|
828
852
|
role: "dialog",
|
|
829
853
|
"aria-modal": "true",
|
|
830
|
-
"aria-labelledby": h.value ? `${
|
|
854
|
+
"aria-labelledby": h.value ? `${R(w)}-trigger` : void 0,
|
|
831
855
|
"aria-label": h.value ? void 0 : "Popover",
|
|
832
856
|
style: y({
|
|
833
|
-
top:
|
|
834
|
-
left:
|
|
835
|
-
zIndex:
|
|
857
|
+
top: z.value.top + "px",
|
|
858
|
+
left: z.value.left + "px",
|
|
859
|
+
zIndex: R(j)
|
|
836
860
|
})
|
|
837
861
|
}, [
|
|
838
|
-
!
|
|
862
|
+
!q.value && !e.minimal ? (T(), o("div", {
|
|
839
863
|
key: 0,
|
|
840
|
-
class: _(["g-popover-arrow", { "g-popover-arrow-above":
|
|
841
|
-
style: y(
|
|
864
|
+
class: _(["g-popover-arrow", { "g-popover-arrow-above": W.value }]),
|
|
865
|
+
style: y(V.value),
|
|
842
866
|
"aria-hidden": "true"
|
|
843
867
|
}, null, 6)) : a("", !0),
|
|
844
|
-
|
|
845
|
-
e.minimal ? a("", !0) : (
|
|
868
|
+
A(r.$slots, "default"),
|
|
869
|
+
e.minimal ? a("", !0) : (T(), o("button", {
|
|
846
870
|
key: 1,
|
|
847
871
|
class: "g-popover-close",
|
|
848
872
|
type: "button",
|
|
849
873
|
"aria-label": "Close popover",
|
|
850
|
-
onClick:
|
|
874
|
+
onClick: F
|
|
851
875
|
}, [...c[0] ||= [s("svg", {
|
|
852
876
|
class: "g-popover-close-icon",
|
|
853
877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -857,46 +881,46 @@ var et = { class: "g-popover-wrap" }, tt = ["id"], nt = ["aria-labelledby", "ari
|
|
|
857
881
|
fill: "currentColor",
|
|
858
882
|
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"
|
|
859
883
|
})], -1)]]))
|
|
860
|
-
], 14,
|
|
884
|
+
], 14, rt)), [[G, p.value]]) : a("", !0)]),
|
|
861
885
|
_: 3
|
|
862
886
|
})], 8, ["disabled"]))]));
|
|
863
887
|
}
|
|
864
|
-
}),
|
|
865
|
-
function
|
|
866
|
-
return `${e}-${++
|
|
888
|
+
}), at = 1;
|
|
889
|
+
function ot(e = "v-gtooltip") {
|
|
890
|
+
return `${e}-${++at}`;
|
|
867
891
|
}
|
|
868
|
-
function
|
|
892
|
+
function st(e, t = "v-gtooltip") {
|
|
869
893
|
let n = e.getAttribute("aria-describedby");
|
|
870
894
|
if (n) return n;
|
|
871
|
-
let r =
|
|
895
|
+
let r = ot(t);
|
|
872
896
|
return e.setAttribute("aria-describedby", r), r;
|
|
873
897
|
}
|
|
874
|
-
function
|
|
898
|
+
function ct(e, t) {
|
|
875
899
|
let n = document.createElement("div");
|
|
876
900
|
return n.className = "v-gtooltip", n.textContent = e, n.setAttribute("role", "tooltip"), n.setAttribute("id", t), n;
|
|
877
901
|
}
|
|
878
|
-
function
|
|
902
|
+
function lt(e) {
|
|
879
903
|
(document.getElementById("modal-root") ?? document.body).appendChild(e);
|
|
880
904
|
}
|
|
881
|
-
function
|
|
882
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), { top: i, left: a, placedAbove: o } =
|
|
905
|
+
function ut(e, t) {
|
|
906
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), { top: i, left: a, placedAbove: o } = et(n, r, new DOMRect(0, 0, window.innerWidth, window.innerHeight), {
|
|
883
907
|
gap: 8,
|
|
884
908
|
margin: 8,
|
|
885
909
|
preferAbove: !0
|
|
886
910
|
}), s = (n.left + n.width / 2 - a) / r.width * 100;
|
|
887
|
-
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 = `${
|
|
911
|
+
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";
|
|
888
912
|
}
|
|
889
|
-
function
|
|
913
|
+
function dt(e) {
|
|
890
914
|
e.style.opacity = "0";
|
|
891
915
|
}
|
|
892
916
|
//#endregion
|
|
893
917
|
//#region src/components/GTooltip.vue
|
|
894
|
-
var
|
|
918
|
+
var ft = /* @__PURE__ */ u({
|
|
895
919
|
__name: "GTooltip",
|
|
896
920
|
props: { text: {} },
|
|
897
921
|
emits: ["tooltip-hide"],
|
|
898
922
|
setup(e, { expose: t, emit: n }) {
|
|
899
|
-
let i = e, s = n, c =
|
|
923
|
+
let i = e, s = n, c = H(), l = r(() => !!c.trigger), u = U("hostRef"), d = U("triggerRef"), f = O(null), p = O(!1), m = O(!1), h = null, g = !1, _ = null, v = null, y = null;
|
|
900
924
|
function b() {
|
|
901
925
|
if (l.value && d.value) {
|
|
902
926
|
let e = d.value.firstElementChild;
|
|
@@ -906,27 +930,27 @@ var dt = /* @__PURE__ */ u({
|
|
|
906
930
|
return t instanceof HTMLElement ? t : null;
|
|
907
931
|
}
|
|
908
932
|
function S() {
|
|
909
|
-
y && (v || (v = l.value ?
|
|
910
|
-
f.value && (p.value || m.value) && y &&
|
|
933
|
+
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(() => {
|
|
934
|
+
f.value && (p.value || m.value) && y && ut(y, f.value);
|
|
911
935
|
}), h.observe(f.value)));
|
|
912
936
|
}
|
|
913
937
|
function C() {
|
|
914
|
-
f.value && (p.value || m.value) && y &&
|
|
938
|
+
f.value && (p.value || m.value) && y && ut(y, f.value);
|
|
915
939
|
}
|
|
916
|
-
function
|
|
940
|
+
function w() {
|
|
917
941
|
p.value = !0;
|
|
918
942
|
}
|
|
919
943
|
function E() {
|
|
920
944
|
p.value = !1, m.value = !1;
|
|
921
945
|
}
|
|
922
|
-
function
|
|
946
|
+
function D() {
|
|
923
947
|
if (p.value || m.value) {
|
|
924
948
|
E();
|
|
925
949
|
return;
|
|
926
950
|
}
|
|
927
|
-
|
|
951
|
+
w();
|
|
928
952
|
}
|
|
929
|
-
function
|
|
953
|
+
function k(e) {
|
|
930
954
|
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)));
|
|
931
955
|
}
|
|
932
956
|
function j() {
|
|
@@ -947,44 +971,44 @@ var dt = /* @__PURE__ */ u({
|
|
|
947
971
|
function I(e) {
|
|
948
972
|
(e.key === "Escape" || e.key === "Esc") && (p.value = !1, m.value = !1);
|
|
949
973
|
}
|
|
950
|
-
return
|
|
974
|
+
return K(() => [
|
|
951
975
|
u.value,
|
|
952
976
|
d.value,
|
|
953
977
|
l.value
|
|
954
978
|
], () => {
|
|
955
|
-
|
|
956
|
-
}, { immediate: !0 }),
|
|
979
|
+
k(b()), S();
|
|
980
|
+
}, { immediate: !0 }), K(() => i.text, (e) => {
|
|
957
981
|
f.value && (f.value.textContent = e);
|
|
958
|
-
}),
|
|
982
|
+
}), K(() => p.value || m.value, (e) => {
|
|
959
983
|
if (e) {
|
|
960
|
-
S(), f.value && y &&
|
|
984
|
+
S(), f.value && y && ut(y, f.value), g ||= (window.addEventListener("scroll", C, { capture: !0 }), !0);
|
|
961
985
|
return;
|
|
962
986
|
}
|
|
963
|
-
g &&= (window.removeEventListener("scroll", C, { capture: !0 }), !1), f.value && (
|
|
987
|
+
g &&= (window.removeEventListener("scroll", C, { capture: !0 }), !1), f.value && (dt(f.value), _ && clearTimeout(_), _ = window.setTimeout(() => {
|
|
964
988
|
s("tooltip-hide");
|
|
965
989
|
}, 150));
|
|
966
990
|
}), x(() => {
|
|
967
991
|
g && window.removeEventListener("scroll", C, { capture: !0 }), h && h.disconnect(), f.value &&= (f.value.remove(), null), _ && clearTimeout(_), l.value && y && y.removeAttribute("aria-describedby"), j();
|
|
968
992
|
}), t({
|
|
969
|
-
show:
|
|
993
|
+
show: w,
|
|
970
994
|
hide: E,
|
|
971
|
-
toggle:
|
|
972
|
-
}), (e, t) => (
|
|
995
|
+
toggle: D
|
|
996
|
+
}), (e, t) => (T(), o("div", {
|
|
973
997
|
ref_key: "hostRef",
|
|
974
998
|
ref: u,
|
|
975
999
|
class: "g-tooltip-host"
|
|
976
|
-
}, [l.value ? (
|
|
1000
|
+
}, [l.value ? (T(), o("div", {
|
|
977
1001
|
key: 0,
|
|
978
1002
|
ref_key: "triggerRef",
|
|
979
1003
|
ref: d,
|
|
980
1004
|
class: "g-tooltip-trigger"
|
|
981
|
-
}, [
|
|
1005
|
+
}, [A(e.$slots, "trigger")], 512)) : a("", !0)], 512));
|
|
982
1006
|
}
|
|
983
|
-
}),
|
|
1007
|
+
}), pt = ["disabled"], mt = { class: "g-select-btn-legend" }, ht = {
|
|
984
1008
|
key: 0,
|
|
985
1009
|
class: "g-select-btn-required",
|
|
986
1010
|
"aria-hidden": "true"
|
|
987
|
-
},
|
|
1011
|
+
}, gt = { class: "g-select-btn-row" }, _t = [
|
|
988
1012
|
"id",
|
|
989
1013
|
"name",
|
|
990
1014
|
"value",
|
|
@@ -992,7 +1016,7 @@ var dt = /* @__PURE__ */ u({
|
|
|
992
1016
|
"disabled",
|
|
993
1017
|
"required",
|
|
994
1018
|
"onChange"
|
|
995
|
-
],
|
|
1019
|
+
], vt = ["for"], yt = /* @__PURE__ */ u({
|
|
996
1020
|
__name: "GSelectButton",
|
|
997
1021
|
props: /* @__PURE__ */ m({
|
|
998
1022
|
options: {},
|
|
@@ -1015,10 +1039,10 @@ var dt = /* @__PURE__ */ u({
|
|
|
1015
1039
|
}),
|
|
1016
1040
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
1017
1041
|
setup(t, { emit: n }) {
|
|
1018
|
-
let i = t, u = n, d =
|
|
1042
|
+
let i = t, u = n, d = V(t, "modelValue"), f = B(), { displayErrors: p, hasErrors: m } = $({
|
|
1019
1043
|
name: i.name,
|
|
1020
1044
|
value: d,
|
|
1021
|
-
errors:
|
|
1045
|
+
errors: I(i, "errors"),
|
|
1022
1046
|
formKey: i.formKey
|
|
1023
1047
|
}), h = r(() => i.options.map((e) => typeof e == "string" ? {
|
|
1024
1048
|
label: e,
|
|
@@ -1031,42 +1055,42 @@ var dt = /* @__PURE__ */ u({
|
|
|
1031
1055
|
function y(e) {
|
|
1032
1056
|
!i.disabled && e !== d.value && (d.value = e, u("change", e));
|
|
1033
1057
|
}
|
|
1034
|
-
return (t, n) => (
|
|
1058
|
+
return (t, n) => (T(), o("fieldset", {
|
|
1035
1059
|
class: _(g.value),
|
|
1036
1060
|
disabled: i.disabled
|
|
1037
|
-
}, [s("legend",
|
|
1061
|
+
}, [s("legend", mt, [c(P(i.label), 1), i.required ? (T(), o("span", ht, " *")) : a("", !0)]), s("div", { class: _(["g-select-btn-wrapper", { "g-select-btn-has-error": R(m) }]) }, [s("div", gt, [(T(!0), o(e, null, k(h.value, (t, n) => (T(), o(e, { key: t.value }, [s("input", {
|
|
1038
1062
|
class: "g-select-btn-radio",
|
|
1039
1063
|
type: "radio",
|
|
1040
|
-
id: `${
|
|
1041
|
-
name: i.name ||
|
|
1064
|
+
id: `${R(f)}-${t.value}`,
|
|
1065
|
+
name: i.name || R(f),
|
|
1042
1066
|
value: t.value,
|
|
1043
1067
|
checked: t.value === d.value,
|
|
1044
1068
|
disabled: i.disabled,
|
|
1045
1069
|
required: i.required && n === 0,
|
|
1046
1070
|
onChange: (e) => y(t.value)
|
|
1047
|
-
}, null, 40,
|
|
1048
|
-
for: `${
|
|
1071
|
+
}, null, 40, _t), s("label", {
|
|
1072
|
+
for: `${R(f)}-${t.value}`,
|
|
1049
1073
|
class: _(v(t.value === d.value))
|
|
1050
|
-
},
|
|
1051
|
-
errors:
|
|
1052
|
-
id: "error-message-" +
|
|
1053
|
-
}, null, 8, ["errors", "id"])], 2)], 10,
|
|
1074
|
+
}, P(t.label), 11, vt)], 64))), 128))]), l(je, {
|
|
1075
|
+
errors: R(p),
|
|
1076
|
+
id: "error-message-" + R(f)
|
|
1077
|
+
}, null, 8, ["errors", "id"])], 2)], 10, pt));
|
|
1054
1078
|
}
|
|
1055
|
-
}),
|
|
1079
|
+
}), bt = ["width", "height"], xt = [
|
|
1056
1080
|
"cx",
|
|
1057
1081
|
"cy",
|
|
1058
1082
|
"r"
|
|
1059
|
-
],
|
|
1083
|
+
], St = [
|
|
1060
1084
|
"cx",
|
|
1061
1085
|
"cy",
|
|
1062
1086
|
"r",
|
|
1063
1087
|
"stroke-dasharray",
|
|
1064
1088
|
"stroke-dashoffset"
|
|
1065
|
-
],
|
|
1089
|
+
], Ct = [
|
|
1066
1090
|
"cx",
|
|
1067
1091
|
"cy",
|
|
1068
1092
|
"r"
|
|
1069
|
-
],
|
|
1093
|
+
], wt = /* @__PURE__ */ u({
|
|
1070
1094
|
__name: "GProgress",
|
|
1071
1095
|
props: {
|
|
1072
1096
|
label: { default: "Loading" },
|
|
@@ -1091,7 +1115,7 @@ var dt = /* @__PURE__ */ u({
|
|
|
1091
1115
|
role: "status",
|
|
1092
1116
|
"aria-label": t.label
|
|
1093
1117
|
});
|
|
1094
|
-
return (e, t) => (
|
|
1118
|
+
return (e, t) => (T(), o("span", h({ class: "g-progress" }, l.value), [(T(), o("svg", {
|
|
1095
1119
|
width: i.value * 2 + 4,
|
|
1096
1120
|
height: i.value * 2 + 4,
|
|
1097
1121
|
class: _(["g-progress__svg", {
|
|
@@ -1107,7 +1131,7 @@ var dt = /* @__PURE__ */ u({
|
|
|
1107
1131
|
r: i.value,
|
|
1108
1132
|
"stroke-width": 4,
|
|
1109
1133
|
fill: "none"
|
|
1110
|
-
}, null, 8,
|
|
1134
|
+
}, null, 8, xt), n.value ? (T(), o("circle", {
|
|
1111
1135
|
key: 0,
|
|
1112
1136
|
class: "g-progress__value",
|
|
1113
1137
|
cx: i.value + 4 / 2,
|
|
@@ -1121,7 +1145,7 @@ var dt = /* @__PURE__ */ u({
|
|
|
1121
1145
|
transform: "rotate(-90deg)",
|
|
1122
1146
|
"transform-origin": "center"
|
|
1123
1147
|
}
|
|
1124
|
-
}, null, 8,
|
|
1148
|
+
}, null, 8, St)) : (T(), o("circle", {
|
|
1125
1149
|
key: 1,
|
|
1126
1150
|
class: "g-progress__spinner",
|
|
1127
1151
|
cx: i.value + 4 / 2,
|
|
@@ -1129,13 +1153,13 @@ var dt = /* @__PURE__ */ u({
|
|
|
1129
1153
|
r: i.value,
|
|
1130
1154
|
"stroke-width": 4,
|
|
1131
1155
|
fill: "none"
|
|
1132
|
-
}, null, 8,
|
|
1156
|
+
}, null, 8, Ct))], 10, bt))], 16));
|
|
1133
1157
|
}
|
|
1134
|
-
}),
|
|
1158
|
+
}), Tt = [
|
|
1135
1159
|
"id",
|
|
1136
1160
|
"aria-labelledby",
|
|
1137
1161
|
"aria-describedby"
|
|
1138
|
-
],
|
|
1162
|
+
], Et = { class: "g-alertdialog-inner" }, Dt = ["id"], Ot = ["id"], kt = { class: "g-alertdialog-actions" }, At = /* @__PURE__ */ u({
|
|
1139
1163
|
__name: "GAlertDialog",
|
|
1140
1164
|
props: {
|
|
1141
1165
|
label: { default: "Confirmation" },
|
|
@@ -1144,65 +1168,65 @@ var dt = /* @__PURE__ */ u({
|
|
|
1144
1168
|
},
|
|
1145
1169
|
emits: ["cancel", "confirm"],
|
|
1146
1170
|
setup(e, { emit: r }) {
|
|
1147
|
-
let a = e, o = r, u =
|
|
1171
|
+
let a = e, o = r, u = O(null), d = O(!0), f = B(), { pop: p, push: m, isTop: h, zIndex: g } = Ke(f, !0, !0), { deactivate: _, activate: v } = Qe(u, h);
|
|
1148
1172
|
function x() {
|
|
1149
1173
|
o("cancel");
|
|
1150
1174
|
}
|
|
1151
|
-
return
|
|
1175
|
+
return $e([u], h, d, x, p), S(() => {
|
|
1152
1176
|
m(), v();
|
|
1153
1177
|
}), b(() => {
|
|
1154
1178
|
p(), _();
|
|
1155
|
-
}), (e, r) => (
|
|
1179
|
+
}), (e, r) => (T(), i(t, { to: "#modal-root" }, [l(n, {
|
|
1156
1180
|
name: "g-fade",
|
|
1157
1181
|
appear: ""
|
|
1158
1182
|
}, {
|
|
1159
|
-
default:
|
|
1160
|
-
id: "alertdialog-" +
|
|
1183
|
+
default: J(() => [s("div", {
|
|
1184
|
+
id: "alertdialog-" + R(f),
|
|
1161
1185
|
class: "g-alertdialog",
|
|
1162
1186
|
role: "alertdialog",
|
|
1163
1187
|
"aria-modal": "true",
|
|
1164
|
-
"aria-labelledby": "alertdialog-label-" +
|
|
1165
|
-
"aria-describedby": "alertdialog-description-" +
|
|
1188
|
+
"aria-labelledby": "alertdialog-label-" + R(f),
|
|
1189
|
+
"aria-describedby": "alertdialog-description-" + R(f),
|
|
1166
1190
|
ref_key: "dialog",
|
|
1167
1191
|
ref: u,
|
|
1168
|
-
style: y({ zIndex:
|
|
1169
|
-
}, [s("div",
|
|
1192
|
+
style: y({ zIndex: R(g) })
|
|
1193
|
+
}, [s("div", Et, [
|
|
1170
1194
|
s("h2", {
|
|
1171
|
-
id: "alertdialog-label-" +
|
|
1195
|
+
id: "alertdialog-label-" + R(f),
|
|
1172
1196
|
class: "g-alertdialog-label"
|
|
1173
|
-
},
|
|
1197
|
+
}, P(a.label), 9, Dt),
|
|
1174
1198
|
s("div", {
|
|
1175
|
-
id: "alertdialog-description-" +
|
|
1199
|
+
id: "alertdialog-description-" + R(f),
|
|
1176
1200
|
class: "g-alertdialog-content"
|
|
1177
|
-
}, [
|
|
1178
|
-
s("div",
|
|
1201
|
+
}, [A(e.$slots, "default")], 8, Ot),
|
|
1202
|
+
s("div", kt, [l(Q, {
|
|
1179
1203
|
outlined: "",
|
|
1180
1204
|
onClick: r[0] ||= (e) => o("cancel")
|
|
1181
1205
|
}, {
|
|
1182
|
-
default:
|
|
1206
|
+
default: J(() => [...r[2] ||= [c("Cancel", -1)]]),
|
|
1183
1207
|
_: 1
|
|
1184
1208
|
}), l(Q, {
|
|
1185
1209
|
theme: a.buttonColor,
|
|
1186
1210
|
onClick: r[1] ||= (e) => o("confirm")
|
|
1187
1211
|
}, {
|
|
1188
|
-
default:
|
|
1212
|
+
default: J(() => [c(P(a.buttonText), 1)]),
|
|
1189
1213
|
_: 1
|
|
1190
1214
|
}, 8, ["theme"])])
|
|
1191
|
-
])], 12,
|
|
1215
|
+
])], 12, Tt)]),
|
|
1192
1216
|
_: 3
|
|
1193
1217
|
})]));
|
|
1194
1218
|
}
|
|
1195
1219
|
});
|
|
1196
1220
|
//#endregion
|
|
1197
1221
|
//#region src/compose/useSelectDropdown.ts
|
|
1198
|
-
function
|
|
1222
|
+
function jt(e) {
|
|
1199
1223
|
return e.map((e) => typeof e == "string" ? {
|
|
1200
1224
|
label: e,
|
|
1201
1225
|
value: e
|
|
1202
1226
|
} : e);
|
|
1203
1227
|
}
|
|
1204
|
-
function
|
|
1205
|
-
let { push: o, pop: s, isTop: c } =
|
|
1228
|
+
function Mt({ open: e, anchorRef: t, listboxRef: n, baseId: i, activeIndex: a }) {
|
|
1229
|
+
let { push: o, pop: s, isTop: c } = Ke(i), l = O("below"), u = O(null), d = r(() => {
|
|
1206
1230
|
let e = {};
|
|
1207
1231
|
return u.value !== null && (e.maxHeight = `${u.value}px`), l.value === "above" ? (e.top = "auto", e.bottom = "100%") : (e.top = "100%", e.bottom = "auto"), e;
|
|
1208
1232
|
});
|
|
@@ -1225,7 +1249,7 @@ function jt({ open: e, anchorRef: t, listboxRef: n, baseId: i, activeIndex: a })
|
|
|
1225
1249
|
function h() {
|
|
1226
1250
|
p && p();
|
|
1227
1251
|
}
|
|
1228
|
-
|
|
1252
|
+
K(e, (e) => {
|
|
1229
1253
|
e ? (o(), m(), g(() => f())) : (s(), h(), l.value = "below", u.value = null);
|
|
1230
1254
|
}), x(() => {
|
|
1231
1255
|
h();
|
|
@@ -1245,11 +1269,11 @@ function jt({ open: e, anchorRef: t, listboxRef: n, baseId: i, activeIndex: a })
|
|
|
1245
1269
|
}
|
|
1246
1270
|
//#endregion
|
|
1247
1271
|
//#region src/components/GSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1248
|
-
var
|
|
1272
|
+
var Nt = ["id"], Pt = {
|
|
1249
1273
|
key: 0,
|
|
1250
1274
|
class: "g-select-required",
|
|
1251
1275
|
"aria-hidden": "true"
|
|
1252
|
-
},
|
|
1276
|
+
}, Ft = { class: "g-select-input-wrap" }, It = ["id"], Lt = [
|
|
1253
1277
|
"value",
|
|
1254
1278
|
"placeholder",
|
|
1255
1279
|
"disabled",
|
|
@@ -1257,21 +1281,21 @@ var Mt = ["id"], Nt = {
|
|
|
1257
1281
|
"aria-expanded",
|
|
1258
1282
|
"aria-required",
|
|
1259
1283
|
"aria-activedescendant"
|
|
1260
|
-
],
|
|
1284
|
+
], Rt = [
|
|
1261
1285
|
"id",
|
|
1262
1286
|
"aria-controls",
|
|
1263
1287
|
"aria-expanded",
|
|
1264
1288
|
"aria-required",
|
|
1265
1289
|
"aria-activedescendant"
|
|
1266
|
-
],
|
|
1290
|
+
], zt = ["id"], Bt = [
|
|
1267
1291
|
"id",
|
|
1268
1292
|
"aria-selected",
|
|
1269
1293
|
"onClick"
|
|
1270
|
-
],
|
|
1294
|
+
], Vt = {
|
|
1271
1295
|
key: 1,
|
|
1272
1296
|
"aria-live": "polite",
|
|
1273
1297
|
class: "g-select-combo-option g-select-option g-select-no-results"
|
|
1274
|
-
},
|
|
1298
|
+
}, Ht = /* @__PURE__ */ u({
|
|
1275
1299
|
__name: "GSelect",
|
|
1276
1300
|
props: /* @__PURE__ */ m({
|
|
1277
1301
|
options: {},
|
|
@@ -1304,39 +1328,39 @@ var Mt = ["id"], Nt = {
|
|
|
1304
1328
|
}),
|
|
1305
1329
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
1306
1330
|
setup(t, { emit: n }) {
|
|
1307
|
-
let i = t, u = n, d =
|
|
1331
|
+
let i = t, u = n, d = V(t, "modelValue"), f = B(), p = O(null), m = O(null), v = O(null), y = O(!1), b = O(0), x = O(!1), S = O(!1), { displayErrors: C, hasErrors: w } = $({
|
|
1308
1332
|
name: i.name,
|
|
1309
1333
|
value: d,
|
|
1310
|
-
errors:
|
|
1334
|
+
errors: I(i, "errors"),
|
|
1311
1335
|
formKey: i.formKey
|
|
1312
|
-
}), { menuPlacement: E, menuStyle:
|
|
1336
|
+
}), { menuPlacement: E, menuStyle: D, isTop: j, scrollOptionIntoView: M } = Mt({
|
|
1313
1337
|
open: y,
|
|
1314
1338
|
anchorRef: p,
|
|
1315
1339
|
listboxRef: m,
|
|
1316
1340
|
baseId: f,
|
|
1317
1341
|
activeIndex: b
|
|
1318
|
-
}),
|
|
1319
|
-
if (!i.searchable || !y.value || !
|
|
1320
|
-
let e =
|
|
1321
|
-
return
|
|
1322
|
-
}),
|
|
1323
|
-
|
|
1324
|
-
let t =
|
|
1342
|
+
}), N = r(() => jt(i.options)), F = O(""), L = r(() => {
|
|
1343
|
+
if (!i.searchable || !y.value || !F.value) return N.value;
|
|
1344
|
+
let e = F.value.toLowerCase();
|
|
1345
|
+
return N.value.filter((t) => t.label.toLowerCase().includes(e));
|
|
1346
|
+
}), z = r(() => L.value.findIndex((e) => e.value === d.value));
|
|
1347
|
+
K(() => d.value, (e) => {
|
|
1348
|
+
let t = L.value.findIndex((t) => t.value === e);
|
|
1325
1349
|
t !== -1 && (b.value = t);
|
|
1326
1350
|
});
|
|
1327
1351
|
function H() {
|
|
1328
1352
|
if (!i.disabled && (y.value = !0, i.searchable)) {
|
|
1329
|
-
|
|
1330
|
-
let e =
|
|
1353
|
+
F.value = "";
|
|
1354
|
+
let e = L.value.findIndex((e) => e.value === d.value);
|
|
1331
1355
|
b.value = e === -1 ? 0 : e, g(() => {
|
|
1332
1356
|
v.value && v.value.focus();
|
|
1333
1357
|
});
|
|
1334
1358
|
}
|
|
1335
1359
|
}
|
|
1336
1360
|
function U() {
|
|
1337
|
-
y.value = !1, i.searchable && (
|
|
1361
|
+
y.value = !1, i.searchable && (F.value = "");
|
|
1338
1362
|
}
|
|
1339
|
-
function
|
|
1363
|
+
function W(e) {
|
|
1340
1364
|
if (!i.disabled && i.searchable) {
|
|
1341
1365
|
if (S.value) {
|
|
1342
1366
|
S.value = !1;
|
|
@@ -1347,20 +1371,20 @@ var Mt = ["id"], Nt = {
|
|
|
1347
1371
|
}
|
|
1348
1372
|
function q(e) {
|
|
1349
1373
|
if (!i.searchable) return;
|
|
1350
|
-
y.value || H(),
|
|
1351
|
-
let t =
|
|
1374
|
+
y.value || H(), F.value = e.target.value;
|
|
1375
|
+
let t = L.value.findIndex((e) => e.value === d.value);
|
|
1352
1376
|
b.value = t === -1 ? 0 : t;
|
|
1353
1377
|
}
|
|
1354
|
-
function
|
|
1378
|
+
function J(e) {
|
|
1355
1379
|
let t = e.relatedTarget;
|
|
1356
1380
|
if (x.value) {
|
|
1357
1381
|
x.value = !1;
|
|
1358
1382
|
return;
|
|
1359
1383
|
}
|
|
1360
|
-
t && m.value && m.value.contains(t) || (i.searchable && (
|
|
1384
|
+
t && m.value && m.value.contains(t) || (i.searchable && (F.value = ""), U());
|
|
1361
1385
|
}
|
|
1362
1386
|
function ee(e) {
|
|
1363
|
-
let t =
|
|
1387
|
+
let t = L.value[e];
|
|
1364
1388
|
t && t.value !== d.value && (d.value = t.value, u("change", t.value)), S.value = !0, U(), setTimeout(() => {
|
|
1365
1389
|
S.value = !1;
|
|
1366
1390
|
}, 100);
|
|
@@ -1370,7 +1394,7 @@ var Mt = ["id"], Nt = {
|
|
|
1370
1394
|
}
|
|
1371
1395
|
function te(e) {
|
|
1372
1396
|
if (i.disabled) return;
|
|
1373
|
-
let t =
|
|
1397
|
+
let t = L.value.length - 1;
|
|
1374
1398
|
if (!y.value && [
|
|
1375
1399
|
"ArrowDown",
|
|
1376
1400
|
"ArrowUp",
|
|
@@ -1412,22 +1436,22 @@ var Mt = ["id"], Nt = {
|
|
|
1412
1436
|
}
|
|
1413
1437
|
let ie = r(() => i.clearButton && d.value !== null && d.value !== void 0 && !i.disabled);
|
|
1414
1438
|
function ae() {
|
|
1415
|
-
i.disabled || (d.value = null, u("change", null), i.searchable && (
|
|
1439
|
+
i.disabled || (d.value = null, u("change", null), i.searchable && (F.value = ""));
|
|
1416
1440
|
}
|
|
1417
|
-
return (n, r) => (
|
|
1441
|
+
return (n, r) => (T(), o("div", { class: _(["g-select-root g-select-combo", {
|
|
1418
1442
|
"g-select-open": y.value,
|
|
1419
1443
|
"g-select-compact": t.compact,
|
|
1420
|
-
"g-select-has-error":
|
|
1444
|
+
"g-select-has-error": R(w)
|
|
1421
1445
|
}]) }, [
|
|
1422
|
-
t.hiddenLabel ? a("", !0) : (
|
|
1446
|
+
t.hiddenLabel ? a("", !0) : (T(), o("div", {
|
|
1423
1447
|
key: 0,
|
|
1424
|
-
id:
|
|
1448
|
+
id: R(f) + "-label",
|
|
1425
1449
|
class: "g-select-combo-label g-select-label"
|
|
1426
|
-
}, [c(
|
|
1427
|
-
s("div",
|
|
1450
|
+
}, [c(P(i.label), 1), i.required ? (T(), o("span", Pt, " *")) : a("", !0)], 8, Nt)),
|
|
1451
|
+
s("div", Ft, [i.searchable ? (T(), o("div", {
|
|
1428
1452
|
key: 0,
|
|
1429
1453
|
class: "g-select-combo-input g-select-control",
|
|
1430
|
-
id:
|
|
1454
|
+
id: R(f)
|
|
1431
1455
|
}, [
|
|
1432
1456
|
s("input", h({
|
|
1433
1457
|
ref_key: "comboRef",
|
|
@@ -1435,24 +1459,24 @@ var Mt = ["id"], Nt = {
|
|
|
1435
1459
|
type: "text",
|
|
1436
1460
|
name: "comboInput",
|
|
1437
1461
|
class: ["g-select-search-input", { "g-select-clearable": t.clearButton }],
|
|
1438
|
-
value: y.value ?
|
|
1462
|
+
value: y.value ? F.value : N.value[z.value] ? N.value[z.value].label : "",
|
|
1439
1463
|
placeholder: y.value ? "" : t.placeholder,
|
|
1440
1464
|
disabled: i.disabled,
|
|
1441
|
-
onFocus:
|
|
1465
|
+
onFocus: W,
|
|
1442
1466
|
onInput: q,
|
|
1443
1467
|
onKeydown: te,
|
|
1444
|
-
onBlur:
|
|
1468
|
+
onBlur: J,
|
|
1445
1469
|
"aria-autocomplete": "list",
|
|
1446
|
-
"aria-controls":
|
|
1470
|
+
"aria-controls": R(f) + "-listbox",
|
|
1447
1471
|
"aria-expanded": y.value ? "true" : "false",
|
|
1448
1472
|
"aria-required": i.required ? "true" : void 0,
|
|
1449
1473
|
"aria-haspopup": "listbox",
|
|
1450
|
-
"aria-activedescendant": y.value ?
|
|
1451
|
-
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby":
|
|
1474
|
+
"aria-activedescendant": y.value ? R(f) + "-option-" + b.value : void 0
|
|
1475
|
+
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby": R(f) + "-label" }, {
|
|
1452
1476
|
role: "combobox",
|
|
1453
1477
|
autocomplete: "off"
|
|
1454
|
-
}), null, 16,
|
|
1455
|
-
ie.value ? (
|
|
1478
|
+
}), null, 16, Lt),
|
|
1479
|
+
ie.value ? (T(), o("button", {
|
|
1456
1480
|
key: 0,
|
|
1457
1481
|
type: "button",
|
|
1458
1482
|
class: "g-select-clear-btn",
|
|
@@ -1477,31 +1501,31 @@ var Mt = ["id"], Nt = {
|
|
|
1477
1501
|
fill: "currentColor",
|
|
1478
1502
|
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"
|
|
1479
1503
|
})], -1)
|
|
1480
|
-
], 8,
|
|
1504
|
+
], 8, It)) : (T(), o("div", h({
|
|
1481
1505
|
key: 1,
|
|
1482
1506
|
ref_key: "comboRef",
|
|
1483
1507
|
ref: p,
|
|
1484
|
-
id:
|
|
1508
|
+
id: R(f),
|
|
1485
1509
|
class: ["g-select-combo-button g-select-control", { "g-select-clearable": t.clearButton }],
|
|
1486
1510
|
role: "combobox",
|
|
1487
|
-
"aria-controls":
|
|
1511
|
+
"aria-controls": R(f) + "-listbox",
|
|
1488
1512
|
"aria-expanded": y.value ? "true" : "false",
|
|
1489
1513
|
"aria-required": i.required ? "true" : void 0,
|
|
1490
1514
|
"aria-haspopup": "listbox"
|
|
1491
|
-
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby":
|
|
1492
|
-
"aria-activedescendant": y.value ?
|
|
1515
|
+
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby": R(f) + "-label" }, {
|
|
1516
|
+
"aria-activedescendant": y.value ? R(f) + "-option-" + b.value : void 0,
|
|
1493
1517
|
tabindex: "0",
|
|
1494
1518
|
onClick: Z,
|
|
1495
1519
|
onKeydown: te,
|
|
1496
|
-
onFocus:
|
|
1497
|
-
onBlur:
|
|
1520
|
+
onFocus: W,
|
|
1521
|
+
onBlur: J
|
|
1498
1522
|
}), [
|
|
1499
|
-
c(N
|
|
1500
|
-
ie.value ? (
|
|
1523
|
+
c(P(N.value[z.value] ? N.value[z.value].label : "") + " ", 1),
|
|
1524
|
+
ie.value ? (T(), o("button", {
|
|
1501
1525
|
key: 0,
|
|
1502
1526
|
type: "button",
|
|
1503
1527
|
class: "g-select-clear-btn",
|
|
1504
|
-
onClick:
|
|
1528
|
+
onClick: X(ae, ["stop"])
|
|
1505
1529
|
}, [...r[2] ||= [s("svg", {
|
|
1506
1530
|
role: "img",
|
|
1507
1531
|
"aria-label": "Clear Selection",
|
|
@@ -1522,16 +1546,16 @@ var Mt = ["id"], Nt = {
|
|
|
1522
1546
|
fill: "currentColor",
|
|
1523
1547
|
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"
|
|
1524
1548
|
})], -1)
|
|
1525
|
-
], 16,
|
|
1549
|
+
], 16, Rt)), Y(s("div", h({
|
|
1526
1550
|
ref_key: "listboxRef",
|
|
1527
1551
|
ref: m,
|
|
1528
|
-
class: ["g-select-combo-menu g-select-list", { "g-select-combo-menu--above":
|
|
1529
|
-
style:
|
|
1552
|
+
class: ["g-select-combo-menu g-select-list", { "g-select-combo-menu--above": R(E) === "above" }],
|
|
1553
|
+
style: R(D),
|
|
1530
1554
|
role: "listbox",
|
|
1531
|
-
id:
|
|
1532
|
-
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby":
|
|
1555
|
+
id: R(f) + "-listbox"
|
|
1556
|
+
}, t.hiddenLabel ? { "aria-label": i.label } : { "aria-labelledby": R(f) + "-label" }, { tabindex: "-1" }), [L.value.length > 0 ? (T(!0), o(e, { key: 0 }, k(L.value, (e, t) => (T(), o("div", {
|
|
1533
1557
|
key: e.value,
|
|
1534
|
-
id:
|
|
1558
|
+
id: R(f) + "-option-" + t,
|
|
1535
1559
|
class: _(["g-select-combo-option g-select-option", {
|
|
1536
1560
|
"g-select-option-current": t === b.value,
|
|
1537
1561
|
"ilw-theme-blue": e.value === d.value
|
|
@@ -1540,38 +1564,38 @@ var Mt = ["id"], Nt = {
|
|
|
1540
1564
|
"aria-selected": e.value === d.value ? "true" : "false",
|
|
1541
1565
|
onMousedown: re,
|
|
1542
1566
|
onClick: (e) => ne(t)
|
|
1543
|
-
}, [
|
|
1567
|
+
}, [A(n.$slots, "option", {
|
|
1544
1568
|
option: e,
|
|
1545
1569
|
selected: e.value === d.value,
|
|
1546
1570
|
index: t
|
|
1547
|
-
}, () => [c(
|
|
1548
|
-
l(
|
|
1549
|
-
errors:
|
|
1550
|
-
id: "error-message-" +
|
|
1571
|
+
}, () => [c(P(e.label), 1)])], 42, Bt))), 128)) : (T(), o("div", Vt, " No results found. "))], 16, zt), [[G, y.value]])]),
|
|
1572
|
+
l(je, {
|
|
1573
|
+
errors: R(C),
|
|
1574
|
+
id: "error-message-" + R(f)
|
|
1551
1575
|
}, null, 8, ["errors", "id"])
|
|
1552
1576
|
], 2));
|
|
1553
1577
|
}
|
|
1554
|
-
}),
|
|
1578
|
+
}), Ut = ["aria-label"], Wt = [
|
|
1555
1579
|
"placeholder",
|
|
1556
1580
|
"value",
|
|
1557
1581
|
"aria-expanded",
|
|
1558
1582
|
"aria-controls",
|
|
1559
1583
|
"aria-activedescendant"
|
|
1560
|
-
],
|
|
1584
|
+
], Gt = {
|
|
1561
1585
|
key: 0,
|
|
1562
1586
|
class: "g-search-dropdown"
|
|
1563
|
-
},
|
|
1587
|
+
}, Kt = {
|
|
1564
1588
|
"aria-live": "polite",
|
|
1565
1589
|
class: "g-search-result-count"
|
|
1566
|
-
},
|
|
1590
|
+
}, qt = ["id"], Jt = ["aria-label"], Yt = { class: "g-search-group-label" }, Xt = [
|
|
1567
1591
|
"id",
|
|
1568
1592
|
"onMousedown",
|
|
1569
1593
|
"aria-selected"
|
|
1570
|
-
],
|
|
1594
|
+
], Zt = [
|
|
1571
1595
|
"id",
|
|
1572
1596
|
"onMousedown",
|
|
1573
1597
|
"aria-selected"
|
|
1574
|
-
],
|
|
1598
|
+
], Qt = /* @__PURE__ */ u({
|
|
1575
1599
|
__name: "GSearch",
|
|
1576
1600
|
props: /* @__PURE__ */ m({
|
|
1577
1601
|
results: {},
|
|
@@ -1588,7 +1612,7 @@ var Mt = ["id"], Nt = {
|
|
|
1588
1612
|
}),
|
|
1589
1613
|
emits: /* @__PURE__ */ m(["select", "submit"], ["update:modelValue"]),
|
|
1590
1614
|
setup(t, { emit: n }) {
|
|
1591
|
-
let l =
|
|
1615
|
+
let l = V(t, "modelValue"), u = t, d = n, f = O(null), p = O(null), m = O(!0), h = O(-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);
|
|
1592
1616
|
function b(e) {
|
|
1593
1617
|
let t = e.target.value;
|
|
1594
1618
|
l.value = t, u.auto && t.length > 1 && (m.value = !1);
|
|
@@ -1599,7 +1623,7 @@ var Mt = ["id"], Nt = {
|
|
|
1599
1623
|
e && e.scrollIntoView({ block: "nearest" });
|
|
1600
1624
|
});
|
|
1601
1625
|
}
|
|
1602
|
-
let { focused: S } =
|
|
1626
|
+
let { focused: S } = ae(f);
|
|
1603
1627
|
function C(e) {
|
|
1604
1628
|
let t = e.altKey;
|
|
1605
1629
|
if (e.key === "ArrowDown") {
|
|
@@ -1608,10 +1632,10 @@ var Mt = ["id"], Nt = {
|
|
|
1608
1632
|
} else if (e.key === "ArrowUp") {
|
|
1609
1633
|
if (!y.value) return;
|
|
1610
1634
|
e.preventDefault(), m.value = !1, h.value = (h.value - 1 + y.value) % y.value, x();
|
|
1611
|
-
} else if (e.key === "Enter") m.value ? (d("submit", l.value), m.value = !1, e.preventDefault()) :
|
|
1635
|
+
} else if (e.key === "Enter") m.value ? (d("submit", l.value), m.value = !1, e.preventDefault()) : w(v.value[h.value]);
|
|
1612
1636
|
else if (e.key === "Escape") {
|
|
1613
1637
|
if (!y.value) return;
|
|
1614
|
-
e.preventDefault(),
|
|
1638
|
+
e.preventDefault(), D.value || (l.value = ""), m.value = !0, h.value = -1;
|
|
1615
1639
|
}
|
|
1616
1640
|
[
|
|
1617
1641
|
"Backspace",
|
|
@@ -1620,23 +1644,23 @@ var Mt = ["id"], Nt = {
|
|
|
1620
1644
|
"Undo"
|
|
1621
1645
|
].includes(e.key) && (m.value = !0);
|
|
1622
1646
|
}
|
|
1623
|
-
function
|
|
1647
|
+
function w(e) {
|
|
1624
1648
|
d("select", e), l.value = "", m.value = !0, h.value = -1;
|
|
1625
1649
|
}
|
|
1626
|
-
let E = r(() => !!u.loading),
|
|
1650
|
+
let E = r(() => !!u.loading), D = r(() => S.value && !m.value), j = ie(() => {
|
|
1627
1651
|
d("submit", l.value);
|
|
1628
1652
|
}, 300);
|
|
1629
|
-
|
|
1653
|
+
K(() => l.value, (e) => {
|
|
1630
1654
|
e ? u.auto && j() : h.value = -1;
|
|
1631
1655
|
});
|
|
1632
|
-
let M =
|
|
1633
|
-
return (t, n) => (
|
|
1656
|
+
let M = B();
|
|
1657
|
+
return (t, n) => (T(), o("div", {
|
|
1634
1658
|
class: "g-search",
|
|
1635
1659
|
role: "search",
|
|
1636
1660
|
"aria-label": u.label
|
|
1637
1661
|
}, [s("form", {
|
|
1638
1662
|
class: "g-search-form",
|
|
1639
|
-
onSubmit: n[0] ||=
|
|
1663
|
+
onSubmit: n[0] ||= X((e) => w(null), ["prevent"])
|
|
1640
1664
|
}, [s("input", {
|
|
1641
1665
|
ref_key: "inputRef",
|
|
1642
1666
|
ref: f,
|
|
@@ -1648,16 +1672,16 @@ var Mt = ["id"], Nt = {
|
|
|
1648
1672
|
onInput: b,
|
|
1649
1673
|
onKeydown: C,
|
|
1650
1674
|
role: "combobox",
|
|
1651
|
-
"aria-expanded":
|
|
1675
|
+
"aria-expanded": D.value,
|
|
1652
1676
|
"aria-autocomplete": "list",
|
|
1653
|
-
"aria-controls": `${
|
|
1677
|
+
"aria-controls": `${R(M)}-list`,
|
|
1654
1678
|
"aria-activedescendant": h.value >= 0 ? "g-search-option-" + v.value[h.value].id : void 0
|
|
1655
|
-
}, null, 40,
|
|
1679
|
+
}, null, 40, Wt), s("button", {
|
|
1656
1680
|
type: "submit",
|
|
1657
1681
|
class: "g-search-submit",
|
|
1658
1682
|
"aria-label": "Submit search",
|
|
1659
1683
|
onKeydown: C
|
|
1660
|
-
}, [E.value ? (
|
|
1684
|
+
}, [E.value ? (T(), i(wt, {
|
|
1661
1685
|
key: 0,
|
|
1662
1686
|
size: "tiny"
|
|
1663
1687
|
})) : a("", !0), n[1] ||= s("svg", {
|
|
@@ -1668,40 +1692,40 @@ var Mt = ["id"], Nt = {
|
|
|
1668
1692
|
}, [s("path", {
|
|
1669
1693
|
fill: "currentColor",
|
|
1670
1694
|
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"
|
|
1671
|
-
})], -1)], 32)], 32),
|
|
1695
|
+
})], -1)], 32)], 32), D.value ? (T(), o("div", Gt, [s("div", Kt, [E.value ? a("", !0) : (T(), o(e, { key: 0 }, [c(P(y.value) + " result" + P(y.value === 1 ? "" : "s"), 1)], 64))]), s("div", {
|
|
1672
1696
|
role: "listbox",
|
|
1673
|
-
id: `${
|
|
1697
|
+
id: `${R(M)}-list`,
|
|
1674
1698
|
ref_key: "listboxRef",
|
|
1675
1699
|
ref: p,
|
|
1676
1700
|
"aria-label": "Search results"
|
|
1677
|
-
}, [y.value > 0 && "items" in u.results[0] ? (
|
|
1701
|
+
}, [y.value > 0 && "items" in u.results[0] ? (T(!0), o(e, { key: 0 }, k(u.results, (n, r) => (T(), o("div", {
|
|
1678
1702
|
key: n.type,
|
|
1679
1703
|
class: "g-search-group",
|
|
1680
1704
|
role: "group",
|
|
1681
1705
|
"aria-label": n.label
|
|
1682
|
-
}, [
|
|
1706
|
+
}, [A(t.$slots, "group", { group: n }, () => [s("div", Yt, P(n.label), 1)]), (T(!0), o(e, null, k(n.items, (e, n) => (T(), o("div", {
|
|
1683
1707
|
key: e.id,
|
|
1684
1708
|
id: "g-search-option-" + e.id,
|
|
1685
1709
|
class: _(["g-search-option", { "g-search-option-active": v.value[h.value] && v.value[h.value].id === e.id }]),
|
|
1686
1710
|
role: "option",
|
|
1687
|
-
onMousedown:
|
|
1711
|
+
onMousedown: X((t) => w(e), ["prevent"]),
|
|
1688
1712
|
"aria-selected": v.value[h.value] && v.value[h.value].id === e.id
|
|
1689
|
-
}, [
|
|
1713
|
+
}, [A(t.$slots, "option", { option: e }, () => [c(P(e.title), 1)])], 42, Xt))), 128))], 8, Jt))), 128)) : y.value > 0 ? (T(!0), o(e, { key: 1 }, k(v.value, (e, n) => (T(), o("div", {
|
|
1690
1714
|
key: e.id,
|
|
1691
1715
|
id: "g-search-option-" + e.id,
|
|
1692
1716
|
class: _(["g-search-option", { "g-search-option-active": h.value === n }]),
|
|
1693
1717
|
role: "option",
|
|
1694
|
-
onMousedown:
|
|
1718
|
+
onMousedown: X((t) => w(e), ["prevent"]),
|
|
1695
1719
|
"aria-selected": h.value === n
|
|
1696
|
-
}, [
|
|
1720
|
+
}, [A(t.$slots, "option", { option: e }, () => [c(P(e.title), 1)])], 42, Zt))), 128)) : a("", !0)], 8, qt)])) : a("", !0)], 8, Ut));
|
|
1697
1721
|
}
|
|
1698
|
-
}),
|
|
1722
|
+
}), $t = { class: /* @__PURE__ */ _({ "g-app-header": !0 }) }, en = { class: "g-app-header__brand" }, tn = {
|
|
1699
1723
|
class: "g-app-header__brand-text",
|
|
1700
1724
|
href: "/"
|
|
1701
|
-
},
|
|
1725
|
+
}, nn = {
|
|
1702
1726
|
key: 0,
|
|
1703
1727
|
class: "g-app-header__block-i-container"
|
|
1704
|
-
},
|
|
1728
|
+
}, rn = { class: "g-app-header__title" }, an = { class: "g-app-header__app-controls-wrap" }, on = /* @__PURE__ */ u({
|
|
1705
1729
|
__name: "GAppHeader",
|
|
1706
1730
|
props: {
|
|
1707
1731
|
illinois: {
|
|
@@ -1711,10 +1735,10 @@ var Mt = ["id"], Nt = {
|
|
|
1711
1735
|
brand: { default: "GRAD" }
|
|
1712
1736
|
},
|
|
1713
1737
|
setup(e) {
|
|
1714
|
-
return (t, n) => (
|
|
1738
|
+
return (t, n) => (T(), o("header", $t, [
|
|
1715
1739
|
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),
|
|
1716
|
-
s("div",
|
|
1717
|
-
e.illinois ? (
|
|
1740
|
+
s("div", en, [A(t.$slots, "left", {}, () => [s("a", tn, P(e.brand), 1)])]),
|
|
1741
|
+
e.illinois ? (T(), o("div", nn, [...n[0] ||= [s("svg", {
|
|
1718
1742
|
class: "g-app-header__block-i",
|
|
1719
1743
|
role: "img",
|
|
1720
1744
|
width: "55",
|
|
@@ -1730,29 +1754,29 @@ var Mt = ["id"], Nt = {
|
|
|
1730
1754
|
class: "g-app-header__block-i-fill",
|
|
1731
1755
|
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"
|
|
1732
1756
|
})
|
|
1733
|
-
], -1)]])) :
|
|
1734
|
-
s("div",
|
|
1735
|
-
s("div",
|
|
1757
|
+
], -1)]])) : A(t.$slots, "icon", { key: 1 }),
|
|
1758
|
+
s("div", rn, [A(t.$slots, "title")]),
|
|
1759
|
+
s("div", an, [A(t.$slots, "app-controls", { class: "g-app-header__app-controls" })])
|
|
1736
1760
|
]));
|
|
1737
1761
|
}
|
|
1738
1762
|
});
|
|
1739
1763
|
//#endregion
|
|
1740
1764
|
//#region src/compose/useWebComponentSidebar.ts
|
|
1741
|
-
function
|
|
1765
|
+
function sn(e) {
|
|
1742
1766
|
return e.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
1743
1767
|
}
|
|
1744
|
-
function
|
|
1768
|
+
function cn() {
|
|
1745
1769
|
let e = globalThis;
|
|
1746
1770
|
return e.__GRAD_VUE_WC_SIDEBAR_CHANNELS__ ||= /* @__PURE__ */ new Map(), e.__GRAD_VUE_WC_SIDEBAR_CHANNELS__;
|
|
1747
1771
|
}
|
|
1748
|
-
function
|
|
1749
|
-
let n =
|
|
1772
|
+
function ln(e = "default", t = "(max-width: 800px)") {
|
|
1773
|
+
let n = cn(), r = e || "default";
|
|
1750
1774
|
if (!n.has(r)) {
|
|
1751
|
-
let e =
|
|
1775
|
+
let e = sn(r);
|
|
1752
1776
|
n.set(r, {
|
|
1753
1777
|
id: `g-wc-sidebar-${e}`,
|
|
1754
|
-
open:
|
|
1755
|
-
isCollapsible:
|
|
1778
|
+
open: O(!1),
|
|
1779
|
+
isCollapsible: se(t, { ssrWidth: 1e3 }),
|
|
1756
1780
|
toggle: () => void 0
|
|
1757
1781
|
});
|
|
1758
1782
|
}
|
|
@@ -1773,7 +1797,7 @@ function cn(e = "default", t = "(max-width: 800px)") {
|
|
|
1773
1797
|
}, 5));
|
|
1774
1798
|
}
|
|
1775
1799
|
return S(() => {
|
|
1776
|
-
|
|
1800
|
+
K(i.isCollapsible, (e) => {
|
|
1777
1801
|
e ? (document.addEventListener("mousedown", a), document.addEventListener("focusin", o)) : (document.removeEventListener("mousedown", a), document.removeEventListener("focusin", o));
|
|
1778
1802
|
}, { immediate: !0 });
|
|
1779
1803
|
}), x(() => {
|
|
@@ -1782,7 +1806,7 @@ function cn(e = "default", t = "(max-width: 800px)") {
|
|
|
1782
1806
|
}
|
|
1783
1807
|
//#endregion
|
|
1784
1808
|
//#region src/components/GSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1785
|
-
var
|
|
1809
|
+
var un = ["id"], dn = /* @__PURE__ */ u({
|
|
1786
1810
|
__name: "GSidebar",
|
|
1787
1811
|
props: {
|
|
1788
1812
|
backgroundColor: { default: "" },
|
|
@@ -1794,17 +1818,17 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1794
1818
|
sidebarKey: { default: "default" }
|
|
1795
1819
|
},
|
|
1796
1820
|
setup(e) {
|
|
1797
|
-
let t = e, n = p("sidebar", () => void 0, !0) ?? (
|
|
1821
|
+
let t = e, n = p("sidebar", () => void 0, !0) ?? (fe() ? ln(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 = B();
|
|
1798
1822
|
function l(e) {
|
|
1799
1823
|
e.key === "Escape" && n?.isCollapsible?.value && n?.open?.value && (n.open.value = !1, document.getElementById(`${n.id}-hamburger`)?.focus());
|
|
1800
1824
|
}
|
|
1801
|
-
return (t, r) => (
|
|
1825
|
+
return (t, r) => (T(), o("div", {
|
|
1802
1826
|
ref: "sidebar-ref",
|
|
1803
|
-
id: `${
|
|
1827
|
+
id: `${R(n)?.id ?? R(c)}-sidebar`,
|
|
1804
1828
|
class: _(["g-sidebar", [`g-sidebar__${e.theme}`, {
|
|
1805
|
-
"g-sidebar--collapsible":
|
|
1806
|
-
"g-sidebar--closed": !
|
|
1807
|
-
"g-sidebar--open":
|
|
1829
|
+
"g-sidebar--collapsible": R(n)?.isCollapsible?.value,
|
|
1830
|
+
"g-sidebar--closed": !R(n)?.open?.value && R(n)?.isCollapsible?.value,
|
|
1831
|
+
"g-sidebar--open": R(n)?.open?.value && R(n)?.isCollapsible?.value
|
|
1808
1832
|
}]]),
|
|
1809
1833
|
style: y({
|
|
1810
1834
|
backgroundImage: i.value,
|
|
@@ -1814,13 +1838,13 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1814
1838
|
width: "var(--g-sidebar-width)"
|
|
1815
1839
|
}),
|
|
1816
1840
|
onKeydown: l
|
|
1817
|
-
}, [
|
|
1841
|
+
}, [A(t.$slots, "default")], 46, un));
|
|
1818
1842
|
}
|
|
1819
|
-
}),
|
|
1843
|
+
}), fn = ["id"], pn = { class: "g-sidebar-menu__list" }, mn = [
|
|
1820
1844
|
"href",
|
|
1821
1845
|
"aria-current",
|
|
1822
1846
|
"onClick"
|
|
1823
|
-
],
|
|
1847
|
+
], hn = /* @__PURE__ */ u({
|
|
1824
1848
|
__name: "GSidebarMenu",
|
|
1825
1849
|
props: /* @__PURE__ */ m({
|
|
1826
1850
|
heading: {},
|
|
@@ -1844,9 +1868,9 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1844
1868
|
}),
|
|
1845
1869
|
emits: ["update:modelValue"],
|
|
1846
1870
|
setup(t) {
|
|
1847
|
-
let n = t, l =
|
|
1871
|
+
let n = t, l = V(t, "modelValue"), u = r(() => n.spy && l.value ? "#" + l.value : null), f = U("content");
|
|
1848
1872
|
S(() => {
|
|
1849
|
-
|
|
1873
|
+
K(l, () => {
|
|
1850
1874
|
g(() => {
|
|
1851
1875
|
let e = f.value?.querySelector(".g-sidebar-menu__is-active");
|
|
1852
1876
|
e && e.scrollIntoView({ block: "nearest" });
|
|
@@ -1859,57 +1883,57 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1859
1883
|
let n = t.href.slice(1), r = document.getElementById(n)?.querySelector("h2, h3, h4, h5");
|
|
1860
1884
|
r && (e.preventDefault(), r.setAttribute("tabindex", "-1"), r.focus(), r.scrollIntoView({ block: "start" }), history.replaceState(null, "", t.href));
|
|
1861
1885
|
}
|
|
1862
|
-
let y =
|
|
1863
|
-
return (r, l) => (
|
|
1864
|
-
"aria-labelledby": t.heading ?
|
|
1886
|
+
let y = B();
|
|
1887
|
+
return (r, l) => (T(), o("nav", h({ class: ["g-sidebar-menu", [`g-sidebar-menu__${n.theme}`, { "g-sidebar-menu--compact": n.compact }]] }, {
|
|
1888
|
+
"aria-labelledby": t.heading ? R(y) : void 0,
|
|
1865
1889
|
"aria-label": t.heading ? void 0 : "Sidebar Menu"
|
|
1866
1890
|
}), [
|
|
1867
|
-
t.heading ? (
|
|
1891
|
+
t.heading ? (T(), o("h2", {
|
|
1868
1892
|
key: 0,
|
|
1869
|
-
id:
|
|
1893
|
+
id: R(y),
|
|
1870
1894
|
class: "g-sidebar-menu__title"
|
|
1871
|
-
},
|
|
1895
|
+
}, P(t.heading), 9, fn)) : a("", !0),
|
|
1872
1896
|
l[0] ||= s("div", { class: "g-sidebar-menu__divider" }, null, -1),
|
|
1873
1897
|
s("div", {
|
|
1874
1898
|
class: "g-sidebar-menu__content",
|
|
1875
1899
|
ref_key: "content",
|
|
1876
1900
|
ref: f
|
|
1877
|
-
}, [s("ul",
|
|
1901
|
+
}, [s("ul", pn, [(T(!0), o(e, null, k(t.items, (e) => (T(), o("li", {
|
|
1878
1902
|
key: e.href || e.to,
|
|
1879
1903
|
class: "g-sidebar-menu__item",
|
|
1880
1904
|
ref_for: !0,
|
|
1881
1905
|
ref: "listItems"
|
|
1882
|
-
}, [e.to && m.value ? (
|
|
1906
|
+
}, [e.to && m.value ? (T(), i(j(m.value), {
|
|
1883
1907
|
key: 0,
|
|
1884
1908
|
class: "g-sidebar-menu__link",
|
|
1885
1909
|
to: e.to
|
|
1886
1910
|
}, {
|
|
1887
|
-
default:
|
|
1911
|
+
default: J(() => [c(P(e.label), 1)]),
|
|
1888
1912
|
_: 2
|
|
1889
|
-
}, 1032, ["to"])) : (
|
|
1913
|
+
}, 1032, ["to"])) : (T(), o("a", {
|
|
1890
1914
|
key: 1,
|
|
1891
1915
|
class: _(["g-sidebar-menu__link", { "g-sidebar-menu__is-active": u.value === (e.href || "") }]),
|
|
1892
1916
|
href: e.href || e.to || "#",
|
|
1893
1917
|
"aria-current": u.value === (e.href || "") ? "location" : void 0,
|
|
1894
1918
|
onClick: (t) => v(t, e)
|
|
1895
|
-
},
|
|
1919
|
+
}, P(e.label), 11, mn))]))), 128))])], 512)
|
|
1896
1920
|
], 16));
|
|
1897
1921
|
}
|
|
1898
|
-
}),
|
|
1922
|
+
}), gn = {
|
|
1899
1923
|
mounted(e, t) {
|
|
1900
|
-
let n =
|
|
1901
|
-
n.value || (n.value =
|
|
1902
|
-
n.value && (r.value || i.value) &&
|
|
1924
|
+
let n = O(null), r = O(!1), i = O(!1), a = O(t.value), o = null, s = !1, c = st(e), l = () => {
|
|
1925
|
+
n.value || (n.value = ct(a.value, c), lt(n.value), o = new ResizeObserver(() => {
|
|
1926
|
+
n.value && (r.value || i.value) && ut(e, n.value);
|
|
1903
1927
|
}), o.observe(n.value));
|
|
1904
1928
|
};
|
|
1905
|
-
|
|
1929
|
+
q(() => {
|
|
1906
1930
|
n.value && (n.value.textContent = a.value);
|
|
1907
1931
|
});
|
|
1908
1932
|
let u = () => {
|
|
1909
|
-
n.value && (r.value || i.value) &&
|
|
1933
|
+
n.value && (r.value || i.value) && ut(e, n.value);
|
|
1910
1934
|
};
|
|
1911
|
-
|
|
1912
|
-
r.value || i.value ? (l(), n.value &&
|
|
1935
|
+
q(() => {
|
|
1936
|
+
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(() => {
|
|
1913
1937
|
e.dispatchEvent(new CustomEvent("tooltip-hide"));
|
|
1914
1938
|
}, 150)));
|
|
1915
1939
|
});
|
|
@@ -1947,7 +1971,7 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1947
1971
|
let t = e._v_gtooltip;
|
|
1948
1972
|
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");
|
|
1949
1973
|
}
|
|
1950
|
-
},
|
|
1974
|
+
}, _n = { class: "g-clipboard-text" }, vn = /* @__PURE__ */ u({
|
|
1951
1975
|
__name: "GClipboard",
|
|
1952
1976
|
props: {
|
|
1953
1977
|
text: {},
|
|
@@ -1955,12 +1979,12 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1955
1979
|
copyLabel: {}
|
|
1956
1980
|
},
|
|
1957
1981
|
setup(t) {
|
|
1958
|
-
let n = t, r =
|
|
1982
|
+
let n = t, r = gn, { text: i, copy: l, copied: u, isSupported: d } = re({ source: n.text }), f = O(n.copyLabel ?? "Copy to clipboard"), p = () => {
|
|
1959
1983
|
d.value ? (l(), f.value = "Copied") : f.value = "Copy not supported";
|
|
1960
1984
|
}, m = () => {
|
|
1961
1985
|
f.value = n.copyLabel ?? "Copy to clipboard";
|
|
1962
1986
|
};
|
|
1963
|
-
return (i, l) => (
|
|
1987
|
+
return (i, l) => (T(), o("div", _n, [t.hideText ? a("", !0) : (T(), o(e, { key: 0 }, [c(P(n.text), 1)], 64)), Y((T(), o("button", {
|
|
1964
1988
|
type: "button",
|
|
1965
1989
|
"aria-label": "Copy",
|
|
1966
1990
|
onClick: p,
|
|
@@ -1975,24 +1999,24 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
1975
1999
|
}, [s("path", {
|
|
1976
2000
|
fill: "currentColor",
|
|
1977
2001
|
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"
|
|
1978
|
-
})], -1)]], 32)), [[
|
|
2002
|
+
})], -1)]], 32)), [[R(r), f.value]])]));
|
|
1979
2003
|
}
|
|
1980
|
-
}),
|
|
2004
|
+
}), yn = { class: "g-history-scroller-wrapper" }, bn = {
|
|
1981
2005
|
key: 0,
|
|
1982
2006
|
class: "g-history-shadow g-history-shadow--top",
|
|
1983
2007
|
"aria-hidden": "true"
|
|
1984
|
-
},
|
|
2008
|
+
}, xn = {
|
|
1985
2009
|
key: 1,
|
|
1986
2010
|
class: "g-history-shadow g-history-shadow--bottom",
|
|
1987
2011
|
"aria-hidden": "true"
|
|
1988
|
-
},
|
|
2012
|
+
}, Sn = ["role", "aria-label"], Cn = /* @__PURE__ */ u({
|
|
1989
2013
|
__name: "GHistoryScroller",
|
|
1990
2014
|
props: {
|
|
1991
2015
|
label: {},
|
|
1992
2016
|
entries: { default: () => [] }
|
|
1993
2017
|
},
|
|
1994
2018
|
setup(t) {
|
|
1995
|
-
let n = t, i =
|
|
2019
|
+
let n = t, i = O(null), c = O(null), u = O(!0), d = O(!0);
|
|
1996
2020
|
async function f({ focusLast: e = !1 } = {}) {
|
|
1997
2021
|
if (i.value && (i.value.scrollTop = i.value.scrollHeight), e && c.value) {
|
|
1998
2022
|
let e = c.value.querySelectorAll(".g-history-entry");
|
|
@@ -2009,17 +2033,17 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2009
2033
|
}
|
|
2010
2034
|
S(() => {
|
|
2011
2035
|
g(f);
|
|
2012
|
-
}),
|
|
2036
|
+
}), le(i, () => {
|
|
2013
2037
|
u.value && f();
|
|
2014
|
-
}),
|
|
2038
|
+
}), le(c, () => {
|
|
2015
2039
|
u.value && f();
|
|
2016
|
-
}),
|
|
2040
|
+
}), K(() => n.entries, async () => {
|
|
2017
2041
|
u.value && (await g(), f());
|
|
2018
2042
|
});
|
|
2019
2043
|
let m = r(() => [...n.entries].reverse());
|
|
2020
|
-
return (n, r) => (
|
|
2021
|
-
d.value ? a("", !0) : (
|
|
2022
|
-
u.value ? a("", !0) : (
|
|
2044
|
+
return (n, r) => (T(), o("div", yn, [
|
|
2045
|
+
d.value ? a("", !0) : (T(), o("div", bn)),
|
|
2046
|
+
u.value ? a("", !0) : (T(), o("div", xn)),
|
|
2023
2047
|
s("div", {
|
|
2024
2048
|
ref_key: "scrollerRef",
|
|
2025
2049
|
ref: i,
|
|
@@ -2034,7 +2058,7 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2034
2058
|
onClick: r[0] ||= () => f({ focusLast: !0 }),
|
|
2035
2059
|
"aria-label": "Jump to Latest"
|
|
2036
2060
|
}, {
|
|
2037
|
-
default:
|
|
2061
|
+
default: J(() => [...r[1] ||= [s("svg", {
|
|
2038
2062
|
"aria-hidden": "true",
|
|
2039
2063
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2040
2064
|
viewBox: "0 0 640 640",
|
|
@@ -2049,36 +2073,36 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2049
2073
|
ref_key: "contentRef",
|
|
2050
2074
|
ref: c,
|
|
2051
2075
|
class: "g-history-list"
|
|
2052
|
-
}, [(
|
|
2076
|
+
}, [(T(!0), o(e, null, k(m.value, (e) => (T(), o("div", {
|
|
2053
2077
|
role: "listitem",
|
|
2054
2078
|
key: e.id,
|
|
2055
2079
|
class: "g-history-entry",
|
|
2056
2080
|
tabindex: "-1"
|
|
2057
|
-
}, [
|
|
2081
|
+
}, [A(n.$slots, "default", { entry: e })]))), 128))], 512)], 40, Sn)
|
|
2058
2082
|
]));
|
|
2059
2083
|
}
|
|
2060
|
-
}),
|
|
2084
|
+
}), wn = { class: "g-three-way-toggle-wrapper" }, Tn = { class: "g-three-way-toggle-control" }, En = ["id"], Dn = [
|
|
2061
2085
|
"aria-labelledby",
|
|
2062
2086
|
"aria-describedby",
|
|
2063
2087
|
"disabled",
|
|
2064
2088
|
"aria-invalid",
|
|
2065
2089
|
"aria-errormessage"
|
|
2066
|
-
],
|
|
2090
|
+
], On = { key: 0 }, kn = { key: 1 }, An = { key: 2 }, jn = ["for"], Mn = [
|
|
2067
2091
|
"id",
|
|
2068
2092
|
"name",
|
|
2069
2093
|
"checked",
|
|
2070
2094
|
"disabled"
|
|
2071
|
-
],
|
|
2095
|
+
], Nn = ["for"], Pn = [
|
|
2072
2096
|
"id",
|
|
2073
2097
|
"name",
|
|
2074
2098
|
"checked",
|
|
2075
2099
|
"disabled"
|
|
2076
|
-
],
|
|
2100
|
+
], Fn = ["for"], In = [
|
|
2077
2101
|
"id",
|
|
2078
2102
|
"name",
|
|
2079
2103
|
"checked",
|
|
2080
2104
|
"disabled"
|
|
2081
|
-
],
|
|
2105
|
+
], Ln = ["id"], Rn = /* @__PURE__ */ u({
|
|
2082
2106
|
__name: "GThreeWayToggle",
|
|
2083
2107
|
props: /* @__PURE__ */ m({
|
|
2084
2108
|
label: {},
|
|
@@ -2094,7 +2118,7 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2094
2118
|
}),
|
|
2095
2119
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
2096
2120
|
setup(e, { emit: t }) {
|
|
2097
|
-
let n = e, i =
|
|
2121
|
+
let n = e, i = V(e, "modelValue"), l = t;
|
|
2098
2122
|
function u(e) {
|
|
2099
2123
|
let t = i.value;
|
|
2100
2124
|
i.value = e, e !== t && l("change", {
|
|
@@ -2108,112 +2132,112 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2108
2132
|
function f(e) {
|
|
2109
2133
|
n.disabled || i.value === e && u(null);
|
|
2110
2134
|
}
|
|
2111
|
-
let p =
|
|
2135
|
+
let p = B(), m = r(() => `g-three-way-toggle-${p}`), h = B(), g = B(), v = B(), y = r(() => i.value === !1 ? "g-left" : i.value === !0 ? "g-right" : "g-center");
|
|
2112
2136
|
function b(e) {
|
|
2113
2137
|
n.disabled || (e.key === "n" || e.key === "N" ? (u(!1), e.preventDefault()) : (e.key === "y" || e.key === "Y") && (u(!0), e.preventDefault()));
|
|
2114
2138
|
}
|
|
2115
|
-
return (t, n) => (
|
|
2139
|
+
return (t, n) => (T(), o("div", wn, [s("div", Tn, [s("span", {
|
|
2116
2140
|
class: "g-label",
|
|
2117
|
-
id:
|
|
2118
|
-
}, [
|
|
2141
|
+
id: R(p)
|
|
2142
|
+
}, [A(t.$slots, "label", {}, () => [c(P(e.label), 1)])], 8, En), s("fieldset", {
|
|
2119
2143
|
class: _(["g-three-way-toggle", { "g-has-error": e.error }]),
|
|
2120
2144
|
role: "radiogroup",
|
|
2121
|
-
"aria-labelledby":
|
|
2145
|
+
"aria-labelledby": R(p),
|
|
2122
2146
|
"aria-describedby": e.describedby,
|
|
2123
2147
|
disabled: e.disabled,
|
|
2124
2148
|
"aria-invalid": e.error ? "true" : void 0,
|
|
2125
|
-
"aria-errormessage": e.error ?
|
|
2149
|
+
"aria-errormessage": e.error ? R(p) + "-error" : void 0
|
|
2126
2150
|
}, [s("div", { class: _(["g-toggle-track", [y.value, { "g-disabled": e.disabled }]]) }, [
|
|
2127
2151
|
s("span", {
|
|
2128
2152
|
class: _(["g-toggle-thumb", y.value]),
|
|
2129
2153
|
"aria-hidden": "true"
|
|
2130
|
-
}, [i.value === !1 ? (
|
|
2154
|
+
}, [i.value === !1 ? (T(), o("span", On, "NO")) : i.value === !0 ? (T(), o("span", kn, "YES")) : (T(), o("span", An))], 2),
|
|
2131
2155
|
s("label", {
|
|
2132
|
-
for:
|
|
2156
|
+
for: R(h),
|
|
2133
2157
|
class: "g-toggle-option g-left",
|
|
2134
2158
|
onClick: n[1] ||= (e) => f(!1),
|
|
2135
2159
|
onKeydown: b
|
|
2136
2160
|
}, [s("input", {
|
|
2137
2161
|
type: "radio",
|
|
2138
|
-
id:
|
|
2162
|
+
id: R(h),
|
|
2139
2163
|
name: m.value,
|
|
2140
2164
|
checked: i.value === !1,
|
|
2141
2165
|
value: "false",
|
|
2142
2166
|
disabled: e.disabled,
|
|
2143
2167
|
onChange: n[0] ||= (e) => d(!1)
|
|
2144
|
-
}, null, 40,
|
|
2168
|
+
}, null, 40, Mn), n[5] ||= s("span", { class: "ilw-sr-only" }, "No", -1)], 40, jn),
|
|
2145
2169
|
s("label", {
|
|
2146
|
-
for:
|
|
2170
|
+
for: R(g),
|
|
2147
2171
|
class: "g-toggle-option g-center",
|
|
2148
2172
|
onKeydown: b
|
|
2149
2173
|
}, [s("input", {
|
|
2150
2174
|
type: "radio",
|
|
2151
|
-
id:
|
|
2175
|
+
id: R(g),
|
|
2152
2176
|
name: m.value,
|
|
2153
2177
|
checked: i.value === null,
|
|
2154
2178
|
disabled: e.disabled,
|
|
2155
2179
|
onChange: n[2] ||= (e) => d(null)
|
|
2156
|
-
}, null, 40,
|
|
2180
|
+
}, null, 40, Pn), n[6] ||= s("span", { class: "ilw-sr-only" }, "Unset", -1)], 40, Nn),
|
|
2157
2181
|
s("label", {
|
|
2158
|
-
for:
|
|
2182
|
+
for: R(v),
|
|
2159
2183
|
class: "g-toggle-option g-right",
|
|
2160
2184
|
onClick: n[4] ||= (e) => f(!0),
|
|
2161
2185
|
onKeydown: b
|
|
2162
2186
|
}, [s("input", {
|
|
2163
2187
|
type: "radio",
|
|
2164
|
-
id:
|
|
2188
|
+
id: R(v),
|
|
2165
2189
|
name: m.value,
|
|
2166
2190
|
value: "true",
|
|
2167
2191
|
checked: i.value === !0,
|
|
2168
2192
|
disabled: e.disabled,
|
|
2169
2193
|
onChange: n[3] ||= (e) => d(!0)
|
|
2170
|
-
}, null, 40,
|
|
2171
|
-
], 2)], 10,
|
|
2194
|
+
}, null, 40, In), n[7] ||= s("span", { class: "ilw-sr-only" }, "Yes", -1)], 40, Fn)
|
|
2195
|
+
], 2)], 10, Dn)]), e.error ? (T(), o("div", {
|
|
2172
2196
|
key: 0,
|
|
2173
|
-
id: `${
|
|
2197
|
+
id: `${R(p)}-error`,
|
|
2174
2198
|
class: "g-form-error",
|
|
2175
2199
|
role: "alert",
|
|
2176
2200
|
"aria-atomic": "true"
|
|
2177
|
-
},
|
|
2201
|
+
}, P(e.error), 9, Ln)) : a("", !0)]));
|
|
2178
2202
|
}
|
|
2179
|
-
}),
|
|
2203
|
+
}), zn = {
|
|
2180
2204
|
ref: "tableBodyRef",
|
|
2181
2205
|
class: "efficient-table-body"
|
|
2182
|
-
},
|
|
2206
|
+
}, Bn = ["aria-rowindex"], Vn = {
|
|
2183
2207
|
key: 0,
|
|
2184
2208
|
class: "table-group-checkbox"
|
|
2185
|
-
},
|
|
2209
|
+
}, Hn = ["colspan"], Un = [
|
|
2186
2210
|
"aria-rowindex",
|
|
2187
2211
|
"onMousedown",
|
|
2188
2212
|
"onClick"
|
|
2189
|
-
],
|
|
2213
|
+
], Wn = [
|
|
2190
2214
|
"checked",
|
|
2191
2215
|
"onClick",
|
|
2192
2216
|
"aria-label",
|
|
2193
2217
|
"name"
|
|
2194
|
-
],
|
|
2218
|
+
], Gn = ["id"], Kn = {
|
|
2195
2219
|
key: 0,
|
|
2196
2220
|
class: "editable-cell"
|
|
2197
|
-
},
|
|
2221
|
+
}, qn = {
|
|
2198
2222
|
key: 0,
|
|
2199
2223
|
class: "cell-prefix"
|
|
2200
|
-
},
|
|
2224
|
+
}, Jn = [
|
|
2201
2225
|
"value",
|
|
2202
2226
|
"onChange",
|
|
2203
2227
|
"aria-labelledby",
|
|
2204
2228
|
"aria-invalid",
|
|
2205
2229
|
"name"
|
|
2206
|
-
],
|
|
2230
|
+
], Yn = ["value"], Xn = [
|
|
2207
2231
|
"value",
|
|
2208
2232
|
"onInput",
|
|
2209
2233
|
"aria-labelledby",
|
|
2210
2234
|
"aria-invalid",
|
|
2211
2235
|
"aria-errormessage",
|
|
2212
2236
|
"name"
|
|
2213
|
-
],
|
|
2237
|
+
], Zn = {
|
|
2214
2238
|
key: 3,
|
|
2215
2239
|
class: "cell-suffix"
|
|
2216
|
-
},
|
|
2240
|
+
}, Qn = ["id"], $n = /* @__PURE__ */ u({
|
|
2217
2241
|
__name: "GTableBody",
|
|
2218
2242
|
props: {
|
|
2219
2243
|
data: {},
|
|
@@ -2282,13 +2306,13 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2282
2306
|
function C(e, t) {
|
|
2283
2307
|
if (l.changeTracker) return l.changeTracker.getError(e.key, t.key);
|
|
2284
2308
|
}
|
|
2285
|
-
return (n, r) => (
|
|
2309
|
+
return (n, r) => (T(), o("tbody", zn, [(T(!0), o(e, null, k(t.data, (n, l) => (T(), o(e, { key: n.key }, [t.groupBy && (l === 0 || n[t.groupBy] !== t.data[l - 1][t.groupBy]) ? (T(), o("tr", {
|
|
2286
2310
|
key: 0,
|
|
2287
2311
|
"aria-rowindex": t.startIndex + l + 2
|
|
2288
|
-
}, [t.bulkSelectionEnabled ? (
|
|
2312
|
+
}, [t.bulkSelectionEnabled ? (T(), o("td", Vn)) : a("", !0), s("td", {
|
|
2289
2313
|
colspan: t.columns.length,
|
|
2290
2314
|
class: "table-group-row"
|
|
2291
|
-
}, [t.groupRender ? (
|
|
2315
|
+
}, [t.groupRender ? (T(), i(j(t.groupRender(n[t.groupBy], n)), { key: 0 })) : (T(), o(e, { key: 1 }, [c(P(n[t.groupBy]), 1)], 64))], 8, Hn)], 8, Bn)) : a("", !0), s("tr", {
|
|
2292
2316
|
class: _([
|
|
2293
2317
|
"efficient-table-row",
|
|
2294
2318
|
{
|
|
@@ -2300,10 +2324,10 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2300
2324
|
"aria-rowindex": t.startIndex + l + 2,
|
|
2301
2325
|
onMousedown: (e) => d(e, n.key),
|
|
2302
2326
|
onClick: (e) => f(e, n.key)
|
|
2303
|
-
}, [t.bulkSelectionEnabled ? (
|
|
2327
|
+
}, [t.bulkSelectionEnabled ? (T(), o("td", {
|
|
2304
2328
|
key: 0,
|
|
2305
2329
|
class: "td-checkbox",
|
|
2306
|
-
onClick: r[0] ||=
|
|
2330
|
+
onClick: r[0] ||= X(() => {}, ["stop"])
|
|
2307
2331
|
}, [s("input", {
|
|
2308
2332
|
type: "checkbox",
|
|
2309
2333
|
checked: p(n.key),
|
|
@@ -2311,7 +2335,7 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2311
2335
|
"aria-label": `Select row ${n.key}`,
|
|
2312
2336
|
name: `row-${n.key}-checkbox`,
|
|
2313
2337
|
class: "g-bulk-select-checkbox"
|
|
2314
|
-
}, null, 8,
|
|
2338
|
+
}, null, 8, Wn)])) : a("", !0), (T(!0), o(e, null, k(t.columns, (r) => (T(), o("td", {
|
|
2315
2339
|
key: r.key,
|
|
2316
2340
|
id: b(r) ? `${t.tableId}-td-${n.key}-${String(r.key)}` : void 0,
|
|
2317
2341
|
class: _([
|
|
@@ -2320,9 +2344,9 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2320
2344
|
S(n, r) ? "g-cell-error" : "",
|
|
2321
2345
|
typeof r.tdClass == "function" ? r.tdClass(n) : r.tdClass
|
|
2322
2346
|
])
|
|
2323
|
-
}, [r.editable ? (
|
|
2324
|
-
r.editable.prefix ? (
|
|
2325
|
-
r.editable.type === "select" ? (
|
|
2347
|
+
}, [r.editable ? (T(), o("div", Kn, [
|
|
2348
|
+
r.editable.prefix ? (T(), o("span", qn, P(r.editable.prefix), 1)) : a("", !0),
|
|
2349
|
+
r.editable.type === "select" ? (T(), o("select", {
|
|
2326
2350
|
key: 1,
|
|
2327
2351
|
value: n[r.key],
|
|
2328
2352
|
onChange: (e) => g(e, n, r),
|
|
@@ -2330,10 +2354,10 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2330
2354
|
"aria-invalid": S(n, r),
|
|
2331
2355
|
name: `row-${n.key}-${String(r.key)}-select`,
|
|
2332
2356
|
class: "editable-input editable-select"
|
|
2333
|
-
}, [(
|
|
2357
|
+
}, [(T(!0), o(e, null, k(r.editable.options, (e) => (T(), o("option", {
|
|
2334
2358
|
key: e.value,
|
|
2335
2359
|
value: e.value
|
|
2336
|
-
},
|
|
2360
|
+
}, P(e.label), 9, Yn))), 128))], 40, Jn)) : (T(), o("input", h({
|
|
2337
2361
|
key: 2,
|
|
2338
2362
|
value: n[r.key]
|
|
2339
2363
|
}, { ref_for: !0 }, r.editable.inputAttributes, {
|
|
@@ -2347,24 +2371,24 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2347
2371
|
paddingLeft: r.editable.prefix ? "1.5rem" : void 0,
|
|
2348
2372
|
paddingRight: r.editable.suffix ? "2rem" : void 0
|
|
2349
2373
|
}
|
|
2350
|
-
}), null, 16,
|
|
2351
|
-
r.editable.suffix ? (
|
|
2352
|
-
])) : r.display ? (
|
|
2374
|
+
}), null, 16, Xn)),
|
|
2375
|
+
r.editable.suffix ? (T(), o("span", Zn, P(r.editable.suffix), 1)) : a("", !0)
|
|
2376
|
+
])) : r.display ? (T(), i(j(r.display(n)), { key: 1 })) : (T(), o(e, { key: 2 }, [c(P(n[r.key]), 1)], 64)), S(n, r) ? (T(), o("div", {
|
|
2353
2377
|
key: 3,
|
|
2354
2378
|
role: "alert",
|
|
2355
2379
|
class: "g-cell-error-message",
|
|
2356
2380
|
id: `${t.tableId}-error-${n.key}-${String(r.key)}`
|
|
2357
|
-
},
|
|
2381
|
+
}, P(C(n, r)), 9, Qn)) : a("", !0)], 10, Gn))), 128))], 42, Un)], 64))), 128))], 512));
|
|
2358
2382
|
}
|
|
2359
|
-
}),
|
|
2383
|
+
}), er = ["id", "for"], tr = {
|
|
2360
2384
|
key: 0,
|
|
2361
2385
|
class: "g-multiselect-required",
|
|
2362
2386
|
"aria-hidden": "true"
|
|
2363
|
-
},
|
|
2387
|
+
}, nr = ["id"], rr = ["aria-labelledby"], ir = { class: "g-multiselect-chip-label" }, ar = [
|
|
2364
2388
|
"aria-label",
|
|
2365
2389
|
"disabled",
|
|
2366
2390
|
"onClick"
|
|
2367
|
-
],
|
|
2391
|
+
], or = [
|
|
2368
2392
|
"id",
|
|
2369
2393
|
"value",
|
|
2370
2394
|
"placeholder",
|
|
@@ -2374,23 +2398,23 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2374
2398
|
"aria-activedescendant",
|
|
2375
2399
|
"aria-describedby",
|
|
2376
2400
|
"aria-required"
|
|
2377
|
-
],
|
|
2401
|
+
], sr = ["id"], cr = [
|
|
2378
2402
|
"id",
|
|
2379
2403
|
"aria-selected",
|
|
2380
2404
|
"onClick"
|
|
2381
|
-
],
|
|
2405
|
+
], lr = {
|
|
2382
2406
|
class: "g-multiselect-option-check",
|
|
2383
2407
|
"aria-hidden": "true"
|
|
2384
|
-
},
|
|
2408
|
+
}, ur = {
|
|
2385
2409
|
key: 0,
|
|
2386
2410
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2387
2411
|
viewBox: "0 0 640 640",
|
|
2388
2412
|
width: "1.25em"
|
|
2389
|
-
},
|
|
2413
|
+
}, dr = {
|
|
2390
2414
|
key: 1,
|
|
2391
2415
|
"aria-live": "polite",
|
|
2392
2416
|
class: "g-multiselect-option g-multiselect-no-results"
|
|
2393
|
-
},
|
|
2417
|
+
}, fr = /* @__PURE__ */ u({
|
|
2394
2418
|
__name: "GMultiSelect",
|
|
2395
2419
|
props: /* @__PURE__ */ m({
|
|
2396
2420
|
options: {},
|
|
@@ -2418,54 +2442,54 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2418
2442
|
}),
|
|
2419
2443
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
2420
2444
|
setup(t, { emit: n }) {
|
|
2421
|
-
let i = t, u = n, d =
|
|
2445
|
+
let i = t, u = n, d = V(t, "modelValue"), f = B(), p = O(null), m = O(null), v = O(null), y = O(!1), b = O(0), x = O(""), S = O(!1), { displayErrors: C, hasErrors: w } = $({
|
|
2422
2446
|
name: i.name,
|
|
2423
2447
|
value: d,
|
|
2424
|
-
errors:
|
|
2448
|
+
errors: I(i, "errors"),
|
|
2425
2449
|
formKey: i.formKey
|
|
2426
|
-
}), { menuPlacement: E, menuStyle:
|
|
2450
|
+
}), { menuPlacement: E, menuStyle: D, isTop: A, scrollOptionIntoView: j } = Mt({
|
|
2427
2451
|
open: y,
|
|
2428
2452
|
anchorRef: m,
|
|
2429
2453
|
listboxRef: v,
|
|
2430
2454
|
baseId: f,
|
|
2431
2455
|
activeIndex: b
|
|
2432
|
-
}), M = r(() =>
|
|
2456
|
+
}), M = r(() => jt(i.options)), N = r(() => {
|
|
2433
2457
|
if (!x.value) return M.value;
|
|
2434
2458
|
let e = x.value.toLowerCase();
|
|
2435
2459
|
return M.value.filter((t) => t.label.toLowerCase().includes(e));
|
|
2436
2460
|
});
|
|
2437
|
-
function
|
|
2461
|
+
function F(e) {
|
|
2438
2462
|
return d.value.includes(e);
|
|
2439
2463
|
}
|
|
2440
|
-
function
|
|
2464
|
+
function L(e) {
|
|
2441
2465
|
let t = M.value.find((t) => t.value === e);
|
|
2442
2466
|
return t ? t.label : String(e);
|
|
2443
2467
|
}
|
|
2444
|
-
function
|
|
2468
|
+
function z() {
|
|
2445
2469
|
i.disabled || (y.value = !0, b.value = 0);
|
|
2446
2470
|
}
|
|
2447
2471
|
function H() {
|
|
2448
2472
|
y.value = !1, x.value = "";
|
|
2449
2473
|
}
|
|
2450
2474
|
function U(e) {
|
|
2451
|
-
let t =
|
|
2475
|
+
let t = N.value[e];
|
|
2452
2476
|
if (!t) return;
|
|
2453
|
-
let n = d.value, r =
|
|
2477
|
+
let n = d.value, r = F(t.value) ? n.filter((e) => e !== t.value) : [...n, t.value];
|
|
2454
2478
|
d.value = r, u("change", r), g(() => p.value?.focus());
|
|
2455
2479
|
}
|
|
2456
|
-
function
|
|
2480
|
+
function W(e) {
|
|
2457
2481
|
if (i.disabled) return;
|
|
2458
2482
|
let t = d.value.filter((t) => t !== e);
|
|
2459
2483
|
d.value = t, u("change", t);
|
|
2460
2484
|
}
|
|
2461
2485
|
function K() {
|
|
2462
|
-
i.disabled || (p.value?.focus(), y.value ||
|
|
2486
|
+
i.disabled || (p.value?.focus(), y.value || z());
|
|
2463
2487
|
}
|
|
2464
2488
|
function q(e) {
|
|
2465
|
-
x.value = e.target.value, b.value = 0, y.value ||
|
|
2489
|
+
x.value = e.target.value, b.value = 0, y.value || z();
|
|
2466
2490
|
}
|
|
2467
|
-
function
|
|
2468
|
-
i.disabled || y.value ||
|
|
2491
|
+
function J() {
|
|
2492
|
+
i.disabled || y.value || z();
|
|
2469
2493
|
}
|
|
2470
2494
|
function ee(e) {
|
|
2471
2495
|
if (S.value) {
|
|
@@ -2483,13 +2507,13 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2483
2507
|
}
|
|
2484
2508
|
function ne(e) {
|
|
2485
2509
|
if (i.disabled) return;
|
|
2486
|
-
let t =
|
|
2510
|
+
let t = N.value.length - 1;
|
|
2487
2511
|
switch (e.key) {
|
|
2488
2512
|
case "ArrowDown":
|
|
2489
|
-
e.preventDefault(), y.value ? (b.value = Math.min(t, b.value + 1), j()) :
|
|
2513
|
+
e.preventDefault(), y.value ? (b.value = Math.min(t, b.value + 1), j()) : z();
|
|
2490
2514
|
break;
|
|
2491
2515
|
case "ArrowUp":
|
|
2492
|
-
e.preventDefault(), y.value ? (b.value = Math.max(0, b.value - 1), j()) :
|
|
2516
|
+
e.preventDefault(), y.value ? (b.value = Math.max(0, b.value - 1), j()) : z();
|
|
2493
2517
|
break;
|
|
2494
2518
|
case "Home":
|
|
2495
2519
|
e.preventDefault(), b.value = 0, j();
|
|
@@ -2498,38 +2522,38 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2498
2522
|
e.preventDefault(), b.value = t, j();
|
|
2499
2523
|
break;
|
|
2500
2524
|
case "Enter":
|
|
2501
|
-
e.preventDefault(), y.value &&
|
|
2525
|
+
e.preventDefault(), y.value && N.value.length > 0 ? U(b.value) : y.value || z();
|
|
2502
2526
|
break;
|
|
2503
2527
|
case " ":
|
|
2504
|
-
y.value && !x.value && (e.preventDefault(),
|
|
2528
|
+
y.value && !x.value && (e.preventDefault(), N.value.length > 0 && U(b.value));
|
|
2505
2529
|
break;
|
|
2506
2530
|
case "Escape":
|
|
2507
2531
|
A.value && (e.preventDefault(), setTimeout(() => H(), 0));
|
|
2508
2532
|
break;
|
|
2509
2533
|
case "Backspace":
|
|
2510
|
-
!x.value && d.value.length > 0 &&
|
|
2534
|
+
!x.value && d.value.length > 0 && W(d.value[d.value.length - 1]);
|
|
2511
2535
|
break;
|
|
2512
2536
|
}
|
|
2513
2537
|
}
|
|
2514
2538
|
let re = r(() => `${f}-input`), ie = r(() => `${f}-label`), ae = r(() => `${f}-instructions`), oe = r(() => `error-message-${f}`), se = r(() => {
|
|
2515
2539
|
let e = [];
|
|
2516
|
-
return i.instructions && e.push(ae.value),
|
|
2540
|
+
return i.instructions && e.push(ae.value), w.value && e.push(oe.value), e.length > 0 ? e.join(" ") : void 0;
|
|
2517
2541
|
});
|
|
2518
|
-
return (n, r) => (
|
|
2542
|
+
return (n, r) => (T(), o("div", { class: _(["g-multiselect-root", {
|
|
2519
2543
|
"g-multiselect-open": y.value,
|
|
2520
|
-
"g-multiselect-has-error":
|
|
2544
|
+
"g-multiselect-has-error": R(w)
|
|
2521
2545
|
}]) }, [
|
|
2522
|
-
t.hiddenLabel ? a("", !0) : (
|
|
2546
|
+
t.hiddenLabel ? a("", !0) : (T(), o("label", {
|
|
2523
2547
|
key: 0,
|
|
2524
2548
|
id: ie.value,
|
|
2525
2549
|
for: re.value,
|
|
2526
2550
|
class: "g-multiselect-label"
|
|
2527
|
-
}, [c(
|
|
2528
|
-
t.instructions ? (
|
|
2551
|
+
}, [c(P(t.label), 1), t.required ? (T(), o("span", tr, " *")) : a("", !0)], 8, er)),
|
|
2552
|
+
t.instructions ? (T(), o("div", {
|
|
2529
2553
|
key: 1,
|
|
2530
2554
|
id: ae.value,
|
|
2531
2555
|
class: "g-multiselect-instructions"
|
|
2532
|
-
},
|
|
2556
|
+
}, P(t.instructions), 9, nr)) : a("", !0),
|
|
2533
2557
|
s("div", {
|
|
2534
2558
|
ref_key: "controlRef",
|
|
2535
2559
|
ref: m,
|
|
@@ -2539,16 +2563,16 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2539
2563
|
s("ul", {
|
|
2540
2564
|
class: "g-multiselect-chips",
|
|
2541
2565
|
"aria-labelledby": ie.value
|
|
2542
|
-
}, [(
|
|
2566
|
+
}, [(T(!0), o(e, null, k(d.value, (e) => (T(), o("li", {
|
|
2543
2567
|
key: e,
|
|
2544
2568
|
class: "g-multiselect-chip"
|
|
2545
|
-
}, [s("span",
|
|
2569
|
+
}, [s("span", ir, P(L(e)), 1), s("button", {
|
|
2546
2570
|
type: "button",
|
|
2547
2571
|
class: "g-multiselect-chip-remove",
|
|
2548
|
-
"aria-label": `Remove ${
|
|
2572
|
+
"aria-label": `Remove ${L(e)}`,
|
|
2549
2573
|
disabled: t.disabled,
|
|
2550
2574
|
onMousedown: te,
|
|
2551
|
-
onClick:
|
|
2575
|
+
onClick: X((t) => W(e), ["stop"])
|
|
2552
2576
|
}, [...r[0] ||= [s("svg", {
|
|
2553
2577
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2554
2578
|
viewBox: "0 0 51.26 51.26",
|
|
@@ -2557,7 +2581,7 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2557
2581
|
}, [s("path", {
|
|
2558
2582
|
fill: "currentColor",
|
|
2559
2583
|
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"
|
|
2560
|
-
})], -1)]], 40,
|
|
2584
|
+
})], -1)]], 40, ar)]))), 128))], 8, rr),
|
|
2561
2585
|
s("input", h({
|
|
2562
2586
|
ref_key: "inputRef",
|
|
2563
2587
|
ref: p,
|
|
@@ -2572,16 +2596,16 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2572
2596
|
"aria-autocomplete": "list",
|
|
2573
2597
|
"aria-expanded": y.value ? "true" : "false",
|
|
2574
2598
|
"aria-haspopup": "listbox",
|
|
2575
|
-
"aria-controls":
|
|
2576
|
-
"aria-activedescendant": y.value &&
|
|
2599
|
+
"aria-controls": R(f) + "-listbox",
|
|
2600
|
+
"aria-activedescendant": y.value && N.value.length > 0 ? R(f) + "-option-" + b.value : void 0
|
|
2577
2601
|
}, t.hiddenLabel ? { "aria-label": t.label } : void 0, {
|
|
2578
2602
|
"aria-describedby": se.value,
|
|
2579
2603
|
"aria-required": t.required ? "true" : void 0,
|
|
2580
2604
|
onInput: q,
|
|
2581
2605
|
onKeydown: ne,
|
|
2582
|
-
onFocus:
|
|
2606
|
+
onFocus: J,
|
|
2583
2607
|
onBlur: ee
|
|
2584
|
-
}), null, 16,
|
|
2608
|
+
}), null, 16, or),
|
|
2585
2609
|
r[2] ||= s("svg", {
|
|
2586
2610
|
class: "g-multiselect-caret",
|
|
2587
2611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2592,31 +2616,31 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2592
2616
|
fill: "currentColor",
|
|
2593
2617
|
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"
|
|
2594
2618
|
})], -1),
|
|
2595
|
-
|
|
2619
|
+
Y(s("div", h({
|
|
2596
2620
|
ref_key: "listboxRef",
|
|
2597
2621
|
ref: v,
|
|
2598
|
-
id:
|
|
2622
|
+
id: R(f) + "-listbox",
|
|
2599
2623
|
role: "listbox",
|
|
2600
2624
|
"aria-multiselectable": "true"
|
|
2601
2625
|
}, t.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": ie.value }, {
|
|
2602
|
-
class: ["g-multiselect-listbox", { "g-multiselect-listbox--above":
|
|
2603
|
-
style:
|
|
2626
|
+
class: ["g-multiselect-listbox", { "g-multiselect-listbox--above": R(E) === "above" }],
|
|
2627
|
+
style: R(D),
|
|
2604
2628
|
tabindex: "-1"
|
|
2605
|
-
}), [
|
|
2629
|
+
}), [N.value.length > 0 ? (T(!0), o(e, { key: 0 }, k(N.value, (e, t) => (T(), o("div", {
|
|
2606
2630
|
key: e.value,
|
|
2607
|
-
id:
|
|
2631
|
+
id: R(f) + "-option-" + t,
|
|
2608
2632
|
role: "option",
|
|
2609
2633
|
class: _(["g-multiselect-option", {
|
|
2610
2634
|
"g-multiselect-option--active": t === b.value,
|
|
2611
|
-
"g-multiselect-option--selected":
|
|
2635
|
+
"g-multiselect-option--selected": F(e.value)
|
|
2612
2636
|
}]),
|
|
2613
|
-
"aria-selected":
|
|
2637
|
+
"aria-selected": F(e.value) ? "true" : "false",
|
|
2614
2638
|
onMousedown: Z,
|
|
2615
2639
|
onClick: (e) => U(t)
|
|
2616
|
-
}, [s("span",
|
|
2640
|
+
}, [s("span", lr, [F(e.value) ? (T(), o("svg", ur, [...r[1] ||= [s("path", { d: "M530.8 134.1C545.1 144.5 548.3 164.5 537.9 178.8L281.9 530.8C276.4 538.4 267.9 543.1 258.5 543.9C249.1 544.7 240 541.2 233.4 534.6L105.4 406.6C92.9 394.1 92.9 373.8 105.4 361.3C117.9 348.8 138.2 348.8 150.7 361.3L252.2 462.8L486.2 141.1C496.6 126.8 516.6 123.6 530.9 134z" }, null, -1)]])) : a("", !0)]), c(" " + P(e.label), 1)], 42, cr))), 128)) : (T(), o("div", dr, " No results found. "))], 16, sr), [[G, y.value]])
|
|
2617
2641
|
], 2),
|
|
2618
|
-
l(
|
|
2619
|
-
errors:
|
|
2642
|
+
l(je, {
|
|
2643
|
+
errors: R(C),
|
|
2620
2644
|
id: oe.value
|
|
2621
2645
|
}, null, 8, ["errors", "id"])
|
|
2622
2646
|
], 2));
|
|
@@ -2624,32 +2648,32 @@ var ln = ["id"], un = /* @__PURE__ */ u({
|
|
|
2624
2648
|
});
|
|
2625
2649
|
//#endregion
|
|
2626
2650
|
//#region src/compose/useFiltering.ts
|
|
2627
|
-
function
|
|
2651
|
+
function pr(e) {
|
|
2628
2652
|
if (!(Array.isArray(e) && e.length === 0) && !(e === null || e === !1 || e === "")) return e;
|
|
2629
2653
|
}
|
|
2630
|
-
function
|
|
2654
|
+
function mr(e) {
|
|
2631
2655
|
return Object.fromEntries(Object.entries(e).filter(([e, t]) => t && (!Array.isArray(t) || t.length > 0)));
|
|
2632
2656
|
}
|
|
2633
|
-
function
|
|
2657
|
+
function hr(e) {
|
|
2634
2658
|
if (e != null) return Array.isArray(e) ? e.filter((e) => e != null) : [e];
|
|
2635
2659
|
}
|
|
2636
|
-
function
|
|
2660
|
+
function gr(e) {
|
|
2637
2661
|
let t = {};
|
|
2638
|
-
for (let [n, r] of Object.entries(
|
|
2662
|
+
for (let [n, r] of Object.entries(F(e))) Array.isArray(r) ? r.length > 0 && (t[n] = r) : r === !0 ? t[n] = "true" : t[n] = r || void 0;
|
|
2639
2663
|
return t;
|
|
2640
2664
|
}
|
|
2641
|
-
function
|
|
2665
|
+
function _r(e) {
|
|
2642
2666
|
let t = {};
|
|
2643
2667
|
return Object.keys(e).forEach((n) => {
|
|
2644
2668
|
let r = e[n];
|
|
2645
2669
|
r != null && r !== "" && r !== !1 && (Array.isArray(r) ? r.length > 0 && (t[n] = r.map((e) => String(e))) : t[n] = String(r));
|
|
2646
2670
|
}), t;
|
|
2647
2671
|
}
|
|
2648
|
-
function
|
|
2649
|
-
let n =
|
|
2672
|
+
function vr(e, t = {}) {
|
|
2673
|
+
let n = D(Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t]))), i = t.syncWith;
|
|
2650
2674
|
if (i) {
|
|
2651
2675
|
if (i.value) {
|
|
2652
|
-
let t =
|
|
2676
|
+
let t = L(i);
|
|
2653
2677
|
Object.keys(e).forEach((e) => {
|
|
2654
2678
|
if (t[e] !== void 0) {
|
|
2655
2679
|
let r = t[e];
|
|
@@ -2657,14 +2681,14 @@ function _r(e, t = {}) {
|
|
|
2657
2681
|
}
|
|
2658
2682
|
});
|
|
2659
2683
|
}
|
|
2660
|
-
|
|
2661
|
-
i.value =
|
|
2684
|
+
K(n, (e) => {
|
|
2685
|
+
i.value = _r(e);
|
|
2662
2686
|
}, { deep: !0 });
|
|
2663
2687
|
}
|
|
2664
2688
|
return {
|
|
2665
2689
|
filters: n,
|
|
2666
2690
|
isFiltered: r(() => {
|
|
2667
|
-
for (let t of Object.keys(e)) if (
|
|
2691
|
+
for (let t of Object.keys(e)) if (pr(n[t])) return !0;
|
|
2668
2692
|
return !1;
|
|
2669
2693
|
}),
|
|
2670
2694
|
clearFilters: () => {
|
|
@@ -2674,48 +2698,48 @@ function _r(e, t = {}) {
|
|
|
2674
2698
|
},
|
|
2675
2699
|
filteredColumns: r(() => {
|
|
2676
2700
|
let t = {};
|
|
2677
|
-
for (let r of Object.keys(e)) t[r] = !!
|
|
2701
|
+
for (let r of Object.keys(e)) t[r] = !!pr(n[r]);
|
|
2678
2702
|
return t;
|
|
2679
2703
|
})
|
|
2680
2704
|
};
|
|
2681
2705
|
}
|
|
2682
2706
|
//#endregion
|
|
2683
2707
|
//#region src/components/GTable.vue?vue&type=script&setup=true&lang.ts
|
|
2684
|
-
var
|
|
2708
|
+
var yr = { class: "g-table-outer-wrap" }, br = {
|
|
2685
2709
|
key: 0,
|
|
2686
2710
|
class: "g-table-controls"
|
|
2687
|
-
},
|
|
2711
|
+
}, xr = { class: "g-clear-filters-wrap" }, Sr = {
|
|
2688
2712
|
key: 0,
|
|
2689
2713
|
class: "pagination"
|
|
2690
|
-
},
|
|
2714
|
+
}, Cr = { class: "g-result-count" }, wr = ["aria-label", "aria-rowcount"], Tr = { class: "g-table-head" }, Er = { "aria-rowindex": "1" }, Dr = {
|
|
2691
2715
|
key: 0,
|
|
2692
2716
|
scope: "col",
|
|
2693
2717
|
class: "g-th g-th-checkbox"
|
|
2694
|
-
},
|
|
2718
|
+
}, Or = [
|
|
2695
2719
|
"checked",
|
|
2696
2720
|
"indeterminate",
|
|
2697
2721
|
"aria-label"
|
|
2698
|
-
],
|
|
2722
|
+
], kr = ["id", "aria-sort"], Ar = { class: "th-inner" }, jr = ["onClick"], Mr = {
|
|
2699
2723
|
key: 0,
|
|
2700
2724
|
class: "sort-indicator"
|
|
2701
|
-
},
|
|
2725
|
+
}, Nr = ["aria-label"], Pr = {
|
|
2702
2726
|
key: 1,
|
|
2703
2727
|
class: "g-column-head"
|
|
2704
|
-
},
|
|
2728
|
+
}, Fr = ["onClick", "aria-label"], Ir = { key: 1 }, Lr = { class: "g-filter-toggle" }, Rr = [
|
|
2705
2729
|
"onUpdate:modelValue",
|
|
2706
2730
|
"id",
|
|
2707
2731
|
"aria-describedby"
|
|
2708
|
-
],
|
|
2732
|
+
], zr = ["for"], Br = ["id"], Vr = {
|
|
2709
2733
|
key: 3,
|
|
2710
2734
|
class: "g-multi-select"
|
|
2711
|
-
},
|
|
2735
|
+
}, Hr = [
|
|
2712
2736
|
"onUpdate:modelValue",
|
|
2713
2737
|
"id",
|
|
2714
2738
|
"value"
|
|
2715
|
-
],
|
|
2739
|
+
], Ur = ["for"], Wr = {
|
|
2716
2740
|
key: 1,
|
|
2717
2741
|
class: "g-bulk-actions-toolbar"
|
|
2718
|
-
},
|
|
2742
|
+
}, Gr = { class: "g-selected-count" }, Kr = { class: "g-bulk-actions" }, qr = /* @__PURE__ */ u({
|
|
2719
2743
|
__name: "GTable",
|
|
2720
2744
|
props: /* @__PURE__ */ m({
|
|
2721
2745
|
label: {},
|
|
@@ -2759,13 +2783,13 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2759
2783
|
"update:selectedRows"
|
|
2760
2784
|
]),
|
|
2761
2785
|
setup(t, { emit: n }) {
|
|
2762
|
-
let u =
|
|
2786
|
+
let u = V(t, "sortField"), d = V(t, "sortOrder"), f = V(t, "filter"), p = V(t, "selectedRows"), m = t, h = n;
|
|
2763
2787
|
function g(e) {
|
|
2764
2788
|
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));
|
|
2765
2789
|
}
|
|
2766
2790
|
let v = m.filtering;
|
|
2767
|
-
v ||=
|
|
2768
|
-
let { filters: b, filteredColumns: x, isFiltered: C, clearFilters:
|
|
2791
|
+
v ||= vr({});
|
|
2792
|
+
let { filters: b, filteredColumns: x, isFiltered: C, clearFilters: w } = v, E = r(() => m.data.map((e) => e.key)), D = r(() => p.value.filter((e) => E.value.includes(e))), j = r(() => !m.bulkSelectionEnabled || m.data.length === 0 ? !1 : D.value.length === E.value.length), M = r(() => !m.bulkSelectionEnabled || m.data.length === 0 ? !1 : D.value.length > 0 && D.value.length < E.value.length), N = O(null);
|
|
2769
2793
|
function I() {
|
|
2770
2794
|
if (j.value) p.value = p.value.filter((e) => !E.value.includes(e));
|
|
2771
2795
|
else {
|
|
@@ -2773,24 +2797,24 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2773
2797
|
E.value.forEach((t) => e.add(t)), p.value = Array.from(e);
|
|
2774
2798
|
}
|
|
2775
2799
|
}
|
|
2776
|
-
function
|
|
2777
|
-
if (t &&
|
|
2778
|
-
let t = E.value.indexOf(
|
|
2800
|
+
function L(e, t = !1) {
|
|
2801
|
+
if (t && N.value) {
|
|
2802
|
+
let t = E.value.indexOf(N.value), n = E.value.indexOf(e);
|
|
2779
2803
|
if (t !== -1 && n !== -1) {
|
|
2780
2804
|
let e = Math.min(t, n), r = Math.max(t, n), i = E.value.slice(e, r + 1), a = new Set(p.value);
|
|
2781
2805
|
i.forEach((e) => a.add(e)), p.value = Array.from(a);
|
|
2782
2806
|
}
|
|
2783
2807
|
} else p.value.includes(e) ? p.value = p.value.filter((t) => t !== e) : p.value = [...p.value, e];
|
|
2784
|
-
|
|
2808
|
+
N.value = e;
|
|
2785
2809
|
}
|
|
2786
|
-
function
|
|
2810
|
+
function z(e) {
|
|
2787
2811
|
h("row-click", e);
|
|
2788
2812
|
}
|
|
2789
|
-
function
|
|
2813
|
+
function U(e) {
|
|
2790
2814
|
h("bulk-action", e, p.value);
|
|
2791
2815
|
}
|
|
2792
|
-
function
|
|
2793
|
-
let t = e.value, n = e.column.key, r =
|
|
2816
|
+
function G(e) {
|
|
2817
|
+
let t = e.value, n = e.column.key, r = F(e.row[n]);
|
|
2794
2818
|
e.column.editable?.inputAttributes?.type === "number" && (t = e.value === "" ? null : Number(e.value)), e.row[n] = t, h("cell-change", {
|
|
2795
2819
|
row: e.row,
|
|
2796
2820
|
column: e.column,
|
|
@@ -2798,28 +2822,28 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2798
2822
|
previousValue: r
|
|
2799
2823
|
});
|
|
2800
2824
|
}
|
|
2801
|
-
let
|
|
2825
|
+
let q = B(), ee = H(), Z = r(() => m.showPagination ? !0 : !!ee.pagination), te = r(() => !!(C.value || Z.value));
|
|
2802
2826
|
return S(() => {
|
|
2803
2827
|
m.rowClickable && m.bulkSelectionEnabled && console.warn("GTable: rowClickable and bulkSelectionEnabled cannot be used together. rowClickable will be ignored.");
|
|
2804
2828
|
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])) {
|
|
2805
2829
|
let t = f.value[e.key];
|
|
2806
2830
|
f.value[e.key] = t ? [t] : [];
|
|
2807
2831
|
}
|
|
2808
|
-
}),
|
|
2832
|
+
}), K(() => m.columns, (e) => {
|
|
2809
2833
|
for (let t of e) if (t.filter && t.filter.type === "multi-select" && !Array.isArray(f.value[t.key])) {
|
|
2810
2834
|
let e = f.value[t.key];
|
|
2811
2835
|
f.value[t.key] = e ? [e] : [];
|
|
2812
2836
|
}
|
|
2813
|
-
}, { immediate: !0 }), (n, r) => (
|
|
2814
|
-
te.value ? (
|
|
2815
|
-
s("div",
|
|
2837
|
+
}, { immediate: !0 }), (n, r) => (T(), o("div", yr, [
|
|
2838
|
+
te.value ? (T(), o("div", br, [
|
|
2839
|
+
s("div", xr, [R(C) ? (T(), i(Q, {
|
|
2816
2840
|
key: 0,
|
|
2817
2841
|
outlined: "",
|
|
2818
2842
|
size: "small",
|
|
2819
2843
|
class: "clear-filters",
|
|
2820
|
-
onClick:
|
|
2844
|
+
onClick: R(w)
|
|
2821
2845
|
}, {
|
|
2822
|
-
default:
|
|
2846
|
+
default: J(() => [...r[0] ||= [s("svg", {
|
|
2823
2847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2824
2848
|
viewBox: "0 0 51.26 51.26",
|
|
2825
2849
|
height: "1em",
|
|
@@ -2830,37 +2854,37 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2830
2854
|
})], -1), s("span", { class: "g-clear-filters-text" }, " Clear Filters ", -1)]]),
|
|
2831
2855
|
_: 1
|
|
2832
2856
|
}, 8, ["onClick"])) : a("", !0)]),
|
|
2833
|
-
Z.value ? (
|
|
2834
|
-
s("span",
|
|
2857
|
+
Z.value ? (T(), o("div", Sr, [A(n.$slots, "pagination")])) : a("", !0),
|
|
2858
|
+
s("span", Cr, P(m.resultCount || t.data.length) + " results", 1)
|
|
2835
2859
|
])) : a("", !0),
|
|
2836
2860
|
s("table", {
|
|
2837
2861
|
class: "g-table",
|
|
2838
2862
|
ref: "tableRef",
|
|
2839
2863
|
"aria-label": t.label,
|
|
2840
2864
|
"aria-rowcount": m.resultCount || t.data.length
|
|
2841
|
-
}, [s("thead",
|
|
2865
|
+
}, [s("thead", Tr, [s("tr", Er, [t.bulkSelectionEnabled ? (T(), o("th", Dr, [s("input", {
|
|
2842
2866
|
type: "checkbox",
|
|
2843
2867
|
checked: j.value,
|
|
2844
2868
|
indeterminate: M.value,
|
|
2845
2869
|
onChange: I,
|
|
2846
2870
|
"aria-label": j.value ? "Deselect all rows" : "Select all rows",
|
|
2847
2871
|
class: "g-bulk-select-checkbox"
|
|
2848
|
-
}, null, 40,
|
|
2872
|
+
}, null, 40, Or)])) : a("", !0), (T(!0), o(e, null, k(t.columns, (t) => (T(), o("th", {
|
|
2849
2873
|
key: t.key,
|
|
2850
|
-
id: `${
|
|
2874
|
+
id: `${R(q)}-th-${String(t.key)}`,
|
|
2851
2875
|
"aria-sort": u.value === t.key ? d.value === 1 ? "ascending" : "descending" : "none",
|
|
2852
2876
|
class: _([
|
|
2853
2877
|
"g-th",
|
|
2854
2878
|
{ sorted: u.value === t.key },
|
|
2855
|
-
{ filtered:
|
|
2879
|
+
{ filtered: R(x)[t.key] }
|
|
2856
2880
|
]),
|
|
2857
2881
|
scope: "col"
|
|
2858
|
-
}, [s("div",
|
|
2882
|
+
}, [s("div", Ar, [t.sortable ? (T(), o("button", {
|
|
2859
2883
|
key: 0,
|
|
2860
2884
|
type: "button",
|
|
2861
2885
|
class: "g-column-head",
|
|
2862
2886
|
onClick: (e) => g(t)
|
|
2863
|
-
}, [c(
|
|
2887
|
+
}, [c(P(t.label) + " ", 1), u.value === t.key ? (T(), o("span", Mr, [(T(), o("svg", {
|
|
2864
2888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2865
2889
|
viewBox: "0 0 640 640",
|
|
2866
2890
|
height: "1.5em",
|
|
@@ -2870,11 +2894,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2870
2894
|
}, [...r[1] ||= [s("path", {
|
|
2871
2895
|
fill: "currentColor",
|
|
2872
2896
|
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"
|
|
2873
|
-
}, null, -1)]], 12,
|
|
2874
|
-
trigger:
|
|
2875
|
-
onClick:
|
|
2876
|
-
"aria-label":
|
|
2877
|
-
class: _(["g-filter-btn", { "g-active":
|
|
2897
|
+
}, null, -1)]], 12, Nr))])) : a("", !0)], 8, jr)) : (T(), o("span", Pr, P(t.label), 1)), t.filter ? (T(), i(it, { key: 2 }, {
|
|
2898
|
+
trigger: J(({ toggle: e }) => [s("button", {
|
|
2899
|
+
onClick: X(e, ["stop"]),
|
|
2900
|
+
"aria-label": R(x)[t.key] ? "Column Filtered" : "Filter Column",
|
|
2901
|
+
class: _(["g-filter-btn", { "g-active": R(x)[t.key] }]),
|
|
2878
2902
|
type: "button"
|
|
2879
2903
|
}, [...r[2] ||= [s("svg", {
|
|
2880
2904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2884,8 +2908,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2884
2908
|
}, [s("path", {
|
|
2885
2909
|
fill: "currentColor",
|
|
2886
2910
|
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"
|
|
2887
|
-
})], -1)]], 10,
|
|
2888
|
-
default:
|
|
2911
|
+
})], -1)]], 10, Fr)]),
|
|
2912
|
+
default: J(() => [t.filter.type === "select" ? (T(), i(Ht, {
|
|
2889
2913
|
key: 0,
|
|
2890
2914
|
modelValue: f.value[t.key],
|
|
2891
2915
|
"onUpdate:modelValue": (e) => f.value[t.key] = e,
|
|
@@ -2898,20 +2922,20 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2898
2922
|
"modelValue",
|
|
2899
2923
|
"onUpdate:modelValue",
|
|
2900
2924
|
"options"
|
|
2901
|
-
])) : t.filter.type === "toggle" ? (
|
|
2902
|
-
|
|
2925
|
+
])) : t.filter.type === "toggle" ? (T(), o("div", Ir, [s("div", Lr, [
|
|
2926
|
+
Y(s("input", {
|
|
2903
2927
|
type: "checkbox",
|
|
2904
2928
|
"onUpdate:modelValue": (e) => f.value[t.key] = e,
|
|
2905
|
-
id: `${
|
|
2906
|
-
"aria-describedby": t.filter.description ? `${
|
|
2907
|
-
}, null, 8,
|
|
2908
|
-
s("label", { for: `${
|
|
2909
|
-
t.filter.description ? (
|
|
2929
|
+
id: `${R(q)}-filter-${String(t.key)}`,
|
|
2930
|
+
"aria-describedby": t.filter.description ? `${R(q)}-filter-description-${String(t.key)}` : void 0
|
|
2931
|
+
}, null, 8, Rr), [[W, f.value[t.key]]]),
|
|
2932
|
+
s("label", { for: `${R(q)}-filter-${String(t.key)}` }, P(t.filter.label), 9, zr),
|
|
2933
|
+
t.filter.description ? (T(), o("span", {
|
|
2910
2934
|
key: 0,
|
|
2911
2935
|
class: "g-filter-description",
|
|
2912
|
-
id: `${
|
|
2913
|
-
},
|
|
2914
|
-
])])) : t.filter.type === "multi-select" && t.filter.searchable ? (
|
|
2936
|
+
id: `${R(q)}-filter-description-${String(t.key)}`
|
|
2937
|
+
}, P(t.filter.description), 9, Br)) : a("", !0)
|
|
2938
|
+
])])) : t.filter.type === "multi-select" && t.filter.searchable ? (T(), i(fr, {
|
|
2915
2939
|
key: 2,
|
|
2916
2940
|
modelValue: f.value[t.key],
|
|
2917
2941
|
"onUpdate:modelValue": (e) => f.value[t.key] = e,
|
|
@@ -2924,28 +2948,28 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2924
2948
|
"onUpdate:modelValue",
|
|
2925
2949
|
"options",
|
|
2926
2950
|
"placeholder"
|
|
2927
|
-
])) : t.filter.type === "multi-select" ? (
|
|
2951
|
+
])) : t.filter.type === "multi-select" ? (T(), o("fieldset", Vr, [
|
|
2928
2952
|
r[4] ||= s("legend", { class: "g-multi-select-legend" }, " Include values ", -1),
|
|
2929
|
-
(
|
|
2953
|
+
(T(!0), o(e, null, k(t.filter.options, (e) => (T(), o("div", { key: e.value }, [Y(s("input", {
|
|
2930
2954
|
type: "checkbox",
|
|
2931
2955
|
"onUpdate:modelValue": (e) => f.value[t.key] = e,
|
|
2932
2956
|
id: `filter-${String(t.key)}-${e.value}`,
|
|
2933
2957
|
value: e.value,
|
|
2934
2958
|
name: "filter-multiselect"
|
|
2935
|
-
}, null, 8,
|
|
2936
|
-
f.value[t.key] && f.value[t.key].length ? (
|
|
2959
|
+
}, null, 8, Hr), [[W, f.value[t.key]]]), s("label", { for: `filter-${String(t.key)}-${e.value}` }, P(e.label), 9, Ur)]))), 128)),
|
|
2960
|
+
f.value[t.key] && f.value[t.key].length ? (T(), i(Q, {
|
|
2937
2961
|
key: 0,
|
|
2938
2962
|
class: "clear-multiselect-btn",
|
|
2939
2963
|
theme: "accent",
|
|
2940
2964
|
size: "small",
|
|
2941
2965
|
onClick: (e) => f.value[t.key] = []
|
|
2942
2966
|
}, {
|
|
2943
|
-
default:
|
|
2967
|
+
default: J(() => [...r[3] ||= [c(" Clear ", -1)]]),
|
|
2944
2968
|
_: 1
|
|
2945
2969
|
}, 8, ["onClick"])) : a("", !0)
|
|
2946
2970
|
])) : a("", !0)]),
|
|
2947
2971
|
_: 2
|
|
2948
|
-
}, 1024)) : a("", !0)])], 10,
|
|
2972
|
+
}, 1024)) : a("", !0)])], 10, kr))), 128))])]), l($n, {
|
|
2949
2973
|
data: t.data,
|
|
2950
2974
|
columns: t.columns,
|
|
2951
2975
|
"group-by": t.groupBy,
|
|
@@ -2955,11 +2979,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2955
2979
|
"start-index": t.startIndex,
|
|
2956
2980
|
"bulk-selection-enabled": t.bulkSelectionEnabled,
|
|
2957
2981
|
"selected-rows": p.value,
|
|
2958
|
-
"table-id":
|
|
2982
|
+
"table-id": R(q),
|
|
2959
2983
|
"change-tracker": t.changeTracker,
|
|
2960
|
-
onRowClick:
|
|
2961
|
-
onToggleRow:
|
|
2962
|
-
onCellChange:
|
|
2984
|
+
onRowClick: z,
|
|
2985
|
+
onToggleRow: L,
|
|
2986
|
+
onCellChange: G
|
|
2963
2987
|
}, null, 8, [
|
|
2964
2988
|
"data",
|
|
2965
2989
|
"columns",
|
|
@@ -2972,21 +2996,21 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
2972
2996
|
"selected-rows",
|
|
2973
2997
|
"table-id",
|
|
2974
2998
|
"change-tracker"
|
|
2975
|
-
])], 8,
|
|
2976
|
-
t.bulkSelectionEnabled && p.value.length > 0 ? (
|
|
2999
|
+
])], 8, wr),
|
|
3000
|
+
t.bulkSelectionEnabled && p.value.length > 0 ? (T(), o("div", Wr, [s("span", Gr, P(p.value.length) + " row" + P(p.value.length === 1 ? "" : "s") + " selected", 1), s("ul", Kr, [(T(!0), o(e, null, k(t.bulkActions, (e) => (T(), o("li", { key: e.id }, [l(Q, {
|
|
2977
3001
|
theme: e.theme || "accent",
|
|
2978
|
-
onClick: (t) =>
|
|
3002
|
+
onClick: (t) => U(e.id),
|
|
2979
3003
|
size: "small"
|
|
2980
3004
|
}, {
|
|
2981
|
-
default:
|
|
3005
|
+
default: J(() => [c(P(e.label) + " " + P(p.value.length) + " row" + P(p.value.length === 1 ? "" : "s"), 1)]),
|
|
2982
3006
|
_: 2
|
|
2983
3007
|
}, 1032, ["theme", "onClick"])]))), 128))])])) : a("", !0)
|
|
2984
3008
|
]));
|
|
2985
3009
|
}
|
|
2986
|
-
}),
|
|
3010
|
+
}), Jr = {
|
|
2987
3011
|
class: "g-pagination",
|
|
2988
3012
|
"aria-label": "Pagination"
|
|
2989
|
-
},
|
|
3013
|
+
}, Yr = ["disabled"], Xr = ["disabled"], Zr = { class: "page-range" }, Qr = ["disabled"], $r = ["disabled"], ei = ["value"], ti = ["value"], ni = /* @__PURE__ */ u({
|
|
2990
3014
|
__name: "GTablePagination",
|
|
2991
3015
|
props: /* @__PURE__ */ m({
|
|
2992
3016
|
start: {},
|
|
@@ -3001,14 +3025,14 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3001
3025
|
}),
|
|
3002
3026
|
emits: ["update:start", "update:pageSize"],
|
|
3003
3027
|
setup(t) {
|
|
3004
|
-
let n = t, i = r(() => Math.max(1, Math.ceil(n.total / n.pageSize))), a =
|
|
3028
|
+
let n = t, i = r(() => Math.max(1, Math.ceil(n.total / n.pageSize))), a = V(t, "start"), c = V(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);
|
|
3005
3029
|
function m(e) {
|
|
3006
3030
|
e < 1 || e > i.value || (a.value = (e - 1) * u.value);
|
|
3007
3031
|
}
|
|
3008
3032
|
function h(e) {
|
|
3009
3033
|
c.value = parseInt(e.target.value, 10);
|
|
3010
3034
|
}
|
|
3011
|
-
return (t, r) => (
|
|
3035
|
+
return (t, r) => (T(), o("nav", Jr, [
|
|
3012
3036
|
s("button", {
|
|
3013
3037
|
class: "first-page g-pagination-button",
|
|
3014
3038
|
disabled: p.value === 1,
|
|
@@ -3033,7 +3057,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3033
3057
|
}),
|
|
3034
3058
|
s("path", { d: "M11 7l-5 5l5 5" }),
|
|
3035
3059
|
s("path", { d: "M17 7l-5 5l5 5" })
|
|
3036
|
-
], -1)]], 8,
|
|
3060
|
+
], -1)]], 8, Yr),
|
|
3037
3061
|
s("button", {
|
|
3038
3062
|
class: "prev-page g-pagination-button",
|
|
3039
3063
|
disabled: p.value === 1,
|
|
@@ -3054,8 +3078,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3054
3078
|
stroke: "none",
|
|
3055
3079
|
d: "M0 0h24v24H0z",
|
|
3056
3080
|
fill: "none"
|
|
3057
|
-
}), s("path", { d: "M15 6l-6 6l6 6" })], -1)]], 8,
|
|
3058
|
-
s("span",
|
|
3081
|
+
}), s("path", { d: "M15 6l-6 6l6 6" })], -1)]], 8, Xr),
|
|
3082
|
+
s("span", Zr, P(d.value) + " to " + P(f.value), 1),
|
|
3059
3083
|
s("button", {
|
|
3060
3084
|
class: "next-page g-pagination-button",
|
|
3061
3085
|
disabled: p.value === i.value,
|
|
@@ -3076,7 +3100,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3076
3100
|
stroke: "none",
|
|
3077
3101
|
d: "M0 0h24v24H0z",
|
|
3078
3102
|
fill: "none"
|
|
3079
|
-
}), s("path", { d: "M9 6l6 6l-6 6" })], -1)]], 8,
|
|
3103
|
+
}), s("path", { d: "M9 6l6 6l-6 6" })], -1)]], 8, Qr),
|
|
3080
3104
|
s("button", {
|
|
3081
3105
|
class: "last-page g-pagination-button",
|
|
3082
3106
|
disabled: p.value === i.value,
|
|
@@ -3101,28 +3125,28 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3101
3125
|
}),
|
|
3102
3126
|
s("path", { d: "M7 7l5 5l-5 5" }),
|
|
3103
3127
|
s("path", { d: "M13 7l5 5l-5 5" })
|
|
3104
|
-
], -1)]], 8,
|
|
3128
|
+
], -1)]], 8, $r),
|
|
3105
3129
|
s("select", {
|
|
3106
3130
|
id: "page-size-select",
|
|
3107
3131
|
class: "page-size-select",
|
|
3108
3132
|
value: c.value,
|
|
3109
3133
|
onChange: h
|
|
3110
|
-
}, [(
|
|
3134
|
+
}, [(T(!0), o(e, null, k(n.pageSizes || [
|
|
3111
3135
|
10,
|
|
3112
3136
|
25,
|
|
3113
3137
|
50,
|
|
3114
3138
|
100
|
|
3115
|
-
], (e) => (
|
|
3139
|
+
], (e) => (T(), o("option", {
|
|
3116
3140
|
key: e,
|
|
3117
3141
|
value: e
|
|
3118
|
-
},
|
|
3142
|
+
}, P(e), 9, ti))), 128))], 40, ei),
|
|
3119
3143
|
r[8] ||= s("label", {
|
|
3120
3144
|
class: "page-size-label",
|
|
3121
3145
|
for: "page-size-select"
|
|
3122
3146
|
}, "per page", -1)
|
|
3123
3147
|
]));
|
|
3124
3148
|
}
|
|
3125
|
-
}),
|
|
3149
|
+
}), ri = ["id"], ii = { class: "g-modal-inner" }, ai = { class: "g-modal-header" }, oi = ["id"], si = ["id"], ci = /* @__PURE__ */ u({
|
|
3126
3150
|
__name: "GModal",
|
|
3127
3151
|
props: {
|
|
3128
3152
|
label: {},
|
|
@@ -3136,11 +3160,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3136
3160
|
},
|
|
3137
3161
|
emits: ["close"],
|
|
3138
3162
|
setup(e, { emit: c }) {
|
|
3139
|
-
let u = e, d = c, f =
|
|
3140
|
-
function
|
|
3163
|
+
let u = e, d = c, f = U("dialog"), p = O(!0), m = B(), { pop: g, push: _, isTop: v, zIndex: y } = Ke(m, !0, !0), { deactivate: x, activate: C } = Qe(f, v);
|
|
3164
|
+
function w() {
|
|
3141
3165
|
d("close");
|
|
3142
3166
|
}
|
|
3143
|
-
|
|
3167
|
+
$e([f], v, p, w, g), S(() => {
|
|
3144
3168
|
_(), C();
|
|
3145
3169
|
}), b(() => {
|
|
3146
3170
|
g(), x();
|
|
@@ -3149,31 +3173,31 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3149
3173
|
let e = [`g-modal--${u.size}`];
|
|
3150
3174
|
return u.classes && (e = e.concat(Array.isArray(u.classes) ? u.classes : [u.classes])), e;
|
|
3151
3175
|
});
|
|
3152
|
-
return (r, c) => (
|
|
3176
|
+
return (r, c) => (T(), i(t, { to: "#modal-root" }, [l(n, {
|
|
3153
3177
|
name: "g-fade",
|
|
3154
3178
|
appear: ""
|
|
3155
3179
|
}, {
|
|
3156
|
-
default:
|
|
3157
|
-
id: "modal-" +
|
|
3180
|
+
default: J(() => [s("div", h({
|
|
3181
|
+
id: "modal-" + R(m),
|
|
3158
3182
|
class: ["g-modal", E.value],
|
|
3159
3183
|
role: "dialog",
|
|
3160
3184
|
"aria-modal": "true"
|
|
3161
3185
|
}, {
|
|
3162
|
-
"aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" +
|
|
3186
|
+
"aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" + R(m),
|
|
3163
3187
|
"aria-label": e.hiddenLabel ? e.label : void 0,
|
|
3164
3188
|
"aria-describedby": e.describedby ? e.describedby : void 0
|
|
3165
3189
|
}, {
|
|
3166
3190
|
ref_key: "dialog",
|
|
3167
3191
|
ref: f,
|
|
3168
|
-
style: { zIndex:
|
|
3169
|
-
}), [s("div",
|
|
3192
|
+
style: { zIndex: R(y) }
|
|
3193
|
+
}), [s("div", ii, [s("div", ai, [e.hiddenLabel ? a("", !0) : (T(), o("h2", {
|
|
3170
3194
|
key: 0,
|
|
3171
|
-
id: "modal-label-" +
|
|
3195
|
+
id: "modal-label-" + R(m),
|
|
3172
3196
|
class: "g-modal-label",
|
|
3173
3197
|
tabindex: "-1"
|
|
3174
|
-
},
|
|
3198
|
+
}, P(e.label), 9, oi)), s("button", {
|
|
3175
3199
|
class: "g-modal-close",
|
|
3176
|
-
onClick:
|
|
3200
|
+
onClick: w,
|
|
3177
3201
|
"aria-label": "Close"
|
|
3178
3202
|
}, [...c[0] ||= [s("svg", {
|
|
3179
3203
|
viewBox: "0 0 24 24",
|
|
@@ -3184,18 +3208,18 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3184
3208
|
fill: "currentColor",
|
|
3185
3209
|
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"
|
|
3186
3210
|
})], -1)]])]), s("div", {
|
|
3187
|
-
id: "modal-description-" +
|
|
3211
|
+
id: "modal-description-" + R(m),
|
|
3188
3212
|
class: "g-modal-content"
|
|
3189
|
-
}, [
|
|
3213
|
+
}, [A(r.$slots, "default")], 8, si)])], 16, ri)]),
|
|
3190
3214
|
_: 3
|
|
3191
3215
|
})]));
|
|
3192
3216
|
}
|
|
3193
|
-
}),
|
|
3217
|
+
}), li = [
|
|
3194
3218
|
"id",
|
|
3195
3219
|
"aria-expanded",
|
|
3196
3220
|
"aria-label",
|
|
3197
3221
|
"aria-controls"
|
|
3198
|
-
],
|
|
3222
|
+
], ui = /* @__PURE__ */ u({
|
|
3199
3223
|
__name: "GHamburgerMenu",
|
|
3200
3224
|
props: {
|
|
3201
3225
|
label: { default: "Main Navigation" },
|
|
@@ -3203,56 +3227,56 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3203
3227
|
},
|
|
3204
3228
|
emits: ["toggle"],
|
|
3205
3229
|
setup(e, { emit: t }) {
|
|
3206
|
-
let n = e, r = p("sidebar") ?? (
|
|
3230
|
+
let n = e, r = p("sidebar") ?? (fe() ? ln(n.sidebarKey) : void 0), i = t;
|
|
3207
3231
|
function a() {
|
|
3208
3232
|
i("toggle"), r?.toggle();
|
|
3209
3233
|
}
|
|
3210
3234
|
function c(e) {
|
|
3211
3235
|
e.key === "Escape" && r?.open?.value && (r.open.value = !1);
|
|
3212
3236
|
}
|
|
3213
|
-
let l =
|
|
3214
|
-
return (t, n) => (
|
|
3215
|
-
id: `${
|
|
3237
|
+
let l = B();
|
|
3238
|
+
return (t, n) => (T(), o("button", {
|
|
3239
|
+
id: `${R(r)?.id ?? R(l)}-hamburger`,
|
|
3216
3240
|
class: _(["g-hamburger-button", {
|
|
3217
|
-
"g-hamburger-button--open":
|
|
3218
|
-
"g-hamburger-button--collapsible":
|
|
3241
|
+
"g-hamburger-button--open": R(r)?.open?.value,
|
|
3242
|
+
"g-hamburger-button--collapsible": R(r)?.isCollapsible?.value
|
|
3219
3243
|
}]),
|
|
3220
3244
|
onClick: a,
|
|
3221
3245
|
onKeydown: c,
|
|
3222
|
-
"aria-expanded":
|
|
3246
|
+
"aria-expanded": R(r)?.open?.value ? "true" : "false",
|
|
3223
3247
|
"aria-label": e.label,
|
|
3224
|
-
"aria-controls":
|
|
3248
|
+
"aria-controls": R(r) ? `${R(r).id}-sidebar` : void 0
|
|
3225
3249
|
}, [...n[0] ||= [s("svg", {
|
|
3226
3250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3227
3251
|
viewBox: "0 0 51.26 51.26"
|
|
3228
|
-
}, [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,
|
|
3252
|
+
}, [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, li));
|
|
3229
3253
|
}
|
|
3230
|
-
}),
|
|
3254
|
+
}), di = /* @__PURE__ */ u({
|
|
3231
3255
|
__name: "GDetailList",
|
|
3232
3256
|
props: { variant: { default: "grid" } },
|
|
3233
3257
|
setup(e) {
|
|
3234
3258
|
let t = e;
|
|
3235
|
-
return (e, n) => (
|
|
3259
|
+
return (e, n) => (T(), o("dl", { class: _(["g-detail-list", `g-detail-list--${t.variant}`]) }, [A(e.$slots, "default")], 2));
|
|
3236
3260
|
}
|
|
3237
|
-
}),
|
|
3261
|
+
}), fi = { class: "g-detail-list-item" }, pi = { class: "g-detail-list-item__label" }, mi = { class: "g-detail-list-item__value" }, hi = /* @__PURE__ */ u({
|
|
3238
3262
|
__name: "GDetailListItem",
|
|
3239
3263
|
props: { label: {} },
|
|
3240
3264
|
setup(e) {
|
|
3241
|
-
return (t, n) => (
|
|
3265
|
+
return (t, n) => (T(), o("div", fi, [s("dt", pi, [A(t.$slots, "label", {}, () => [c(P(e.label), 1)])]), s("dd", mi, [A(t.$slots, "default")])]));
|
|
3242
3266
|
}
|
|
3243
|
-
}),
|
|
3267
|
+
}), gi = {
|
|
3244
3268
|
key: 0,
|
|
3245
3269
|
class: "g-scroll-lock-overlay"
|
|
3246
|
-
},
|
|
3270
|
+
}, _i = /* @__PURE__ */ u({
|
|
3247
3271
|
__name: "GOverlay",
|
|
3248
3272
|
setup(e) {
|
|
3249
|
-
let { hasScrollLock: t } =
|
|
3250
|
-
return (e, r) => (
|
|
3251
|
-
default:
|
|
3273
|
+
let { hasScrollLock: t } = qe();
|
|
3274
|
+
return (e, r) => (T(), i(n, { name: "g-fade" }, {
|
|
3275
|
+
default: J(() => [R(t) ? (T(), o("div", gi)) : a("", !0)]),
|
|
3252
3276
|
_: 1
|
|
3253
3277
|
}));
|
|
3254
3278
|
}
|
|
3255
|
-
}),
|
|
3279
|
+
}), vi = { class: "popover-content" }, yi = { class: "year-dropdown" }, bi = { class: "month-selector" }, xi = /* @__PURE__ */ u({
|
|
3256
3280
|
__name: "GTermSelectorControl",
|
|
3257
3281
|
props: /* @__PURE__ */ m({
|
|
3258
3282
|
termYears: { default: () => ["2026"] },
|
|
@@ -3272,8 +3296,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3272
3296
|
}),
|
|
3273
3297
|
emits: ["update:modelValue"],
|
|
3274
3298
|
setup(e) {
|
|
3275
|
-
let t =
|
|
3276
|
-
return (n, r) => (
|
|
3299
|
+
let t = V(e, "modelValue");
|
|
3300
|
+
return (n, r) => (T(), o("div", vi, [s("div", yi, [l(Ht, {
|
|
3277
3301
|
modelValue: t.value.year,
|
|
3278
3302
|
"onUpdate:modelValue": r[0] ||= (e) => t.value.year = e,
|
|
3279
3303
|
options: e.termYears,
|
|
@@ -3282,7 +3306,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3282
3306
|
"modelValue",
|
|
3283
3307
|
"options",
|
|
3284
3308
|
"label"
|
|
3285
|
-
])]), s("div",
|
|
3309
|
+
])]), s("div", bi, [l(yt, {
|
|
3286
3310
|
modelValue: t.value.name,
|
|
3287
3311
|
"onUpdate:modelValue": r[1] ||= (e) => t.value.name = e,
|
|
3288
3312
|
options: e.termNames,
|
|
@@ -3294,10 +3318,10 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3294
3318
|
"label"
|
|
3295
3319
|
])])]));
|
|
3296
3320
|
}
|
|
3297
|
-
}),
|
|
3321
|
+
}), Si = { class: "g-term-selector" }, Ci = { class: "g-term-label" }, wi = {
|
|
3298
3322
|
class: "g-popover-title",
|
|
3299
3323
|
tabindex: "-1"
|
|
3300
|
-
},
|
|
3324
|
+
}, Ti = /* @__PURE__ */ u({
|
|
3301
3325
|
__name: "GTermSelector",
|
|
3302
3326
|
props: /* @__PURE__ */ m({
|
|
3303
3327
|
heading: { default: "Period Selection" },
|
|
@@ -3318,21 +3342,21 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3318
3342
|
}),
|
|
3319
3343
|
emits: ["update:modelValue"],
|
|
3320
3344
|
setup(e) {
|
|
3321
|
-
let t =
|
|
3322
|
-
return (n, r) => (
|
|
3323
|
-
trigger:
|
|
3345
|
+
let t = V(e, "modelValue");
|
|
3346
|
+
return (n, r) => (T(), o("div", Si, [l(it, null, {
|
|
3347
|
+
trigger: J(({ toggle: e }) => [l(Q, {
|
|
3324
3348
|
class: "g-term-selector-button",
|
|
3325
3349
|
theme: "none",
|
|
3326
3350
|
outlined: "",
|
|
3327
3351
|
onClick: e
|
|
3328
3352
|
}, {
|
|
3329
|
-
default:
|
|
3353
|
+
default: J(() => [
|
|
3330
3354
|
r[0] ||= s("span", { class: "g-calendar-icon" }, [s("svg", {
|
|
3331
3355
|
role: "none presentation",
|
|
3332
3356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3333
3357
|
viewBox: "0 0 640 640"
|
|
3334
3358
|
}, [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),
|
|
3335
|
-
s("span",
|
|
3359
|
+
s("span", Ci, P(t.value?.name) + " " + P(t.value?.year), 1),
|
|
3336
3360
|
r[1] ||= s("span", { class: "g-caret" }, [s("svg", {
|
|
3337
3361
|
role: "none presentation",
|
|
3338
3362
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3341,15 +3365,15 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3341
3365
|
]),
|
|
3342
3366
|
_: 1
|
|
3343
3367
|
}, 8, ["onClick"])]),
|
|
3344
|
-
default:
|
|
3368
|
+
default: J(() => [s("h2", wi, P(e.heading), 1), l(xi, v(f(n.$props)), null, 16)]),
|
|
3345
3369
|
_: 1
|
|
3346
3370
|
})]));
|
|
3347
3371
|
}
|
|
3348
|
-
}),
|
|
3372
|
+
}), Ei = { class: "g-user-menu" }, Di = [
|
|
3349
3373
|
"aria-label",
|
|
3350
3374
|
"aria-expanded",
|
|
3351
3375
|
"onClick"
|
|
3352
|
-
],
|
|
3376
|
+
], Oi = { class: "g-user-menu__popover" }, ki = { class: "g-user-menu__list" }, Ai = /* @__PURE__ */ u({
|
|
3353
3377
|
__name: "GUserMenu",
|
|
3354
3378
|
props: {
|
|
3355
3379
|
initials: {},
|
|
@@ -3358,36 +3382,36 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3358
3382
|
label: { default: "User menu" }
|
|
3359
3383
|
},
|
|
3360
3384
|
setup(t) {
|
|
3361
|
-
let n = `${
|
|
3385
|
+
let n = `${B()}-email`, r = O(!1), a = U("emailHeading");
|
|
3362
3386
|
d()?.appContext?.components?.RouterLink;
|
|
3363
|
-
let c =
|
|
3364
|
-
return (u, d) => (
|
|
3387
|
+
let c = H();
|
|
3388
|
+
return (u, d) => (T(), o("div", Ei, [l(it, {
|
|
3365
3389
|
modelValue: r.value,
|
|
3366
3390
|
"onUpdate:modelValue": d[0] ||= (e) => r.value = e,
|
|
3367
3391
|
minimal: ""
|
|
3368
3392
|
}, {
|
|
3369
|
-
trigger:
|
|
3393
|
+
trigger: J(({ toggle: e }) => [s("button", {
|
|
3370
3394
|
class: "g-user-menu__avatar",
|
|
3371
3395
|
style: y({ backgroundColor: t.color }),
|
|
3372
3396
|
"aria-label": t.initials + " - " + t.label,
|
|
3373
3397
|
"aria-expanded": r.value,
|
|
3374
3398
|
"aria-haspopup": "menu",
|
|
3375
3399
|
onClick: e
|
|
3376
|
-
},
|
|
3377
|
-
default:
|
|
3400
|
+
}, P(t.initials), 13, Di)]),
|
|
3401
|
+
default: J(() => [s("div", Oi, [s("h2", {
|
|
3378
3402
|
id: n,
|
|
3379
3403
|
ref_key: "emailHeading",
|
|
3380
3404
|
ref: a,
|
|
3381
3405
|
class: "g-user-menu__email",
|
|
3382
3406
|
tabindex: "-1"
|
|
3383
|
-
},
|
|
3407
|
+
}, P(t.email), 513), s("nav", {
|
|
3384
3408
|
class: "g-user-menu__nav",
|
|
3385
3409
|
"aria-labelledby": n
|
|
3386
|
-
}, [s("ul",
|
|
3410
|
+
}, [s("ul", ki, [(T(!0), o(e, null, k(c.default(), (e, t) => (T(), o("li", { key: t }, [(T(), i(j(e)))]))), 128))])])])]),
|
|
3387
3411
|
_: 1
|
|
3388
3412
|
}, 8, ["modelValue"])]));
|
|
3389
3413
|
}
|
|
3390
|
-
}),
|
|
3414
|
+
}), ji = /* @__PURE__ */ u({
|
|
3391
3415
|
__name: "GCurrencyInput",
|
|
3392
3416
|
props: /* @__PURE__ */ m({
|
|
3393
3417
|
label: { default: void 0 },
|
|
@@ -3410,8 +3434,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3410
3434
|
}),
|
|
3411
3435
|
emits: ["update:modelValue"],
|
|
3412
3436
|
setup(e) {
|
|
3413
|
-
let t = e, n =
|
|
3414
|
-
return (e, r) => (
|
|
3437
|
+
let t = e, n = V(e, "modelValue");
|
|
3438
|
+
return (e, r) => (T(), i(Re, h({
|
|
3415
3439
|
modelValue: n.value,
|
|
3416
3440
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
3417
3441
|
name: t.name,
|
|
@@ -3438,7 +3462,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3438
3462
|
"form-key"
|
|
3439
3463
|
]));
|
|
3440
3464
|
}
|
|
3441
|
-
}),
|
|
3465
|
+
}), Mi = /* @__PURE__ */ u({
|
|
3442
3466
|
__name: "GEmailInput",
|
|
3443
3467
|
props: /* @__PURE__ */ m({
|
|
3444
3468
|
label: { default: void 0 },
|
|
@@ -3460,8 +3484,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3460
3484
|
}),
|
|
3461
3485
|
emits: ["update:modelValue"],
|
|
3462
3486
|
setup(e) {
|
|
3463
|
-
let t =
|
|
3464
|
-
return (n, r) => (
|
|
3487
|
+
let t = V(e, "modelValue");
|
|
3488
|
+
return (n, r) => (T(), i(Re, h({
|
|
3465
3489
|
modelValue: t.value,
|
|
3466
3490
|
"onUpdate:modelValue": r[0] ||= (e) => t.value = e,
|
|
3467
3491
|
name: e.name,
|
|
@@ -3483,13 +3507,13 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3483
3507
|
"instructions"
|
|
3484
3508
|
]));
|
|
3485
3509
|
}
|
|
3486
|
-
}),
|
|
3510
|
+
}), Ni = ["for"], Pi = {
|
|
3487
3511
|
key: 0,
|
|
3488
3512
|
class: "g-file-input-required"
|
|
3489
|
-
},
|
|
3513
|
+
}, Fi = {
|
|
3490
3514
|
key: 0,
|
|
3491
3515
|
class: "g-file-input-box-header"
|
|
3492
|
-
},
|
|
3516
|
+
}, Ii = ["id"], Li = [
|
|
3493
3517
|
"id",
|
|
3494
3518
|
"disabled",
|
|
3495
3519
|
"required",
|
|
@@ -3498,11 +3522,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3498
3522
|
"aria-invalid",
|
|
3499
3523
|
"aria-describedby",
|
|
3500
3524
|
"aria-errormessage"
|
|
3501
|
-
],
|
|
3525
|
+
], Ri = {
|
|
3502
3526
|
key: 1,
|
|
3503
3527
|
class: "g-file-input-pills",
|
|
3504
3528
|
"aria-label": "Selected files"
|
|
3505
|
-
},
|
|
3529
|
+
}, zi = /* @__PURE__ */ u({
|
|
3506
3530
|
inheritAttrs: !1,
|
|
3507
3531
|
__name: "GFileInput",
|
|
3508
3532
|
props: /* @__PURE__ */ m({
|
|
@@ -3532,12 +3556,12 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3532
3556
|
}),
|
|
3533
3557
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
3534
3558
|
setup(t, { emit: n }) {
|
|
3535
|
-
let i = t, u =
|
|
3559
|
+
let i = t, u = V(t, "modelValue"), d = B(), { displayErrors: f } = $({
|
|
3536
3560
|
name: i.name,
|
|
3537
3561
|
value: u,
|
|
3538
|
-
errors:
|
|
3562
|
+
errors: I(i, "errors"),
|
|
3539
3563
|
formKey: i.formKey
|
|
3540
|
-
}), p = n, m =
|
|
3564
|
+
}), p = n, m = O([]);
|
|
3541
3565
|
function h(e) {
|
|
3542
3566
|
let t = [];
|
|
3543
3567
|
if (i.maxFiles !== void 0 && e.length > i.maxFiles && t.push(`You may select at most ${i.maxFiles} file${i.maxFiles === 1 ? "" : "s"}.`), i.maxFileSize !== void 0) {
|
|
@@ -3554,19 +3578,19 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3554
3578
|
m.value = h(n), u.value = n, p("change", n);
|
|
3555
3579
|
}
|
|
3556
3580
|
let v = r(() => [...f.value, ...m.value]), y = r(() => v.value.length > 0), b = r(() => u.value.map((e) => e.name));
|
|
3557
|
-
return (n, r) => (
|
|
3558
|
-
t.label ? (
|
|
3581
|
+
return (n, r) => (T(), o("div", { class: _(["g-file-input-wrap", { "g-file-input-has-error": y.value }]) }, [
|
|
3582
|
+
t.label ? (T(), o("label", {
|
|
3559
3583
|
key: 0,
|
|
3560
|
-
for:
|
|
3584
|
+
for: R(d),
|
|
3561
3585
|
class: "g-file-input-label"
|
|
3562
|
-
}, [c(
|
|
3586
|
+
}, [c(P(t.label) + " ", 1), t.required ? (T(), o("span", Pi, "*")) : a("", !0)], 8, Ni)) : a("", !0),
|
|
3563
3587
|
s("div", { class: _(["g-file-input-box", { "g-file-input-box--disabled": t.disabled }]) }, [
|
|
3564
|
-
t.instructions ? (
|
|
3565
|
-
id: "instructions-" +
|
|
3588
|
+
t.instructions ? (T(), o("div", Fi, [s("span", {
|
|
3589
|
+
id: "instructions-" + R(d),
|
|
3566
3590
|
class: "g-file-input-instructions"
|
|
3567
|
-
},
|
|
3591
|
+
}, P(t.instructions), 9, Ii)])) : a("", !0),
|
|
3568
3592
|
s("input", {
|
|
3569
|
-
id:
|
|
3593
|
+
id: R(d),
|
|
3570
3594
|
type: "file",
|
|
3571
3595
|
class: "g-file-input",
|
|
3572
3596
|
disabled: t.disabled,
|
|
@@ -3574,11 +3598,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3574
3598
|
accept: t.accept || void 0,
|
|
3575
3599
|
multiple: t.multiple,
|
|
3576
3600
|
"aria-invalid": y.value ? "true" : "false",
|
|
3577
|
-
"aria-describedby": t.instructions ? "instructions-" +
|
|
3578
|
-
"aria-errormessage": y.value ? "error-message-" +
|
|
3601
|
+
"aria-describedby": t.instructions ? "instructions-" + R(d) : void 0,
|
|
3602
|
+
"aria-errormessage": y.value ? "error-message-" + R(d) : void 0,
|
|
3579
3603
|
onChange: g
|
|
3580
|
-
}, null, 40,
|
|
3581
|
-
t.multiple && b.value.length > 0 ? (
|
|
3604
|
+
}, null, 40, Li),
|
|
3605
|
+
t.multiple && b.value.length > 0 ? (T(), o("ul", Ri, [(T(!0), o(e, null, k(b.value, (e) => (T(), o("li", {
|
|
3582
3606
|
key: e,
|
|
3583
3607
|
class: "g-file-input-pill"
|
|
3584
3608
|
}, [r[0] ||= s("svg", {
|
|
@@ -3586,15 +3610,15 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3586
3610
|
role: "none presentation",
|
|
3587
3611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3588
3612
|
viewBox: "0 0 640 640"
|
|
3589
|
-
}, [s("path", { d: "M192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 234.5C512 217.5 505.3 201.2 493.3 189.2L386.7 82.7C374.7 70.7 358.5 64 341.5 64L192 64zM453.5 240L360 240C346.7 240 336 229.3 336 216L336 122.5L453.5 240z" })], -1), c(" " +
|
|
3613
|
+
}, [s("path", { d: "M192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 234.5C512 217.5 505.3 201.2 493.3 189.2L386.7 82.7C374.7 70.7 358.5 64 341.5 64L192 64zM453.5 240L360 240C346.7 240 336 229.3 336 216L336 122.5L453.5 240z" })], -1), c(" " + P(e), 1)]))), 128))])) : a("", !0)
|
|
3590
3614
|
], 2),
|
|
3591
|
-
l(
|
|
3615
|
+
l(je, {
|
|
3592
3616
|
errors: v.value,
|
|
3593
|
-
id: "error-message-" +
|
|
3617
|
+
id: "error-message-" + R(d)
|
|
3594
3618
|
}, null, 8, ["errors", "id"])
|
|
3595
3619
|
], 2));
|
|
3596
3620
|
}
|
|
3597
|
-
}),
|
|
3621
|
+
}), Bi = /* @__PURE__ */ u({
|
|
3598
3622
|
__name: "GDateInput",
|
|
3599
3623
|
props: /* @__PURE__ */ m({
|
|
3600
3624
|
label: { default: void 0 },
|
|
@@ -3617,8 +3641,8 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3617
3641
|
}),
|
|
3618
3642
|
emits: ["update:modelValue"],
|
|
3619
3643
|
setup(e) {
|
|
3620
|
-
let t = e, n =
|
|
3621
|
-
return (e, r) => (
|
|
3644
|
+
let t = e, n = V(e, "modelValue");
|
|
3645
|
+
return (e, r) => (T(), i(Re, h({
|
|
3622
3646
|
modelValue: n.value,
|
|
3623
3647
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
3624
3648
|
name: t.name,
|
|
@@ -3642,21 +3666,21 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3642
3666
|
"form-key"
|
|
3643
3667
|
]));
|
|
3644
3668
|
}
|
|
3645
|
-
}),
|
|
3669
|
+
}), Vi = { class: "g-date-range-input" }, Hi = {
|
|
3646
3670
|
key: 0,
|
|
3647
3671
|
class: "g-date-range-input__label"
|
|
3648
|
-
},
|
|
3672
|
+
}, Ui = {
|
|
3649
3673
|
key: 0,
|
|
3650
3674
|
class: "g-date-range-input__required",
|
|
3651
3675
|
"aria-hidden": "true"
|
|
3652
|
-
},
|
|
3676
|
+
}, Wi = {
|
|
3653
3677
|
key: 1,
|
|
3654
3678
|
class: "g-date-range-input__instructions"
|
|
3655
|
-
},
|
|
3679
|
+
}, Gi = { class: "g-date-range-input__fields" }, Ki = {
|
|
3656
3680
|
key: 2,
|
|
3657
3681
|
class: "g-date-range-input__errors",
|
|
3658
3682
|
role: "alert"
|
|
3659
|
-
},
|
|
3683
|
+
}, qi = /* @__PURE__ */ u({
|
|
3660
3684
|
__name: "GDateRangeInput",
|
|
3661
3685
|
props: /* @__PURE__ */ m({
|
|
3662
3686
|
label: { default: void 0 },
|
|
@@ -3683,23 +3707,23 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3683
3707
|
}),
|
|
3684
3708
|
emits: ["update:modelValue"],
|
|
3685
3709
|
setup(t) {
|
|
3686
|
-
let n = t, r =
|
|
3710
|
+
let n = t, r = V(t, "modelValue"), i = O(r.value.start || null), u = O(r.value.end || null), { displayErrors: d } = $({
|
|
3687
3711
|
name: n.name,
|
|
3688
3712
|
value: r,
|
|
3689
|
-
errors:
|
|
3713
|
+
errors: I(n, "errors"),
|
|
3690
3714
|
formKey: n.formKey
|
|
3691
3715
|
});
|
|
3692
|
-
return
|
|
3716
|
+
return K([i, u], () => {
|
|
3693
3717
|
r.value = {
|
|
3694
3718
|
start: i.value,
|
|
3695
3719
|
end: u.value
|
|
3696
3720
|
};
|
|
3697
|
-
}),
|
|
3721
|
+
}), K(r, (e) => {
|
|
3698
3722
|
e.start !== i.value && (i.value = e.start), e.end !== u.value && (u.value = e.end);
|
|
3699
|
-
}, { deep: !0 }), (t, r) => (
|
|
3700
|
-
n.label ? (
|
|
3701
|
-
n.instructions ? (
|
|
3702
|
-
s("div",
|
|
3723
|
+
}, { deep: !0 }), (t, r) => (T(), o("div", Vi, [
|
|
3724
|
+
n.label ? (T(), o("div", Hi, [c(P(n.label), 1), n.required ? (T(), o("span", Ui, " *")) : a("", !0)])) : a("", !0),
|
|
3725
|
+
n.instructions ? (T(), o("div", Wi, P(n.instructions), 1)) : a("", !0),
|
|
3726
|
+
s("div", Gi, [l(Bi, {
|
|
3703
3727
|
modelValue: i.value,
|
|
3704
3728
|
"onUpdate:modelValue": r[0] ||= (e) => i.value = e,
|
|
3705
3729
|
label: n.startLabel,
|
|
@@ -3711,7 +3735,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3711
3735
|
"label",
|
|
3712
3736
|
"disabled",
|
|
3713
3737
|
"required"
|
|
3714
|
-
]), l(
|
|
3738
|
+
]), l(Bi, {
|
|
3715
3739
|
modelValue: u.value,
|
|
3716
3740
|
"onUpdate:modelValue": r[1] ||= (e) => u.value = e,
|
|
3717
3741
|
label: n.endLabel,
|
|
@@ -3724,13 +3748,13 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3724
3748
|
"disabled",
|
|
3725
3749
|
"required"
|
|
3726
3750
|
])]),
|
|
3727
|
-
|
|
3751
|
+
R(d).length > 0 ? (T(), o("div", Ki, [(T(!0), o(e, null, k(R(d), (e, t) => (T(), o("div", {
|
|
3728
3752
|
key: t,
|
|
3729
3753
|
class: "g-date-range-input__error"
|
|
3730
|
-
},
|
|
3754
|
+
}, P(e), 1))), 128))])) : a("", !0)
|
|
3731
3755
|
]));
|
|
3732
3756
|
}
|
|
3733
|
-
}),
|
|
3757
|
+
}), Ji = ["action", "method"], Yi = /* @__PURE__ */ u({
|
|
3734
3758
|
__name: "GForm",
|
|
3735
3759
|
props: /* @__PURE__ */ m({
|
|
3736
3760
|
action: { default: void 0 },
|
|
@@ -3742,10 +3766,10 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3742
3766
|
}),
|
|
3743
3767
|
emits: /* @__PURE__ */ m(["submit"], ["update:modelValue"]),
|
|
3744
3768
|
setup(e, { emit: t }) {
|
|
3745
|
-
let n = e, r =
|
|
3746
|
-
a ||
|
|
3769
|
+
let n = e, r = V(e, "modelValue"), i = t, a = p("form", null), s = a ?? (fe() ? ke(n.formKey) : De());
|
|
3770
|
+
a || E("form", s), K(() => s.values.value, (e) => {
|
|
3747
3771
|
r.value = { ...e };
|
|
3748
|
-
}, { deep: !0 }),
|
|
3772
|
+
}, { deep: !0 }), K(() => r.value, (e) => {
|
|
3749
3773
|
e && Object.entries(e).forEach(([e, t]) => {
|
|
3750
3774
|
let n = s.fields[e];
|
|
3751
3775
|
n && n.value.value !== t && (n.value.value = t);
|
|
@@ -3759,20 +3783,20 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3759
3783
|
i("submit", e);
|
|
3760
3784
|
});
|
|
3761
3785
|
}
|
|
3762
|
-
return (e, t) => (
|
|
3786
|
+
return (e, t) => (T(), o("form", {
|
|
3763
3787
|
onSubmit: c,
|
|
3764
3788
|
action: n.action,
|
|
3765
3789
|
method: n.method,
|
|
3766
3790
|
class: "g-form",
|
|
3767
3791
|
novalidate: ""
|
|
3768
|
-
}, [
|
|
3769
|
-
isSubmitting:
|
|
3770
|
-
hasErrors:
|
|
3771
|
-
values:
|
|
3772
|
-
errors:
|
|
3773
|
-
})], 40,
|
|
3792
|
+
}, [A(e.$slots, "default", {
|
|
3793
|
+
isSubmitting: R(s).isSubmitting.value,
|
|
3794
|
+
hasErrors: R(s).hasErrors.value,
|
|
3795
|
+
values: R(s).values.value,
|
|
3796
|
+
errors: R(s).errors.value
|
|
3797
|
+
})], 40, Ji));
|
|
3774
3798
|
}
|
|
3775
|
-
}),
|
|
3799
|
+
}), Xi = /* @__PURE__ */ u({
|
|
3776
3800
|
__name: "GSubmitButton",
|
|
3777
3801
|
props: {
|
|
3778
3802
|
disabled: {
|
|
@@ -3784,32 +3808,32 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3784
3808
|
formKey: { default: "default" }
|
|
3785
3809
|
},
|
|
3786
3810
|
setup(e) {
|
|
3787
|
-
let t = e, n =
|
|
3788
|
-
return (e, n) => (
|
|
3811
|
+
let t = e, n = z(), a = typeof n["form-key"] == "string" ? n["form-key"] : void 0, o = t.formKey || a || "default", l = p("form", null) ?? (fe() ? ke(o) : null), u = r(() => t.disabled || (l?.isSubmitting.value ?? !1)), d = r(() => l?.isSubmitting.value ?? !1);
|
|
3812
|
+
return (e, n) => (T(), i(Q, {
|
|
3789
3813
|
type: "submit",
|
|
3790
3814
|
disabled: u.value,
|
|
3791
3815
|
variant: t.variant,
|
|
3792
3816
|
class: "g-submit-button"
|
|
3793
3817
|
}, {
|
|
3794
|
-
default:
|
|
3818
|
+
default: J(() => [Y(s("span", null, P(t.loadingText), 513), [[G, d.value]]), Y(s("span", null, [A(e.$slots, "default", {}, () => [n[0] ||= c("Submit", -1)])], 512), [[G, !d.value]])]),
|
|
3795
3819
|
_: 3
|
|
3796
3820
|
}, 8, ["disabled", "variant"]));
|
|
3797
3821
|
}
|
|
3798
|
-
}),
|
|
3822
|
+
}), Zi = {
|
|
3799
3823
|
key: 0,
|
|
3800
3824
|
class: "g-checkbox-group__legend"
|
|
3801
|
-
},
|
|
3825
|
+
}, Qi = {
|
|
3802
3826
|
key: 0,
|
|
3803
3827
|
class: "g-checkbox-group__required",
|
|
3804
3828
|
"aria-hidden": "true"
|
|
3805
|
-
},
|
|
3829
|
+
}, $i = {
|
|
3806
3830
|
key: 1,
|
|
3807
3831
|
class: "g-checkbox-group__label"
|
|
3808
|
-
},
|
|
3832
|
+
}, ea = {
|
|
3809
3833
|
key: 0,
|
|
3810
3834
|
class: "g-checkbox-group__required",
|
|
3811
3835
|
"aria-hidden": "true"
|
|
3812
|
-
},
|
|
3836
|
+
}, ta = ["id"], na = { class: "g-checkbox-group__options" }, ra = ["for"], ia = [
|
|
3813
3837
|
"id",
|
|
3814
3838
|
"type",
|
|
3815
3839
|
"name",
|
|
@@ -3818,7 +3842,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3818
3842
|
"disabled",
|
|
3819
3843
|
"required",
|
|
3820
3844
|
"onChange"
|
|
3821
|
-
],
|
|
3845
|
+
], aa = { class: "g-checkbox-group__label-text" }, oa = ["id"], sa = /* @__PURE__ */ u({
|
|
3822
3846
|
__name: "GCheckboxGroup",
|
|
3823
3847
|
props: /* @__PURE__ */ m({
|
|
3824
3848
|
label: { default: void 0 },
|
|
@@ -3841,10 +3865,10 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3841
3865
|
}),
|
|
3842
3866
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
3843
3867
|
setup(t, { emit: n }) {
|
|
3844
|
-
let u = t, d =
|
|
3868
|
+
let u = t, d = V(t, "modelValue"), f = B(), { displayErrors: p, hasErrors: m } = $({
|
|
3845
3869
|
name: u.name,
|
|
3846
3870
|
value: d,
|
|
3847
|
-
errors:
|
|
3871
|
+
errors: I(u, "errors"),
|
|
3848
3872
|
formKey: u.formKey
|
|
3849
3873
|
}), g = n;
|
|
3850
3874
|
function v(e) {
|
|
@@ -3854,7 +3878,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3854
3878
|
let n;
|
|
3855
3879
|
n = u.radio ? t ? [e] : [] : t ? d.value.includes(e) ? d.value : [...d.value, e] : d.value.filter((t) => t !== e), d.value = n, g("change", n);
|
|
3856
3880
|
}
|
|
3857
|
-
let b = r(() => u.radio ? "radio" : "checkbox"), x = r(() => `error-message-${f}`), S = r(() => `instructions-${f}`), C = r(() => u.radio || u.options.length > 1),
|
|
3881
|
+
let b = r(() => u.radio ? "radio" : "checkbox"), x = r(() => `error-message-${f}`), S = r(() => `instructions-${f}`), C = r(() => u.radio || u.options.length > 1), w = r(() => {
|
|
3858
3882
|
let e = [];
|
|
3859
3883
|
return u.instructions && e.push(S.value), u.radio ? {
|
|
3860
3884
|
role: "radiogroup",
|
|
@@ -3869,7 +3893,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3869
3893
|
function D(e) {
|
|
3870
3894
|
return `${f}-input-${e}`;
|
|
3871
3895
|
}
|
|
3872
|
-
function
|
|
3896
|
+
function O(e, t) {
|
|
3873
3897
|
let n = [];
|
|
3874
3898
|
return !u.radio && u.instructions && n.push(S.value), e.hint && n.push(E(t)), u.radio ? { "aria-describedby": n.length ? n.join(" ") : void 0 } : {
|
|
3875
3899
|
"aria-describedby": n.length ? n.join(" ") : void 0,
|
|
@@ -3878,15 +3902,15 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3878
3902
|
"aria-errormessage": m.value ? x.value : void 0
|
|
3879
3903
|
};
|
|
3880
3904
|
}
|
|
3881
|
-
return (n, r) => (
|
|
3882
|
-
default:
|
|
3883
|
-
C.value && t.label ? (
|
|
3884
|
-
t.instructions ? (
|
|
3905
|
+
return (n, r) => (T(), i(j(C.value ? "fieldset" : "div"), h({ class: ["g-checkbox-group", { "g-checkbox-group--error": R(m) }] }, w.value), {
|
|
3906
|
+
default: J(() => [
|
|
3907
|
+
C.value && t.label ? (T(), o("legend", Zi, [c(P(t.label), 1), t.required ? (T(), o("span", Qi, "\xA0*")) : a("", !0)])) : !C.value && t.label ? (T(), o("div", $i, [c(P(t.label), 1), t.required ? (T(), o("span", ea, "\xA0*")) : a("", !0)])) : a("", !0),
|
|
3908
|
+
t.instructions ? (T(), o("div", {
|
|
3885
3909
|
key: 2,
|
|
3886
3910
|
id: S.value,
|
|
3887
3911
|
class: "g-checkbox-group__instructions"
|
|
3888
|
-
},
|
|
3889
|
-
s("div",
|
|
3912
|
+
}, P(t.instructions), 9, ta)) : a("", !0),
|
|
3913
|
+
s("div", na, [(T(!0), o(e, null, k(t.options, (e, n) => (T(), o("div", {
|
|
3890
3914
|
key: e.value,
|
|
3891
3915
|
class: _(["g-checkbox-group__option-wrapper", { "g-checkbox-group__option-wrapper--disabled": e.disabled }])
|
|
3892
3916
|
}, [s("label", {
|
|
@@ -3895,30 +3919,30 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3895
3919
|
}, [s("input", h({
|
|
3896
3920
|
id: D(n),
|
|
3897
3921
|
type: b.value,
|
|
3898
|
-
name: t.name ||
|
|
3922
|
+
name: t.name || R(f),
|
|
3899
3923
|
value: e.value,
|
|
3900
3924
|
checked: v(e.value),
|
|
3901
3925
|
disabled: e.disabled,
|
|
3902
3926
|
required: t.required && (t.radio && n === 0 || !t.radio && t.options.length === 1),
|
|
3903
3927
|
class: "g-checkbox-group__input"
|
|
3904
|
-
}, { ref_for: !0 },
|
|
3928
|
+
}, { ref_for: !0 }, O(e, n), { onChange: (t) => y(e.value, t.target.checked) }), null, 16, ia), s("span", aa, P(e.label), 1)], 10, ra), e.hint ? (T(), o("div", {
|
|
3905
3929
|
key: 0,
|
|
3906
3930
|
id: E(n),
|
|
3907
3931
|
class: "g-checkbox-group__hint"
|
|
3908
|
-
},
|
|
3909
|
-
l(
|
|
3910
|
-
errors:
|
|
3932
|
+
}, P(e.hint), 9, oa)) : a("", !0)], 2))), 128))]),
|
|
3933
|
+
l(je, {
|
|
3934
|
+
errors: R(p),
|
|
3911
3935
|
id: x.value
|
|
3912
3936
|
}, null, 8, ["errors", "id"])
|
|
3913
3937
|
]),
|
|
3914
3938
|
_: 1
|
|
3915
3939
|
}, 16, ["class"]));
|
|
3916
3940
|
}
|
|
3917
|
-
}),
|
|
3941
|
+
}), ca = ["for"], la = {
|
|
3918
3942
|
key: 0,
|
|
3919
3943
|
class: "g-textarea-required",
|
|
3920
3944
|
"aria-hidden": "true"
|
|
3921
|
-
},
|
|
3945
|
+
}, ua = ["id"], da = [
|
|
3922
3946
|
"value",
|
|
3923
3947
|
"placeholder",
|
|
3924
3948
|
"disabled",
|
|
@@ -3927,11 +3951,11 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3927
3951
|
"rows",
|
|
3928
3952
|
"maxlength",
|
|
3929
3953
|
"aria-invalid"
|
|
3930
|
-
],
|
|
3954
|
+
], fa = {
|
|
3931
3955
|
key: 2,
|
|
3932
3956
|
class: "g-textarea-char-count",
|
|
3933
3957
|
"aria-live": "polite"
|
|
3934
|
-
},
|
|
3958
|
+
}, pa = /* @__PURE__ */ u({
|
|
3935
3959
|
inheritAttrs: !1,
|
|
3936
3960
|
__name: "GTextarea",
|
|
3937
3961
|
props: /* @__PURE__ */ m({
|
|
@@ -3965,17 +3989,17 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3965
3989
|
}),
|
|
3966
3990
|
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
3967
3991
|
setup(e, { emit: t }) {
|
|
3968
|
-
let n = e, i =
|
|
3992
|
+
let n = e, i = V(e, "modelValue"), u = B(), { attrs: d, isCustomElement: f, forwardedAttrs: p } = pe({ omitInCustomElement: ["id"] }), m = r(() => f ? u : d.id || u), { displayErrors: v, hasErrors: y } = $({
|
|
3969
3993
|
name: n.name,
|
|
3970
3994
|
value: i,
|
|
3971
|
-
errors:
|
|
3995
|
+
errors: I(n, "errors"),
|
|
3972
3996
|
formKey: n.formKey
|
|
3973
|
-
}), b = t, x =
|
|
3997
|
+
}), b = t, x = U("textareaEl");
|
|
3974
3998
|
function S() {
|
|
3975
3999
|
let e = x.value;
|
|
3976
4000
|
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
3977
4001
|
}
|
|
3978
|
-
|
|
4002
|
+
K(() => i.value, () => {
|
|
3979
4003
|
n.autoGrow && g(S);
|
|
3980
4004
|
});
|
|
3981
4005
|
function C(e) {
|
|
@@ -3987,7 +4011,7 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3987
4011
|
});
|
|
3988
4012
|
}
|
|
3989
4013
|
}
|
|
3990
|
-
function
|
|
4014
|
+
function w(e) {
|
|
3991
4015
|
i.value = e.target.value, n.autoGrow && S();
|
|
3992
4016
|
}
|
|
3993
4017
|
function E(e) {
|
|
@@ -3999,17 +4023,17 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
3999
4023
|
C(t), n.autoGrow && S();
|
|
4000
4024
|
}, 0);
|
|
4001
4025
|
}
|
|
4002
|
-
return (t, r) => (
|
|
4003
|
-
n.label ? (
|
|
4026
|
+
return (t, r) => (T(), o("div", { class: _(["g-textarea-wrap", { "g-textarea-has-error": R(y) }]) }, [
|
|
4027
|
+
n.label ? (T(), o("label", {
|
|
4004
4028
|
key: 0,
|
|
4005
4029
|
for: m.value,
|
|
4006
4030
|
class: "g-textarea-label"
|
|
4007
|
-
}, [c(
|
|
4008
|
-
t.$slots.instructions || e.instructions ? (
|
|
4031
|
+
}, [c(P(n.label), 1), n.required ? (T(), o("span", la, " *")) : a("", !0)], 8, ca)) : a("", !0),
|
|
4032
|
+
t.$slots.instructions || e.instructions ? (T(), o("div", {
|
|
4009
4033
|
key: 1,
|
|
4010
|
-
id: "instructions-" +
|
|
4034
|
+
id: "instructions-" + R(u),
|
|
4011
4035
|
class: "g-textarea-instructions"
|
|
4012
|
-
}, [
|
|
4036
|
+
}, [A(t.$slots, "instructions", {}, () => [c(P(e.instructions), 1)])], 8, ua)) : a("", !0),
|
|
4013
4037
|
s("textarea", h({
|
|
4014
4038
|
ref: "textareaEl",
|
|
4015
4039
|
value: i.value ?? "",
|
|
@@ -4021,38 +4045,38 @@ var vr = { class: "g-table-outer-wrap" }, yr = {
|
|
|
4021
4045
|
maxlength: n.maxlength ?? void 0,
|
|
4022
4046
|
class: "g-textarea"
|
|
4023
4047
|
}, {
|
|
4024
|
-
...
|
|
4048
|
+
...R(p),
|
|
4025
4049
|
id: m.value,
|
|
4026
|
-
"aria-describedby": t.$slots.instructions || e.instructions ? "instructions-" +
|
|
4027
|
-
"aria-errormessage":
|
|
4050
|
+
"aria-describedby": t.$slots.instructions || e.instructions ? "instructions-" + R(u) : void 0,
|
|
4051
|
+
"aria-errormessage": R(y) ? "error-message-" + R(u) : void 0
|
|
4028
4052
|
}, {
|
|
4029
|
-
"aria-invalid":
|
|
4030
|
-
onInput:
|
|
4053
|
+
"aria-invalid": R(y) ? "true" : "false",
|
|
4054
|
+
onInput: w,
|
|
4031
4055
|
onBlur: E,
|
|
4032
4056
|
onPaste: D
|
|
4033
|
-
}), null, 16,
|
|
4034
|
-
n.maxlength === void 0 ? a("", !0) : (
|
|
4035
|
-
l(
|
|
4036
|
-
errors:
|
|
4037
|
-
id: "error-message-" +
|
|
4057
|
+
}), null, 16, da),
|
|
4058
|
+
n.maxlength === void 0 ? a("", !0) : (T(), o("div", fa, P((i.value ?? "").length) + " / " + P(n.maxlength), 1)),
|
|
4059
|
+
l(je, {
|
|
4060
|
+
errors: R(v),
|
|
4061
|
+
id: "error-message-" + R(u)
|
|
4038
4062
|
}, null, 8, ["errors", "id"])
|
|
4039
4063
|
], 2));
|
|
4040
4064
|
}
|
|
4041
4065
|
});
|
|
4042
4066
|
//#endregion
|
|
4043
4067
|
//#region src/compose/useActiveLink.ts
|
|
4044
|
-
function
|
|
4068
|
+
function ma(e, t, n) {
|
|
4045
4069
|
let r = [
|
|
4046
4070
|
0,
|
|
4047
4071
|
.25,
|
|
4048
4072
|
.5,
|
|
4049
4073
|
.75,
|
|
4050
4074
|
1
|
|
4051
|
-
], i = `${-t}px 0px 0px 0px`, a = /* @__PURE__ */ new Map(), o =
|
|
4052
|
-
|
|
4053
|
-
o.value = Array.from(
|
|
4075
|
+
], i = `${-t}px 0px 0px 0px`, a = /* @__PURE__ */ new Map(), o = O(Array.from(ne(e)?.children || []));
|
|
4076
|
+
ce(e, () => {
|
|
4077
|
+
o.value = Array.from(ne(e)?.children || []);
|
|
4054
4078
|
}, { childList: !0 });
|
|
4055
|
-
let { stop: s } =
|
|
4079
|
+
let { stop: s } = oe(o, (e) => {
|
|
4056
4080
|
let t = o.value[o.value.length - 1];
|
|
4057
4081
|
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);
|
|
4058
4082
|
let r = null, i = 0;
|
|
@@ -4071,8 +4095,8 @@ function pa(e, t, n) {
|
|
|
4071
4095
|
}
|
|
4072
4096
|
//#endregion
|
|
4073
4097
|
//#region src/compose/useSidebar.ts
|
|
4074
|
-
function
|
|
4075
|
-
let t =
|
|
4098
|
+
function ha(e = "(max-width: 800px)") {
|
|
4099
|
+
let t = B(), n = O(!1), r = se(e, { ssrWidth: 1e3 });
|
|
4076
4100
|
function i(e) {
|
|
4077
4101
|
if (!r.value || !n.value) return;
|
|
4078
4102
|
let i = e.target, a = document.getElementById(`${t}-sidebar`);
|
|
@@ -4088,7 +4112,7 @@ function ma(e = "(max-width: 800px)") {
|
|
|
4088
4112
|
}, 5));
|
|
4089
4113
|
}
|
|
4090
4114
|
return S(() => {
|
|
4091
|
-
|
|
4115
|
+
K(r, (e) => {
|
|
4092
4116
|
e ? (document.addEventListener("mousedown", i), document.addEventListener("focusin", a)) : (document.removeEventListener("mousedown", i), document.removeEventListener("focusin", a));
|
|
4093
4117
|
}, { immediate: !0 });
|
|
4094
4118
|
}), x(() => {
|
|
@@ -4102,10 +4126,10 @@ function ma(e = "(max-width: 800px)") {
|
|
|
4102
4126
|
}
|
|
4103
4127
|
//#endregion
|
|
4104
4128
|
//#region src/compose/useTableChanges.ts
|
|
4105
|
-
function
|
|
4106
|
-
let e =
|
|
4129
|
+
function ga() {
|
|
4130
|
+
let e = M(/* @__PURE__ */ new Map()), t = ee(), n = (n) => {
|
|
4107
4131
|
let r = n.column.key, i = n.row.key, a = n.value, o = n.previousValue;
|
|
4108
|
-
e.has(i) || e.set(i,
|
|
4132
|
+
e.has(i) || e.set(i, M(/* @__PURE__ */ new Map()));
|
|
4109
4133
|
let s = e.get(i), c = s.get(r), l = c ? c.previousValue : o, u = c?.error;
|
|
4110
4134
|
if (a === l) s.delete(r), s.size === 0 && e.delete(i), t.trigger({
|
|
4111
4135
|
rowKey: i,
|
|
@@ -4205,6 +4229,6 @@ function ha() {
|
|
|
4205
4229
|
};
|
|
4206
4230
|
}
|
|
4207
4231
|
//#endregion
|
|
4208
|
-
export {
|
|
4232
|
+
export { ke as $, $n as A, Ht as B, hr as C, _r as D, mr as E, hn as F, it as G, wt as H, dn as I, Qe as J, et as K, ln as L, Cn as M, vn as N, vr as O, gn as P, $ as Q, on as R, qr as S, gr as T, yt as U, At as V, ft as W, qe as X, Ke as Y, Re as Z, hi as _, sa as a, ci as b, qi as c, Mi as d, De as et, ji as f, _i as g, xi as h, pa as i, Q as it, Rn as j, fr as k, Bi as l, Ti as m, ha as n, xe as nt, Xi as o, Ai as p, $e as q, ma as r, be as rt, Yi as s, ga as t, Ee as tt, zi as u, di as v, pr as w, ni as x, ui as y, Qt as z };
|
|
4209
4233
|
|
|
4210
|
-
//# sourceMappingURL=grad-vue-
|
|
4234
|
+
//# sourceMappingURL=grad-vue-CAmKhHhp.js.map
|