@eodash/eodash 5.0.0-alpha.2.4 → 5.0.0-alpha.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +12 -2
  2. package/core/client/SuspensedDashboard.ce.vue +1 -5
  3. package/core/client/components/DashboardLayout.vue +37 -14
  4. package/core/client/components/ErrorAlert.vue +6 -1
  5. package/core/client/components/Footer.vue +6 -1
  6. package/core/client/components/Header.vue +6 -1
  7. package/core/client/components/IframeWrapper.vue +1 -1
  8. package/core/client/components/MobileLayout.vue +41 -10
  9. package/core/client/composables/DefineEodash.js +2 -1
  10. package/core/client/composables/DefineWidgets.js +14 -8
  11. package/core/client/composables/index.js +18 -119
  12. package/core/client/eodash.js +38 -36
  13. package/core/client/plugins/index.js +3 -0
  14. package/core/client/types.d.ts +40 -83
  15. package/core/client/utils/eodashSTAC.js +29 -25
  16. package/core/client/utils/index.js +15 -11
  17. package/core/client/views/Dashboard.vue +22 -11
  18. package/dist/client/DashboardLayout-BYROtP-7.js +156 -0
  19. package/dist/client/{DynamicWebComponent-C4Hotc4H.js → DynamicWebComponent-BQhxFPM0.js} +6 -6
  20. package/dist/client/EodashDatePicker-CFltnt5d.js +1194 -0
  21. package/dist/client/EodashItemFilter-DIBDAHcc.js +65 -0
  22. package/dist/client/{EodashMap-CGrQjZ1P.js → EodashMap-C6jJ2Lb_.js} +14323 -15656
  23. package/dist/client/Footer-BVIZms1S.js +115 -0
  24. package/dist/client/Header-TsTL1d2R.js +633 -0
  25. package/dist/client/{IframeWrapper-Cg3GMmfW.js → IframeWrapper-XKChM78a.js} +4 -4
  26. package/dist/client/MobileLayout-BlGcMQra.js +957 -0
  27. package/dist/client/{VMain-BHYlmRic.js → VMain-C9XV5Lyg.js} +8 -8
  28. package/dist/client/{WidgetsContainer-dje9QSk0.js → WidgetsContainer-BQXHnZpa.js} +3 -3
  29. package/dist/client/asWebComponent-CbdGxelK.js +20188 -0
  30. package/dist/client/{decoder-HRvnjnEI-BQ2rajuJ.js → decoder-HRvnjnEI-CHAYOWhz.js} +1 -1
  31. package/dist/client/eo-dash.js +1 -1
  32. package/dist/client/forwardRefs-CyCJOFsz.js +192 -0
  33. package/dist/client/http-ZWiLaAeR.js +1337 -0
  34. package/dist/client/{index-CaDDfJYE.js → index-CabQjjQg.js} +43 -74
  35. package/dist/client/{lerc-_E46UbWQ-Beu35ovS.js → lerc-_E46UbWQ-TxBH4OeK.js} +1 -1
  36. package/dist/client/{ssrBoot-Dd7m-btU.js → ssrBoot-DWJ-z4I-.js} +3 -3
  37. package/dist/client/style.css +2 -2
  38. package/dist/client/transition-BlLt41wg.js +34 -0
  39. package/dist/node/cli.js +3 -3
  40. package/package.json +3 -4
  41. package/widgets/EodashDatePicker.vue +89 -36
  42. package/widgets/EodashItemFilter.vue +29 -13
  43. package/dist/client/DashboardLayout-ZaSRMD1M.js +0 -149
  44. package/dist/client/EodashDatePicker-C4kKjxKy.js +0 -1653
  45. package/dist/client/EodashItemFilter-cBHC0YEM.js +0 -51
  46. package/dist/client/Footer-pS636dEP.js +0 -118
  47. package/dist/client/Header-DQuaLdjl.js +0 -605
  48. package/dist/client/MobileLayout-BLXFBWI_.js +0 -987
  49. package/dist/client/asWebComponent-Bvb3xkxI.js +0 -13311
  50. package/dist/client/forwardRefs-Bxeu9Obx.js +0 -142
  51. package/dist/client/index-DlNICb3T.js +0 -34
@@ -1,987 +0,0 @@
1
- import { p as P, o as ze, m as Ye, g as M, u as Ge, r as $, c as g, a as H, V as G, b as v, F as L, d as E, k as Be, e as ie, f as ue, h as De, i as Ue, j as Ee, l as je, n as Pe, s as I, w as re, q as Ne, t as q, v as qe, x as ce, y as We, z as Ke, A as Qe, B as se, C as ae, D as Je, I as he, E as Ze, G as et, H as tt, J as me, K as nt, L as ge, M as ye, N as ot, O as lt, P as st, Q as at, R as it, S as W, T as ut, U as rt, W as ct, X as be, Y as dt, Z as vt, _ as C, $ as F, a0 as O, a1 as Se, a2 as R, a3 as we, a4 as le, a5 as Y, a6 as xe, a7 as ke, a8 as Te, a9 as ft, aa as ht } from "./asWebComponent-Bvb3xkxI.js";
2
- import { f as mt, a as gt, s as yt } from "./forwardRefs-Bxeu9Obx.js";
3
- import { u as bt } from "./ssrBoot-Dd7m-btU.js";
4
- import { M as St, V as Ve } from "./index-CaDDfJYE.js";
5
- import { V as wt } from "./VMain-BHYlmRic.js";
6
- const de = Symbol.for("vuetify:v-tabs"), xt = P({
7
- fixed: Boolean,
8
- sliderColor: String,
9
- hideSlider: Boolean,
10
- direction: {
11
- type: String,
12
- default: "horizontal"
13
- },
14
- ...ze(Ye({
15
- selectedClass: "v-tab--selected",
16
- variant: "text"
17
- }), ["active", "block", "flat", "location", "position", "symbol"])
18
- }, "VTab"), Re = M()({
19
- name: "VTab",
20
- props: xt(),
21
- setup(e, t) {
22
- let {
23
- slots: o,
24
- attrs: n
25
- } = t;
26
- const {
27
- textColorClasses: s,
28
- textColorStyles: u
29
- } = Ge(e, "sliderColor"), l = $(), f = $(), c = g(() => e.direction === "horizontal"), m = g(() => l.value?.group?.isSelected.value ?? !1);
30
- function S(r) {
31
- let {
32
- value: a
33
- } = r;
34
- if (a) {
35
- const x = l.value?.$el.parentElement?.querySelector(".v-tab--selected .v-tab__slider"), h = f.value;
36
- if (!x || !h)
37
- return;
38
- const _ = getComputedStyle(x).color, T = x.getBoundingClientRect(), V = h.getBoundingClientRect(), p = c.value ? "x" : "y", z = c.value ? "X" : "Y", y = c.value ? "right" : "bottom", b = c.value ? "width" : "height", k = T[p], A = V[p], B = k > A ? T[y] - V[y] : T[p] - V[p], K = Math.sign(B) > 0 ? c.value ? "right" : "bottom" : Math.sign(B) < 0 ? c.value ? "left" : "top" : "center", Q = (Math.abs(B) + (Math.sign(B) < 0 ? T[b] : V[b])) / Math.max(T[b], V[b]) || 0, j = T[b] / V[b] || 0, N = 1.5;
39
- gt(h, {
40
- backgroundColor: [_, "currentcolor"],
41
- transform: [`translate${z}(${B}px) scale${z}(${j})`, `translate${z}(${B / N}px) scale${z}(${(Q - 1) / N + 1})`, "none"],
42
- transformOrigin: Array(3).fill(K)
43
- }, {
44
- duration: 225,
45
- easing: yt
46
- });
47
- }
48
- }
49
- return H(() => {
50
- const r = G.filterProps(e);
51
- return v(G, E({
52
- symbol: de,
53
- ref: l,
54
- class: ["v-tab", e.class],
55
- style: e.style,
56
- tabindex: m.value ? 0 : -1,
57
- role: "tab",
58
- "aria-selected": String(m.value),
59
- active: !1
60
- }, r, n, {
61
- block: e.fixed,
62
- maxWidth: e.fixed ? 300 : void 0,
63
- "onGroup:selected": S
64
- }), {
65
- ...o,
66
- default: () => v(L, null, [o.default?.() ?? e.text, !e.hideSlider && v("div", {
67
- ref: f,
68
- class: ["v-tab__slider", s.value],
69
- style: u.value
70
- }, null)])
71
- });
72
- }), mt({}, l);
73
- }
74
- }), kt = (e) => {
75
- const {
76
- touchstartX: t,
77
- touchendX: o,
78
- touchstartY: n,
79
- touchendY: s
80
- } = e, u = 0.5, l = 16;
81
- e.offsetX = o - t, e.offsetY = s - n, Math.abs(e.offsetY) < u * Math.abs(e.offsetX) && (e.left && o < t - l && e.left(e), e.right && o > t + l && e.right(e)), Math.abs(e.offsetX) < u * Math.abs(e.offsetY) && (e.up && s < n - l && e.up(e), e.down && s > n + l && e.down(e));
82
- };
83
- function Tt(e, t) {
84
- const o = e.changedTouches[0];
85
- t.touchstartX = o.clientX, t.touchstartY = o.clientY, t.start?.({
86
- originalEvent: e,
87
- ...t
88
- });
89
- }
90
- function Vt(e, t) {
91
- const o = e.changedTouches[0];
92
- t.touchendX = o.clientX, t.touchendY = o.clientY, t.end?.({
93
- originalEvent: e,
94
- ...t
95
- }), kt(t);
96
- }
97
- function Ct(e, t) {
98
- const o = e.changedTouches[0];
99
- t.touchmoveX = o.clientX, t.touchmoveY = o.clientY, t.move?.({
100
- originalEvent: e,
101
- ...t
102
- });
103
- }
104
- function It() {
105
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
106
- const t = {
107
- touchstartX: 0,
108
- touchstartY: 0,
109
- touchendX: 0,
110
- touchendY: 0,
111
- touchmoveX: 0,
112
- touchmoveY: 0,
113
- offsetX: 0,
114
- offsetY: 0,
115
- left: e.left,
116
- right: e.right,
117
- up: e.up,
118
- down: e.down,
119
- start: e.start,
120
- move: e.move,
121
- end: e.end
122
- };
123
- return {
124
- touchstart: (o) => Tt(o, t),
125
- touchend: (o) => Vt(o, t),
126
- touchmove: (o) => Ct(o, t)
127
- };
128
- }
129
- function _t(e, t) {
130
- const o = t.value, n = o?.parent ? e.parentElement : e, s = o?.options ?? {
131
- passive: !0
132
- }, u = t.instance?.$.uid;
133
- if (!n || !u)
134
- return;
135
- const l = It(t.value);
136
- n._touchHandlers = n._touchHandlers ?? /* @__PURE__ */ Object.create(null), n._touchHandlers[u] = l, Be(l).forEach((f) => {
137
- n.addEventListener(f, l[f], s);
138
- });
139
- }
140
- function pt(e, t) {
141
- const o = t.value?.parent ? e.parentElement : e, n = t.instance?.$.uid;
142
- if (!o?._touchHandlers || !n)
143
- return;
144
- const s = o._touchHandlers[n];
145
- Be(s).forEach((u) => {
146
- o.removeEventListener(u, s[u]);
147
- }), delete o._touchHandlers[n];
148
- }
149
- const $e = {
150
- mounted: _t,
151
- unmounted: pt
152
- }, zt = $e, Me = Symbol.for("vuetify:v-window"), He = Symbol.for("vuetify:v-window-group"), Ae = P({
153
- continuous: Boolean,
154
- nextIcon: {
155
- type: [Boolean, String, Function, Object],
156
- default: "$next"
157
- },
158
- prevIcon: {
159
- type: [Boolean, String, Function, Object],
160
- default: "$prev"
161
- },
162
- reverse: Boolean,
163
- showArrows: {
164
- type: [Boolean, String],
165
- validator: (e) => typeof e == "boolean" || e === "hover"
166
- },
167
- touch: {
168
- type: [Object, Boolean],
169
- default: void 0
170
- },
171
- direction: {
172
- type: String,
173
- default: "horizontal"
174
- },
175
- modelValue: null,
176
- disabled: Boolean,
177
- selectedClass: {
178
- type: String,
179
- default: "v-window-item--active"
180
- },
181
- // TODO: mandatory should probably not be exposed but do this for now
182
- mandatory: {
183
- type: [Boolean, String],
184
- default: "force"
185
- },
186
- ...ie(),
187
- ...ue(),
188
- ...De()
189
- }, "VWindow"), Ce = M()({
190
- name: "VWindow",
191
- directives: {
192
- Touch: $e
193
- },
194
- props: Ae(),
195
- emits: {
196
- "update:modelValue": (e) => !0
197
- },
198
- setup(e, t) {
199
- let {
200
- slots: o
201
- } = t;
202
- const {
203
- themeClasses: n
204
- } = Ue(e), {
205
- isRtl: s
206
- } = Ee(), {
207
- t: u
208
- } = je(), l = Pe(e, He), f = $(), c = g(() => s.value ? !e.reverse : e.reverse), m = I(!1), S = g(() => {
209
- const y = e.direction === "vertical" ? "y" : "x", k = (c.value ? !m.value : m.value) ? "-reverse" : "";
210
- return `v-window-${y}${k}-transition`;
211
- }), r = I(0), a = $(void 0), x = g(() => l.items.value.findIndex((y) => l.selected.value.includes(y.id)));
212
- re(x, (y, b) => {
213
- const k = l.items.value.length, A = k - 1;
214
- k <= 2 ? m.value = y < b : y === A && b === 0 ? m.value = !0 : y === 0 && b === A ? m.value = !1 : m.value = y < b;
215
- }), Ne(Me, {
216
- transition: S,
217
- isReversed: m,
218
- transitionCount: r,
219
- transitionHeight: a,
220
- rootRef: f
221
- });
222
- const h = g(() => e.continuous || x.value !== 0), _ = g(() => e.continuous || x.value !== l.items.value.length - 1);
223
- function T() {
224
- h.value && l.prev();
225
- }
226
- function V() {
227
- _.value && l.next();
228
- }
229
- const p = g(() => {
230
- const y = [], b = {
231
- icon: s.value ? e.nextIcon : e.prevIcon,
232
- class: `v-window__${c.value ? "right" : "left"}`,
233
- onClick: l.prev,
234
- "aria-label": u("$vuetify.carousel.prev")
235
- };
236
- y.push(h.value ? o.prev ? o.prev({
237
- props: b
238
- }) : v(G, b, null) : v("div", null, null));
239
- const k = {
240
- icon: s.value ? e.prevIcon : e.nextIcon,
241
- class: `v-window__${c.value ? "left" : "right"}`,
242
- onClick: l.next,
243
- "aria-label": u("$vuetify.carousel.next")
244
- };
245
- return y.push(_.value ? o.next ? o.next({
246
- props: k
247
- }) : v(G, k, null) : v("div", null, null)), y;
248
- }), z = g(() => e.touch === !1 ? e.touch : {
249
- ...{
250
- left: () => {
251
- c.value ? T() : V();
252
- },
253
- right: () => {
254
- c.value ? V() : T();
255
- },
256
- start: (b) => {
257
- let {
258
- originalEvent: k
259
- } = b;
260
- k.stopPropagation();
261
- }
262
- },
263
- ...e.touch === !0 ? {} : e.touch
264
- });
265
- return H(() => q(v(e.tag, {
266
- ref: f,
267
- class: ["v-window", {
268
- "v-window--show-arrows-on-hover": e.showArrows === "hover"
269
- }, n.value, e.class],
270
- style: e.style
271
- }, {
272
- default: () => [v("div", {
273
- class: "v-window__container",
274
- style: {
275
- height: a.value
276
- }
277
- }, [o.default?.({
278
- group: l
279
- }), e.showArrows !== !1 && v("div", {
280
- class: "v-window__controls"
281
- }, [p.value])]), o.additional?.({
282
- group: l
283
- })]
284
- }), [[qe("touch"), z.value]])), {
285
- group: l
286
- };
287
- }
288
- }), Bt = P({
289
- ...ze(Ae(), ["continuous", "nextIcon", "prevIcon", "showArrows", "touch", "mandatory"])
290
- }, "VTabsWindow"), Et = M()({
291
- name: "VTabsWindow",
292
- props: Bt(),
293
- emits: {
294
- "update:modelValue": (e) => !0
295
- },
296
- setup(e, t) {
297
- let {
298
- slots: o
299
- } = t;
300
- const n = ce(de, null), s = We(e, "modelValue"), u = g({
301
- get() {
302
- return s.value != null || !n ? s.value : n.items.value.find((l) => n.selected.value.includes(l.id))?.value;
303
- },
304
- set(l) {
305
- s.value = l;
306
- }
307
- });
308
- return H(() => {
309
- const l = Ce.filterProps(e);
310
- return v(Ce, E({
311
- _as: "VTabsWindow"
312
- }, l, {
313
- modelValue: u.value,
314
- "onUpdate:modelValue": (f) => u.value = f,
315
- class: ["v-tabs-window", e.class],
316
- style: e.style,
317
- mandatory: !1,
318
- touch: !1
319
- }), o);
320
- }), {};
321
- }
322
- }), Pt = P({
323
- eager: Boolean
324
- }, "lazy");
325
- function Wt(e, t) {
326
- const o = I(!1), n = g(() => o.value || e.eager || t.value);
327
- re(t, () => o.value = !0);
328
- function s() {
329
- e.eager || (o.value = !1);
330
- }
331
- return {
332
- isBooted: o,
333
- hasContent: n,
334
- onAfterLeave: s
335
- };
336
- }
337
- const Fe = P({
338
- reverseTransition: {
339
- type: [Boolean, String],
340
- default: void 0
341
- },
342
- transition: {
343
- type: [Boolean, String],
344
- default: void 0
345
- },
346
- ...ie(),
347
- ...Ke(),
348
- ...Pt()
349
- }, "VWindowItem"), Ie = M()({
350
- name: "VWindowItem",
351
- directives: {
352
- Touch: zt
353
- },
354
- props: Fe(),
355
- emits: {
356
- "group:selected": (e) => !0
357
- },
358
- setup(e, t) {
359
- let {
360
- slots: o
361
- } = t;
362
- const n = ce(Me), s = Qe(e, He), {
363
- isBooted: u
364
- } = bt();
365
- if (!n || !s)
366
- throw new Error("[Vuetify] VWindowItem must be used inside VWindow");
367
- const l = I(!1), f = g(() => u.value && (n.isReversed.value ? e.reverseTransition !== !1 : e.transition !== !1));
368
- function c() {
369
- !l.value || !n || (l.value = !1, n.transitionCount.value > 0 && (n.transitionCount.value -= 1, n.transitionCount.value === 0 && (n.transitionHeight.value = void 0)));
370
- }
371
- function m() {
372
- l.value || !n || (l.value = !0, n.transitionCount.value === 0 && (n.transitionHeight.value = ae(n.rootRef.value?.clientHeight)), n.transitionCount.value += 1);
373
- }
374
- function S() {
375
- c();
376
- }
377
- function r(h) {
378
- l.value && Je(() => {
379
- !f.value || !l.value || !n || (n.transitionHeight.value = ae(h.clientHeight));
380
- });
381
- }
382
- const a = g(() => {
383
- const h = n.isReversed.value ? e.reverseTransition : e.transition;
384
- return f.value ? {
385
- name: typeof h != "string" ? n.transition.value : h,
386
- onBeforeEnter: m,
387
- onAfterEnter: c,
388
- onEnterCancelled: S,
389
- onBeforeLeave: m,
390
- onAfterLeave: c,
391
- onLeaveCancelled: S,
392
- onEnter: r
393
- } : !1;
394
- }), {
395
- hasContent: x
396
- } = Wt(e, s.isSelected);
397
- return H(() => v(St, {
398
- transition: a.value,
399
- disabled: !u.value
400
- }, {
401
- default: () => [q(v("div", {
402
- class: ["v-window-item", s.selectedClass.value, e.class],
403
- style: e.style
404
- }, [x.value && o.default?.()]), [[se, s.isSelected.value]])]
405
- })), {
406
- groupItem: s
407
- };
408
- }
409
- }), Rt = P({
410
- ...Fe()
411
- }, "VTabsWindowItem"), $t = M()({
412
- name: "VTabsWindowItem",
413
- props: Rt(),
414
- setup(e, t) {
415
- let {
416
- slots: o
417
- } = t;
418
- return H(() => {
419
- const n = Ie.filterProps(e);
420
- return v(Ie, E({
421
- _as: "VTabsWindowItem"
422
- }, n, {
423
- class: ["v-tabs-window-item", e.class],
424
- style: e.style
425
- }), o);
426
- }), {};
427
- }
428
- });
429
- function Mt(e) {
430
- let {
431
- selectedElement: t,
432
- containerElement: o,
433
- isRtl: n,
434
- isHorizontal: s
435
- } = e;
436
- const u = D(s, o), l = Oe(s, n, o), f = D(s, t), c = Le(s, t), m = f * 0.4;
437
- return l > c ? c - m : l + u < c + f ? c - u + f + m : l;
438
- }
439
- function Ht(e) {
440
- let {
441
- selectedElement: t,
442
- containerElement: o,
443
- isHorizontal: n
444
- } = e;
445
- const s = D(n, o), u = Le(n, t), l = D(n, t);
446
- return u - s / 2 + l / 2;
447
- }
448
- function _e(e, t) {
449
- return t?.[e ? "scrollWidth" : "scrollHeight"] || 0;
450
- }
451
- function At(e, t) {
452
- return t?.[e ? "clientWidth" : "clientHeight"] || 0;
453
- }
454
- function Oe(e, t, o) {
455
- if (!o)
456
- return 0;
457
- const {
458
- scrollLeft: n,
459
- offsetWidth: s,
460
- scrollWidth: u
461
- } = o;
462
- return e ? t ? u - s + n : n : o.scrollTop;
463
- }
464
- function D(e, t) {
465
- return t?.[e ? "offsetWidth" : "offsetHeight"] || 0;
466
- }
467
- function Le(e, t) {
468
- return t?.[e ? "offsetLeft" : "offsetTop"] || 0;
469
- }
470
- const Ft = Symbol.for("vuetify:v-slide-group"), Xe = P({
471
- centerActive: Boolean,
472
- direction: {
473
- type: String,
474
- default: "horizontal"
475
- },
476
- symbol: {
477
- type: null,
478
- default: Ft
479
- },
480
- nextIcon: {
481
- type: he,
482
- default: "$next"
483
- },
484
- prevIcon: {
485
- type: he,
486
- default: "$prev"
487
- },
488
- showArrows: {
489
- type: [Boolean, String],
490
- validator: (e) => typeof e == "boolean" || ["always", "desktop", "mobile"].includes(e)
491
- },
492
- ...ie(),
493
- ...Ze({
494
- mobile: null
495
- }),
496
- ...ue(),
497
- ...et({
498
- selectedClass: "v-slide-group-item--active"
499
- })
500
- }, "VSlideGroup"), pe = M()({
501
- name: "VSlideGroup",
502
- props: Xe(),
503
- emits: {
504
- "update:modelValue": (e) => !0
505
- },
506
- setup(e, t) {
507
- let {
508
- slots: o
509
- } = t;
510
- const {
511
- isRtl: n
512
- } = Ee(), {
513
- displayClasses: s,
514
- mobile: u
515
- } = tt(e), l = Pe(e, e.symbol), f = I(!1), c = I(0), m = I(0), S = I(0), r = g(() => e.direction === "horizontal"), {
516
- resizeRef: a,
517
- contentRect: x
518
- } = me(), {
519
- resizeRef: h,
520
- contentRect: _
521
- } = me(), T = nt(), V = g(() => ({
522
- container: a.el,
523
- duration: 200,
524
- easing: "easeOutQuart"
525
- })), p = g(() => l.selected.value.length ? l.items.value.findIndex((i) => i.id === l.selected.value[0]) : -1), z = g(() => l.selected.value.length ? l.items.value.findIndex((i) => i.id === l.selected.value[l.selected.value.length - 1]) : -1);
526
- if (ge) {
527
- let i = -1;
528
- re(() => [l.selected.value, x.value, _.value, r.value], () => {
529
- cancelAnimationFrame(i), i = requestAnimationFrame(() => {
530
- if (x.value && _.value) {
531
- const d = r.value ? "width" : "height";
532
- m.value = x.value[d], S.value = _.value[d], f.value = m.value + 1 < S.value;
533
- }
534
- if (p.value >= 0 && h.el) {
535
- const d = h.el.children[z.value];
536
- b(d, e.centerActive);
537
- }
538
- });
539
- });
540
- }
541
- const y = I(!1);
542
- function b(i, d) {
543
- let w = 0;
544
- d ? w = Ht({
545
- containerElement: a.el,
546
- isHorizontal: r.value,
547
- selectedElement: i
548
- }) : w = Mt({
549
- containerElement: a.el,
550
- isHorizontal: r.value,
551
- isRtl: n.value,
552
- selectedElement: i
553
- }), k(w);
554
- }
555
- function k(i) {
556
- if (!ge || !a.el)
557
- return;
558
- const d = D(r.value, a.el), w = Oe(r.value, n.value, a.el);
559
- if (!(_e(r.value, a.el) <= d || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
560
- Math.abs(i - w) < 16)) {
561
- if (r.value && n.value && a.el) {
562
- const {
563
- scrollWidth: ne,
564
- offsetWidth: oe
565
- } = a.el;
566
- i = ne - oe - i;
567
- }
568
- r.value ? T.horizontal(i, V.value) : T(i, V.value);
569
- }
570
- }
571
- function A(i) {
572
- const {
573
- scrollTop: d,
574
- scrollLeft: w
575
- } = i.target;
576
- c.value = r.value ? w : d;
577
- }
578
- function B(i) {
579
- if (y.value = !0, !(!f.value || !h.el)) {
580
- for (const d of i.composedPath())
581
- for (const w of h.el.children)
582
- if (w === d) {
583
- b(w);
584
- return;
585
- }
586
- }
587
- }
588
- function K(i) {
589
- y.value = !1;
590
- }
591
- let U = !1;
592
- function Q(i) {
593
- !U && !y.value && !(i.relatedTarget && h.el?.contains(i.relatedTarget)) && X(), U = !1;
594
- }
595
- function j() {
596
- U = !0;
597
- }
598
- function N(i) {
599
- if (!h.el)
600
- return;
601
- function d(w) {
602
- i.preventDefault(), X(w);
603
- }
604
- r.value ? i.key === "ArrowRight" ? d(n.value ? "prev" : "next") : i.key === "ArrowLeft" && d(n.value ? "next" : "prev") : i.key === "ArrowDown" ? d("next") : i.key === "ArrowUp" && d("prev"), i.key === "Home" ? d("first") : i.key === "End" && d("last");
605
- }
606
- function X(i) {
607
- if (!h.el)
608
- return;
609
- let d;
610
- if (!i)
611
- d = ot(h.el)[0];
612
- else if (i === "next") {
613
- if (d = h.el.querySelector(":focus")?.nextElementSibling, !d)
614
- return X("first");
615
- } else if (i === "prev") {
616
- if (d = h.el.querySelector(":focus")?.previousElementSibling, !d)
617
- return X("last");
618
- } else
619
- i === "first" ? d = h.el.firstElementChild : i === "last" && (d = h.el.lastElementChild);
620
- d && d.focus({
621
- preventScroll: !0
622
- });
623
- }
624
- function J(i) {
625
- const d = r.value && n.value ? -1 : 1, w = (i === "prev" ? -d : d) * m.value;
626
- let te = c.value + w;
627
- if (r.value && n.value && a.el) {
628
- const {
629
- scrollWidth: ne,
630
- offsetWidth: oe
631
- } = a.el;
632
- te += ne - oe;
633
- }
634
- k(te);
635
- }
636
- const Z = g(() => ({
637
- next: l.next,
638
- prev: l.prev,
639
- select: l.select,
640
- isSelected: l.isSelected
641
- })), ee = g(() => {
642
- switch (e.showArrows) {
643
- case "always":
644
- return !0;
645
- case "desktop":
646
- return !u.value;
647
- case !0:
648
- return f.value || Math.abs(c.value) > 0;
649
- case "mobile":
650
- return u.value || f.value || Math.abs(c.value) > 0;
651
- default:
652
- return !u.value && (f.value || Math.abs(c.value) > 0);
653
- }
654
- }), ve = g(() => Math.abs(c.value) > 1), fe = g(() => {
655
- if (!a.value)
656
- return !1;
657
- const i = _e(r.value, a.el), d = At(r.value, a.el);
658
- return i - d - Math.abs(c.value) > 1;
659
- });
660
- return H(() => v(e.tag, {
661
- class: ["v-slide-group", {
662
- "v-slide-group--vertical": !r.value,
663
- "v-slide-group--has-affixes": ee.value,
664
- "v-slide-group--is-overflowing": f.value
665
- }, s.value, e.class],
666
- style: e.style,
667
- tabindex: y.value || l.selected.value.length ? -1 : 0,
668
- onFocus: Q
669
- }, {
670
- default: () => [ee.value && v("div", {
671
- key: "prev",
672
- class: ["v-slide-group__prev", {
673
- "v-slide-group__prev--disabled": !ve.value
674
- }],
675
- onMousedown: j,
676
- onClick: () => ve.value && J("prev")
677
- }, [o.prev?.(Z.value) ?? v(Ve, null, {
678
- default: () => [v(ye, {
679
- icon: n.value ? e.nextIcon : e.prevIcon
680
- }, null)]
681
- })]), v("div", {
682
- key: "container",
683
- ref: a,
684
- class: "v-slide-group__container",
685
- onScroll: A
686
- }, [v("div", {
687
- ref: h,
688
- class: "v-slide-group__content",
689
- onFocusin: B,
690
- onFocusout: K,
691
- onKeydown: N
692
- }, [o.default?.(Z.value)])]), ee.value && v("div", {
693
- key: "next",
694
- class: ["v-slide-group__next", {
695
- "v-slide-group__next--disabled": !fe.value
696
- }],
697
- onMousedown: j,
698
- onClick: () => fe.value && J("next")
699
- }, [o.next?.(Z.value) ?? v(Ve, null, {
700
- default: () => [v(ye, {
701
- icon: n.value ? e.prevIcon : e.nextIcon
702
- }, null)]
703
- })])]
704
- })), {
705
- selected: l.selected,
706
- scrollTo: J,
707
- scrollOffset: c,
708
- focus: X
709
- };
710
- }
711
- });
712
- function Ot() {
713
- const t = lt("useScopeId").vnode.scopeId;
714
- return {
715
- scopeId: t ? {
716
- [t]: ""
717
- } : void 0
718
- };
719
- }
720
- function Lt(e) {
721
- return e ? e.map((t) => rt(t) ? t : {
722
- text: t,
723
- value: t
724
- }) : [];
725
- }
726
- const Xt = P({
727
- alignTabs: {
728
- type: String,
729
- default: "start"
730
- },
731
- color: String,
732
- fixedTabs: Boolean,
733
- items: {
734
- type: Array,
735
- default: () => []
736
- },
737
- stacked: Boolean,
738
- bgColor: String,
739
- grow: Boolean,
740
- height: {
741
- type: [Number, String],
742
- default: void 0
743
- },
744
- hideSlider: Boolean,
745
- sliderColor: String,
746
- ...Xe({
747
- mandatory: "force",
748
- selectedClass: "v-tab-item--selected"
749
- }),
750
- ...st(),
751
- ...ue()
752
- }, "VTabs"), Yt = M()({
753
- name: "VTabs",
754
- props: Xt(),
755
- emits: {
756
- "update:modelValue": (e) => !0
757
- },
758
- setup(e, t) {
759
- let {
760
- attrs: o,
761
- slots: n
762
- } = t;
763
- const s = We(e, "modelValue"), u = g(() => Lt(e.items)), {
764
- densityClasses: l
765
- } = at(e), {
766
- backgroundColorClasses: f,
767
- backgroundColorStyles: c
768
- } = it(W(e, "bgColor")), {
769
- scopeId: m
770
- } = Ot();
771
- return ut({
772
- VTab: {
773
- color: W(e, "color"),
774
- direction: W(e, "direction"),
775
- stacked: W(e, "stacked"),
776
- fixed: W(e, "fixedTabs"),
777
- sliderColor: W(e, "sliderColor"),
778
- hideSlider: W(e, "hideSlider")
779
- }
780
- }), H(() => {
781
- const S = pe.filterProps(e), r = !!(n.window || e.items.length > 0);
782
- return v(L, null, [v(pe, E(S, {
783
- modelValue: s.value,
784
- "onUpdate:modelValue": (a) => s.value = a,
785
- class: ["v-tabs", `v-tabs--${e.direction}`, `v-tabs--align-tabs-${e.alignTabs}`, {
786
- "v-tabs--fixed-tabs": e.fixedTabs,
787
- "v-tabs--grow": e.grow,
788
- "v-tabs--stacked": e.stacked
789
- }, l.value, f.value, e.class],
790
- style: [{
791
- "--v-tabs-height": ae(e.height)
792
- }, c.value, e.style],
793
- role: "tablist",
794
- symbol: de
795
- }, m, o), {
796
- default: () => [n.default?.() ?? u.value.map((a) => n.tab?.({
797
- item: a
798
- }) ?? v(Re, E(a, {
799
- key: a.text,
800
- value: a.value
801
- }), {
802
- default: () => n[`tab.${a.value}`]?.({
803
- item: a
804
- })
805
- }))]
806
- }), r && v(Et, E({
807
- modelValue: s.value,
808
- "onUpdate:modelValue": (a) => s.value = a,
809
- key: "tabs-window"
810
- }, m), {
811
- default: () => [u.value.map((a) => n.item?.({
812
- item: a
813
- }) ?? v($t, {
814
- value: a.value
815
- }, {
816
- default: () => n[`item.${a.value}`]?.({
817
- item: a
818
- })
819
- })), n.window?.()]
820
- })]);
821
- }), {};
822
- }
823
- }), Gt = { style: { height: "90% !important" } }, Kt = {
824
- __name: "MobileLayout",
825
- setup(e) {
826
- const t = (
827
- /** @type {import("@/types").Eodash} */
828
- ce(ct)
829
- ), o = t.template.widgets, n = be(o), [s] = be([t.template?.background]), { mainRect: u } = dt(), l = $(-1), f = $(null), c = $("");
830
- return vt(() => {
831
- c.value = u.value.bottom + /** @type {HTMLElement} */
832
- (f.value?.$el?.clientHeight ?? 0) + "px";
833
- }), (m, S) => (C(), F(wt, {
834
- class: "overflow-hidden",
835
- style: { height: "91dvh" }
836
- }, {
837
- default: O(() => [
838
- (C(), F(Se, { suspensible: "" }, {
839
- default: O(() => [
840
- R(s).component ? (C(), F(
841
- we(R(s).component),
842
- E({
843
- key: 0,
844
- id: "bg-widget"
845
- }, R(s).props),
846
- null,
847
- 16
848
- /* FULL_PROPS */
849
- )) : le("v-if", !0)
850
- ]),
851
- _: 1
852
- /* STABLE */
853
- })),
854
- (C(!0), Y(
855
- L,
856
- null,
857
- xe(R(n), (r, a) => (C(), Y(
858
- L,
859
- { key: a },
860
- [
861
- r.value.component ? q((C(), Y(
862
- "div",
863
- {
864
- key: 0,
865
- id: "overlay",
866
- class: "pa-2",
867
- style: ke({
868
- bottom: c.value,
869
- position: "absolute",
870
- overflow: "hidden",
871
- width: "100%",
872
- left: 0,
873
- top: R(u).top + "px",
874
- zIndex: 1,
875
- background: "rgb(var(--v-theme-surface))"
876
- })
877
- },
878
- [
879
- v(G, {
880
- icon: "",
881
- variant: "text",
882
- style: { height: "5%", position: "relative" },
883
- onClick: S[0] || (S[0] = (x) => l.value = -1)
884
- }, {
885
- default: O(() => [
886
- Te("✕")
887
- ]),
888
- _: 1
889
- /* STABLE */
890
- }),
891
- (C(), F(
892
- Se,
893
- { suspensible: "" },
894
- {
895
- default: O(() => [
896
- q(ft(
897
- "div",
898
- Gt,
899
- [
900
- (C(), F(
901
- we(r.value.component),
902
- E({
903
- key: r.value.id,
904
- ref_for: !0
905
- }, r.value.props),
906
- null,
907
- 16
908
- /* FULL_PROPS */
909
- ))
910
- ],
911
- 512
912
- /* NEED_PATCH */
913
- ), [
914
- [se, l.value === a]
915
- ])
916
- ]),
917
- _: 2
918
- /* DYNAMIC */
919
- },
920
- 1024
921
- /* DYNAMIC_SLOTS */
922
- ))
923
- ],
924
- 4
925
- /* STYLE */
926
- )), [
927
- [se, l.value === a]
928
- ]) : le("v-if", !0)
929
- ],
930
- 64
931
- /* STABLE_FRAGMENT */
932
- ))),
933
- 128
934
- /* KEYED_FRAGMENT */
935
- )),
936
- v(Yt, {
937
- ref_key: "tabs",
938
- ref: f,
939
- "align-tabs": "center",
940
- "bg-color": "surface",
941
- style: ke({ position: "relative", bottom: (R(u).bottom || 48) + "px", zIndex: 10 }),
942
- "show-arrows": "",
943
- modelValue: l.value,
944
- "onUpdate:modelValue": S[1] || (S[1] = (r) => l.value = r)
945
- }, {
946
- default: O(() => [
947
- (C(!0), Y(
948
- L,
949
- null,
950
- xe(R(n), (r, a) => (C(), Y(
951
- L,
952
- { key: a },
953
- [
954
- r.value.component ? (C(), F(Re, {
955
- key: 0,
956
- value: a
957
- }, {
958
- default: O(() => [
959
- Te(
960
- ht(r.value.title),
961
- 1
962
- /* TEXT */
963
- )
964
- ]),
965
- _: 2
966
- /* DYNAMIC */
967
- }, 1032, ["value"])) : le("v-if", !0)
968
- ],
969
- 64
970
- /* STABLE_FRAGMENT */
971
- ))),
972
- 128
973
- /* KEYED_FRAGMENT */
974
- ))
975
- ]),
976
- _: 1
977
- /* STABLE */
978
- }, 8, ["style", "modelValue"])
979
- ]),
980
- _: 1
981
- /* STABLE */
982
- }));
983
- }
984
- };
985
- export {
986
- Kt as default
987
- };