@base-framework/ui 1.0.226 → 1.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { V as w, a as R } from "./veil-D4dRxILB.js";
|
|
|
5
5
|
import { Icons as E } from "./icons.es.js";
|
|
6
6
|
import { A as O, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as ea, a as sa, b as oa, I as ta, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-2O1fITpG.js";
|
|
7
7
|
import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ra, p as Ua } from "./calendar-Bn55oWBo.js";
|
|
8
|
-
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-
|
|
8
|
+
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-BImd7j5m.js";
|
|
9
9
|
import { B as Se, I as Be, M as Pe, d as Fe, e as Me, g as ke, N as Ne, b as fe, a as ve, f as xe, P as ye, c as he, S as We, T as He } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
10
10
|
import { B as Ae, a as we, C as Re, F as Ue, b as Ee, c as Ge, M as Oe, P as Ve, S as je } from "./sidebar-menu-page-BVryQj2Z.js";
|
|
11
11
|
import { A as ze, F as Je, M as _e, a as Ke, T as Qe } from "./aside-template-McEj_Gxc.js";
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-
|
|
1
|
+
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-BImd7j5m.js";
|
|
2
2
|
import { b as U, C as G, D as R, a as j, F as q, M as w, c as z, p as A } from "./calendar-Bn55oWBo.js";
|
|
3
3
|
import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
4
4
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as f, Component as g, Data as
|
|
1
|
+
import { Button as M, Div as o, On as w, Span as L, OnState as K, Th as H, UseParent as G, I as J, Thead as _, Tr as V, Table as P, P as x, Li as T, Time as Z, Nav as B, Ul as k, Section as U, Canvas as tt } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as f, Component as g, Data as R, DateTime as $, router as I, NavLink as E, DataTracker as Q, Jot as et, base as O, Dom as z } from "@base-framework/base";
|
|
3
3
|
import { B as m, I as st } from "./buttons-Cm9etaEG.js";
|
|
4
4
|
import { Icons as b } from "./icons.es.js";
|
|
5
|
-
import { F as at, p as
|
|
5
|
+
import { F as at, p as C, A as nt, P as it } from "./calendar-Bn55oWBo.js";
|
|
6
6
|
import { TableBody as ot, DataTableBody as lt, ScrollableTableBody as rt, List as ct, IntervalTimer as dt } from "@base-framework/organisms";
|
|
7
7
|
import { C as ht, I as ut, H as ft } from "./inputs-CMjx5-IX.js";
|
|
8
8
|
f((e, t) => ({
|
|
@@ -10,7 +10,7 @@ f((e, t) => ({
|
|
|
10
10
|
...e,
|
|
11
11
|
children: t
|
|
12
12
|
}));
|
|
13
|
-
f(({ value: e, label: t }) =>
|
|
13
|
+
f(({ value: e, label: t }) => M({
|
|
14
14
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
15
15
|
onState: ["performance", { active: e }],
|
|
16
16
|
dataSet: ["performance", ["state", e, "active"]],
|
|
@@ -58,7 +58,7 @@ const gt = (e) => {
|
|
|
58
58
|
{ length: s },
|
|
59
59
|
(n, i) => new Date(e, t - 1, a - s + i + 1)
|
|
60
60
|
);
|
|
61
|
-
}, yt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)),
|
|
61
|
+
}, yt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)), Y = (e, t) => {
|
|
62
62
|
const s = new Date(t, 0, 4), a = (s.getDay() + 6) % 7, n = new Date(s);
|
|
63
63
|
n.setDate(s.getDate() - a);
|
|
64
64
|
const i = new Date(n);
|
|
@@ -82,7 +82,7 @@ const gt = (e) => {
|
|
|
82
82
|
return a.getDate() === e && a.getMonth() === t && a.getFullYear() === s;
|
|
83
83
|
}, bt = ({ day: e, month: t, year: s, weekNumber: a, selectWeek: n }) => {
|
|
84
84
|
const i = wt(e, t, s);
|
|
85
|
-
return
|
|
85
|
+
return M({
|
|
86
86
|
text: e || "",
|
|
87
87
|
disabled: !e,
|
|
88
88
|
class: `
|
|
@@ -95,10 +95,10 @@ const gt = (e) => {
|
|
|
95
95
|
}, xt = (e, t) => {
|
|
96
96
|
const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = pt(e, t, s), i = Array.from({ length: a }, (h, p) => new Date(e, t, p + 1)), l = (n.length + i.length) % 7, r = l === 0 ? 0 : 7 - l, c = yt(e, t, r), d = [...n, ...i, ...c], u = [];
|
|
97
97
|
for (let h = 0; h < d.length; h += 7) {
|
|
98
|
-
const p = d.slice(h, h + 7), y = p.find((
|
|
98
|
+
const p = d.slice(h, h + 7), y = p.find((S) => S) || new Date(e, t, 1), { weekNumber: v, year: D } = mt(y);
|
|
99
99
|
u.push({
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
100
|
+
weekNumber: v,
|
|
101
|
+
year: D,
|
|
102
102
|
days: p
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -115,7 +115,7 @@ const gt = (e) => {
|
|
|
115
115
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
116
116
|
},
|
|
117
117
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
118
|
-
(c) =>
|
|
118
|
+
(c) => L({ class: "px-1 py-1", text: c })
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
@@ -154,7 +154,7 @@ const gt = (e) => {
|
|
|
154
154
|
)
|
|
155
155
|
]
|
|
156
156
|
);
|
|
157
|
-
}),
|
|
157
|
+
}), j = ({ label: e, click: t }) => m(
|
|
158
158
|
{
|
|
159
159
|
class: `
|
|
160
160
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -168,12 +168,12 @@ const gt = (e) => {
|
|
|
168
168
|
icon: e === "Previous" ? b.chevron.single.left : b.chevron.single.right
|
|
169
169
|
}
|
|
170
170
|
), vt = ({ next: e, previous: t }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
L("[[monthName]] [[year]]"),
|
|
172
|
+
j({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: t
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
j({
|
|
177
177
|
label: "Next",
|
|
178
178
|
click: e
|
|
179
179
|
})
|
|
@@ -193,8 +193,8 @@ class ve extends g {
|
|
|
193
193
|
* @returns {Data}
|
|
194
194
|
*/
|
|
195
195
|
setData() {
|
|
196
|
-
const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a =
|
|
197
|
-
return new
|
|
196
|
+
const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a = Y(s, t.getFullYear());
|
|
197
|
+
return new R({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
200
200
|
month: a.getMonth(),
|
|
@@ -276,7 +276,7 @@ class ve extends g {
|
|
|
276
276
|
*/
|
|
277
277
|
selectWeek(t, s) {
|
|
278
278
|
this.data.currentWeek = t;
|
|
279
|
-
const a =
|
|
279
|
+
const a = Y(t, s);
|
|
280
280
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(t);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -296,7 +296,7 @@ class ve extends g {
|
|
|
296
296
|
]);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const A = ({ label: e, click: t }) => m(
|
|
300
300
|
{
|
|
301
301
|
class: `
|
|
302
302
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -312,8 +312,8 @@ const j = ({ label: e, click: t }) => m(
|
|
|
312
312
|
), Dt = ({ monthName: e, year: t, onMonthClick: s, onYearClick: a, next: n, previous: i }) => o({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
313
313
|
m({ click: s, variant: "ghost", "aria-label": "Select month" }, e || "[[monthName]]"),
|
|
314
314
|
m({ click: a, variant: "ghost", "aria-label": "Select year" }, (t == null ? void 0 : t.toString()) || "[[current.year]]"),
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
A({ label: "Previous", click: i }),
|
|
316
|
+
A({ label: "Next", click: n })
|
|
317
317
|
]), St = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), Ct = () => o(
|
|
318
318
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
319
319
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(St)
|
|
@@ -335,14 +335,22 @@ const j = ({ label: e, click: t }) => m(
|
|
|
335
335
|
for (let d = 0; d < l; d++)
|
|
336
336
|
c.push(null);
|
|
337
337
|
for (let d = 1; d <= r; d++) {
|
|
338
|
-
const u = at(t.year, t.month, d), h = new Date(t.year, t.month, d), p = new Date(e.year, e.month, e.date), y = h < p,
|
|
339
|
-
|
|
338
|
+
const u = at(t.year, t.month, d), h = new Date(t.year, t.month, d), p = new Date(e.year, e.month, e.date), y = h < p, v = s && y, D = n === u, S = i === u, N = n && i && u > n && u < i;
|
|
339
|
+
console.log({
|
|
340
340
|
day: d,
|
|
341
341
|
iso: u,
|
|
342
|
-
disabled:
|
|
343
|
-
isStart:
|
|
344
|
-
isEnd:
|
|
345
|
-
isBetween:
|
|
342
|
+
disabled: v,
|
|
343
|
+
isStart: D,
|
|
344
|
+
isEnd: S,
|
|
345
|
+
isBetween: N,
|
|
346
|
+
click: () => a(u)
|
|
347
|
+
}), c.push({
|
|
348
|
+
day: d,
|
|
349
|
+
iso: u,
|
|
350
|
+
disabled: v,
|
|
351
|
+
isStart: D,
|
|
352
|
+
isEnd: S,
|
|
353
|
+
isBetween: N,
|
|
346
354
|
click: () => a(u)
|
|
347
355
|
});
|
|
348
356
|
}
|
|
@@ -404,16 +412,16 @@ const j = ({ label: e, click: t }) => m(
|
|
|
404
412
|
variant: i === "start" ? "primary" : "outline",
|
|
405
413
|
class: "flex-1"
|
|
406
414
|
}, [
|
|
407
|
-
o({ class: "font-medium" },
|
|
415
|
+
o({ class: "font-medium" }, F("current.start", "Start Date"))
|
|
408
416
|
])),
|
|
409
417
|
w("selecting", (i) => m({
|
|
410
418
|
click: n,
|
|
411
419
|
variant: i === "end" ? "primary" : "outline",
|
|
412
420
|
class: "flex-1"
|
|
413
421
|
}, [
|
|
414
|
-
o({ class: "font-medium" },
|
|
422
|
+
o({ class: "font-medium" }, F("current.end", "End Date"))
|
|
415
423
|
]))
|
|
416
|
-
]),
|
|
424
|
+
]), F = (e, t) => [`[[${e}]]`, (s) => s == null ? t : Rt(s)], Rt = (e) => {
|
|
417
425
|
const t = /* @__PURE__ */ new Date(e + "T00:00:00"), s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
418
426
|
return `${s[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
|
|
419
427
|
}, Pt = ({ currentYear: e, onSelect: t }) => {
|
|
@@ -450,14 +458,14 @@ class De extends g {
|
|
|
450
458
|
*/
|
|
451
459
|
setData() {
|
|
452
460
|
const t = /* @__PURE__ */ new Date(), s = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = s.getMonth(), n = s.getFullYear();
|
|
453
|
-
return new
|
|
461
|
+
return new R({
|
|
454
462
|
today: {
|
|
455
463
|
date: t.getDate(),
|
|
456
464
|
month: t.getMonth(),
|
|
457
465
|
year: t.getFullYear()
|
|
458
466
|
},
|
|
459
467
|
monthName: this.getMonthName(a),
|
|
460
|
-
currentData: `${s.getFullYear()}-${
|
|
468
|
+
currentData: `${s.getFullYear()}-${C(s.getMonth() + 1)}-${C(s.getDate())}`,
|
|
461
469
|
current: {
|
|
462
470
|
date: t.getDate(),
|
|
463
471
|
month: a,
|
|
@@ -521,7 +529,7 @@ class De extends g {
|
|
|
521
529
|
*/
|
|
522
530
|
setCurrent({ month: t, year: s, date: a = null }) {
|
|
523
531
|
const n = this.data.current;
|
|
524
|
-
n.month = (t + 12) % 12, n.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (n.date = a), this.data.monthName = this.getMonthName(n.month), this.data.currentDate = `${s}-${
|
|
532
|
+
n.month = (t + 12) % 12, n.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (n.date = a), this.data.monthName = this.getMonthName(n.month), this.data.currentDate = `${s}-${C(t + 1)}-${C(n.date)}`;
|
|
525
533
|
}
|
|
526
534
|
/**
|
|
527
535
|
* Render the range calendar.
|
|
@@ -586,16 +594,16 @@ class De extends g {
|
|
|
586
594
|
const $t = (e, t) => {
|
|
587
595
|
const s = e.toggleAllSelectedRows();
|
|
588
596
|
t.state.checked = !s;
|
|
589
|
-
}, Wt = (e) =>
|
|
597
|
+
}, Wt = (e) => H({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
|
|
590
598
|
G((t) => new ht({ class: "mr-2", onChange: (s, a) => $t(t, a) }))
|
|
591
599
|
]), Nt = ({ align: e, sortable: t, key: s, label: a, sort: n, class: i }) => {
|
|
592
600
|
const l = e || "justify-start";
|
|
593
|
-
return
|
|
601
|
+
return H({
|
|
594
602
|
class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
|
|
595
603
|
click: t && (() => n(s))
|
|
596
604
|
}, [
|
|
597
605
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
598
|
-
|
|
606
|
+
L(a),
|
|
599
607
|
t && J({ class: "ml-2", html: b.arrows.upDown })
|
|
600
608
|
])
|
|
601
609
|
]);
|
|
@@ -621,7 +629,7 @@ const $t = (e, t) => {
|
|
|
621
629
|
class: "divide-y divide-border",
|
|
622
630
|
emptyState: n
|
|
623
631
|
});
|
|
624
|
-
class
|
|
632
|
+
class X extends g {
|
|
625
633
|
/**
|
|
626
634
|
* Initializes component data.
|
|
627
635
|
*
|
|
@@ -629,7 +637,7 @@ class Q extends g {
|
|
|
629
637
|
*/
|
|
630
638
|
setData() {
|
|
631
639
|
let t = this.rows && this.rows.length > 0;
|
|
632
|
-
return (this.loadMoreItems || this.tableData) && !t && (t = null), new
|
|
640
|
+
return (this.loadMoreItems || this.tableData) && !t && (t = null), new R({
|
|
633
641
|
selectedRows: [],
|
|
634
642
|
// @ts-ignore
|
|
635
643
|
hasItems: t,
|
|
@@ -785,7 +793,7 @@ const zt = (e) => new lt({
|
|
|
785
793
|
rowItem: (t) => e.rowItem(t, e.selectRow),
|
|
786
794
|
class: "divide-y divide-border"
|
|
787
795
|
});
|
|
788
|
-
class Yt extends
|
|
796
|
+
class Yt extends X {
|
|
789
797
|
/**
|
|
790
798
|
* Renders the DataTable component.
|
|
791
799
|
*
|
|
@@ -861,7 +869,7 @@ const Se = f((e) => new Yt(
|
|
|
861
869
|
rowItem: (t) => e.rowItem(t, e.selectRow),
|
|
862
870
|
class: "divide-y divide-border"
|
|
863
871
|
});
|
|
864
|
-
class At extends
|
|
872
|
+
class At extends X {
|
|
865
873
|
/**
|
|
866
874
|
* Renders the DataTable component.
|
|
867
875
|
*
|
|
@@ -937,12 +945,12 @@ const Ce = f((e) => new At(
|
|
|
937
945
|
]),
|
|
938
946
|
x({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
939
947
|
]), Ut = (e) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
940
|
-
|
|
948
|
+
L("Last seen "),
|
|
941
949
|
Z({ datetime: e }, "3h ago")
|
|
942
950
|
]), Et = (e, t) => e === "online" ? Ht() : Ut(t), Qt = f(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
943
951
|
x({ class: "text-sm leading-6 m-0" }, e),
|
|
944
952
|
Et(s, t)
|
|
945
|
-
])), Xt = (e) => e.split(" ").map((s) => s[0]).join(""), qt = f((e) =>
|
|
953
|
+
])), Xt = (e) => e.split(" ").map((s) => s[0]).join(""), qt = f((e) => T({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
946
954
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
947
955
|
nt({ src: e.image, alt: e.name, fallbackText: Xt(e.name) }),
|
|
948
956
|
Ft({ name: e.name, email: e.email })
|
|
@@ -959,7 +967,7 @@ const Ce = f((e) => new At(
|
|
|
959
967
|
role: "list",
|
|
960
968
|
class: "divide-y divide-border",
|
|
961
969
|
rowItem: qt
|
|
962
|
-
})), Kt = (e, t) => t.includes(e), Gt = (e, t, s) => e.exact ? s === t : Kt(t, s), Jt = ({ text: e, href: t, exact: s, hidden: a }) => new
|
|
970
|
+
})), Kt = (e, t) => t.includes(e), Gt = (e, t, s) => e.exact ? s === t : Kt(t, s), Jt = ({ text: e, href: t, exact: s, hidden: a }) => new E({
|
|
963
971
|
text: e,
|
|
964
972
|
href: t,
|
|
965
973
|
exact: s,
|
|
@@ -987,14 +995,14 @@ class Me extends g {
|
|
|
987
995
|
* @returns {object}
|
|
988
996
|
*/
|
|
989
997
|
render() {
|
|
990
|
-
return
|
|
998
|
+
return B(
|
|
991
999
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
992
1000
|
[
|
|
993
1001
|
k({
|
|
994
1002
|
class: "flex space-x-4",
|
|
995
1003
|
map: [this.options, (t) => this.addLink(t)],
|
|
996
1004
|
watch: {
|
|
997
|
-
value: ["[[path]]",
|
|
1005
|
+
value: ["[[path]]", I.data],
|
|
998
1006
|
callBack: this.updateLinks.bind(this)
|
|
999
1007
|
}
|
|
1000
1008
|
})
|
|
@@ -1007,7 +1015,7 @@ class Me extends g {
|
|
|
1007
1015
|
* @returns {void}
|
|
1008
1016
|
*/
|
|
1009
1017
|
afterSetup() {
|
|
1010
|
-
const t =
|
|
1018
|
+
const t = I.data.path;
|
|
1011
1019
|
this.updateLinks(t);
|
|
1012
1020
|
}
|
|
1013
1021
|
/**
|
|
@@ -1070,7 +1078,7 @@ const Le = f((e) => {
|
|
|
1070
1078
|
m({ variant: "back", class: "ghost", ...e })
|
|
1071
1079
|
]);
|
|
1072
1080
|
});
|
|
1073
|
-
class
|
|
1081
|
+
class q extends g {
|
|
1074
1082
|
/**
|
|
1075
1083
|
* This will declare the props for the compiler.
|
|
1076
1084
|
*
|
|
@@ -1157,13 +1165,13 @@ class X extends g {
|
|
|
1157
1165
|
return this.children;
|
|
1158
1166
|
}
|
|
1159
1167
|
}
|
|
1160
|
-
|
|
1168
|
+
Q.addType("dockableOverlay", (e) => {
|
|
1161
1169
|
if (!e)
|
|
1162
1170
|
return;
|
|
1163
1171
|
const t = e.component;
|
|
1164
1172
|
t && t.rendered === !0 && t.state.docked === !1 && t.destroy();
|
|
1165
1173
|
});
|
|
1166
|
-
class Te extends
|
|
1174
|
+
class Te extends q {
|
|
1167
1175
|
/**
|
|
1168
1176
|
* This will stop presistence.
|
|
1169
1177
|
*
|
|
@@ -1229,7 +1237,7 @@ class Te extends X {
|
|
|
1229
1237
|
* @returns {void}
|
|
1230
1238
|
*/
|
|
1231
1239
|
afterSetup() {
|
|
1232
|
-
|
|
1240
|
+
Q.add(
|
|
1233
1241
|
this.container,
|
|
1234
1242
|
"dockableOverlay",
|
|
1235
1243
|
{
|
|
@@ -1272,7 +1280,7 @@ class Te extends X {
|
|
|
1272
1280
|
document.documentElement.style.overflowY = "auto";
|
|
1273
1281
|
}
|
|
1274
1282
|
}
|
|
1275
|
-
class Be extends
|
|
1283
|
+
class Be extends q {
|
|
1276
1284
|
/**
|
|
1277
1285
|
* This will get the overlay type.
|
|
1278
1286
|
*
|
|
@@ -1291,7 +1299,7 @@ class Be extends X {
|
|
|
1291
1299
|
this.container = t, this.initialize();
|
|
1292
1300
|
}
|
|
1293
1301
|
}
|
|
1294
|
-
const _t = f(({ index: e, click: t, state: s }, a) =>
|
|
1302
|
+
const _t = f(({ index: e, click: t, state: s }, a) => T({
|
|
1295
1303
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1296
1304
|
onState: [
|
|
1297
1305
|
[s, "selectedIndex", {
|
|
@@ -1344,7 +1352,7 @@ const _t = f(({ index: e, click: t, state: s }, a) => I({
|
|
|
1344
1352
|
*/
|
|
1345
1353
|
setData() {
|
|
1346
1354
|
const e = this.options || [];
|
|
1347
|
-
return new
|
|
1355
|
+
return new R({
|
|
1348
1356
|
options: e,
|
|
1349
1357
|
filteredOptions: e
|
|
1350
1358
|
});
|
|
@@ -1455,19 +1463,19 @@ const _t = f(({ index: e, click: t, state: s }, a) => I({
|
|
|
1455
1463
|
]);
|
|
1456
1464
|
}
|
|
1457
1465
|
}
|
|
1458
|
-
), ee = (e) =>
|
|
1466
|
+
), ee = (e) => T(
|
|
1459
1467
|
{
|
|
1460
1468
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
|
|
1461
1469
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1462
1470
|
},
|
|
1463
1471
|
[
|
|
1464
|
-
|
|
1472
|
+
M({
|
|
1465
1473
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1466
1474
|
onSet: ["selected", { selected: e.value }],
|
|
1467
1475
|
click: (t) => e.callBack(e.value)
|
|
1468
1476
|
}, e.label)
|
|
1469
1477
|
]
|
|
1470
|
-
), se = (e, t) => (e.callBack = t, ee(e)), ae = (e) =>
|
|
1478
|
+
), se = (e, t) => (e.callBack = t, ee(e)), ae = (e) => B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1471
1479
|
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => se(t, e.callBack)] })
|
|
1472
1480
|
]);
|
|
1473
1481
|
class Pe extends g {
|
|
@@ -1492,7 +1500,7 @@ class Pe extends g {
|
|
|
1492
1500
|
options: this.options,
|
|
1493
1501
|
callBack: t
|
|
1494
1502
|
}),
|
|
1495
|
-
|
|
1503
|
+
U({
|
|
1496
1504
|
class: "tab-content",
|
|
1497
1505
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1498
1506
|
})
|
|
@@ -1558,20 +1566,20 @@ class Pe extends g {
|
|
|
1558
1566
|
};
|
|
1559
1567
|
}
|
|
1560
1568
|
}
|
|
1561
|
-
const ne = (e) =>
|
|
1569
|
+
const ne = (e) => T(
|
|
1562
1570
|
{
|
|
1563
1571
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
|
|
1564
1572
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1565
1573
|
},
|
|
1566
1574
|
[
|
|
1567
|
-
|
|
1575
|
+
M({
|
|
1568
1576
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1569
1577
|
onSet: ["selected", { selected: e.value }],
|
|
1570
1578
|
click: (t) => e.callBack(e.value),
|
|
1571
1579
|
disabled: e.disabled
|
|
1572
1580
|
}, e.label)
|
|
1573
1581
|
]
|
|
1574
|
-
), ie = (e, t) => (e.callBack = t, ne(e)), oe = (e) =>
|
|
1582
|
+
), ie = (e, t) => (e.callBack = t, ne(e)), oe = (e) => B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1575
1583
|
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ie(t, e.callBack)] })
|
|
1576
1584
|
]);
|
|
1577
1585
|
class $e extends g {
|
|
@@ -1620,7 +1628,7 @@ class $e extends g {
|
|
|
1620
1628
|
const le = (e, t) => new RegExp(`${e}($|/|\\.).*`).test(t), re = (e, t) => {
|
|
1621
1629
|
const s = e.getLinkPath();
|
|
1622
1630
|
return e.exact ? t === s : le(s, t);
|
|
1623
|
-
}, ce = ({ text: e, href: t, exact: s }) => new
|
|
1631
|
+
}, ce = ({ text: e, href: t, exact: s }) => new E({
|
|
1624
1632
|
text: e,
|
|
1625
1633
|
href: t,
|
|
1626
1634
|
exact: s,
|
|
@@ -1648,12 +1656,12 @@ class de extends g {
|
|
|
1648
1656
|
* @returns {object}
|
|
1649
1657
|
*/
|
|
1650
1658
|
render() {
|
|
1651
|
-
return
|
|
1659
|
+
return B({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1652
1660
|
k({
|
|
1653
1661
|
class: "flex flex-auto flex-row",
|
|
1654
1662
|
map: [this.options, (t) => this.addLink(t)],
|
|
1655
1663
|
watch: {
|
|
1656
|
-
value: ["[[path]]",
|
|
1664
|
+
value: ["[[path]]", I.data],
|
|
1657
1665
|
callBack: this.updateLinks.bind(this)
|
|
1658
1666
|
}
|
|
1659
1667
|
})
|
|
@@ -1665,7 +1673,7 @@ class de extends g {
|
|
|
1665
1673
|
* @returns {void}
|
|
1666
1674
|
*/
|
|
1667
1675
|
afterSetup() {
|
|
1668
|
-
const t =
|
|
1676
|
+
const t = I.data.path;
|
|
1669
1677
|
this.updateLinks(t);
|
|
1670
1678
|
}
|
|
1671
1679
|
/**
|
|
@@ -1742,7 +1750,7 @@ class We extends g {
|
|
|
1742
1750
|
class: this.class,
|
|
1743
1751
|
options: this.options
|
|
1744
1752
|
}),
|
|
1745
|
-
|
|
1753
|
+
U({
|
|
1746
1754
|
class: "tab-content",
|
|
1747
1755
|
switch: this.addGroup()
|
|
1748
1756
|
})
|
|
@@ -1883,8 +1891,8 @@ class he extends g {
|
|
|
1883
1891
|
const { canvas: t, ctx: s } = this, a = t.toDataURL();
|
|
1884
1892
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1885
1893
|
const n = new globalThis.Image();
|
|
1886
|
-
|
|
1887
|
-
s.drawImage(n, 0, 0),
|
|
1894
|
+
O.on("load", n, function i() {
|
|
1895
|
+
s.drawImage(n, 0, 0), O.off("load", n, i);
|
|
1888
1896
|
}), n.src = a;
|
|
1889
1897
|
}
|
|
1890
1898
|
this.draw();
|
|
@@ -1904,7 +1912,7 @@ class he extends g {
|
|
|
1904
1912
|
* @returns {void}
|
|
1905
1913
|
*/
|
|
1906
1914
|
noScaleResize() {
|
|
1907
|
-
const t =
|
|
1915
|
+
const t = z.getSize(container);
|
|
1908
1916
|
this.width = canvas.width = t.width, this.height = canvas.height = t.height;
|
|
1909
1917
|
}
|
|
1910
1918
|
/**
|
|
@@ -1914,7 +1922,7 @@ class he extends g {
|
|
|
1914
1922
|
* @returns {void}
|
|
1915
1923
|
*/
|
|
1916
1924
|
scale() {
|
|
1917
|
-
const t = this.canvas, s = this.container, a =
|
|
1925
|
+
const t = this.canvas, s = this.container, a = z.getSize(s), n = this.targetSize, i = n.width, l = n.height;
|
|
1918
1926
|
let r = i + "px", c = l + "px";
|
|
1919
1927
|
if (this.width = t.width = i, this.height = t.height = l, a.width !== 0 && a.height !== 0) {
|
|
1920
1928
|
const d = a.width, u = a.height, h = d / i, p = u / l, y = Math.min(h, p);
|
|
@@ -2079,7 +2087,7 @@ export {
|
|
|
2079
2087
|
Nt as H,
|
|
2080
2088
|
Be as I,
|
|
2081
2089
|
Me as N,
|
|
2082
|
-
|
|
2090
|
+
q as O,
|
|
2083
2091
|
be as P,
|
|
2084
2092
|
De as R,
|
|
2085
2093
|
Ce as S,
|
|
@@ -2087,7 +2095,7 @@ export {
|
|
|
2087
2095
|
qt as U,
|
|
2088
2096
|
ve as W,
|
|
2089
2097
|
yt as a,
|
|
2090
|
-
|
|
2098
|
+
Y as b,
|
|
2091
2099
|
mt as c,
|
|
2092
2100
|
xe as d,
|
|
2093
2101
|
ke as e,
|
|
@@ -2095,7 +2103,7 @@ export {
|
|
|
2095
2103
|
pt as g,
|
|
2096
2104
|
kt as h,
|
|
2097
2105
|
vt as i,
|
|
2098
|
-
|
|
2106
|
+
X as j,
|
|
2099
2107
|
Se as k,
|
|
2100
2108
|
Ie as l,
|
|
2101
2109
|
Te as m,
|
package/package.json
CHANGED