@base-framework/ui 1.0.274 → 1.0.275
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 { C as b, d as F, D as P, c as B, E as k, F as M, H as f, I as x, M as N,
|
|
|
5
5
|
import { Icons as G } from "./icons.es.js";
|
|
6
6
|
import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as la, i as ia, h as pa, j as ma, e as ua, k as da, F as ga, d as Ca, f as ca, L as Ta, x as Da, M as Ia, o as Sa, N as ba, P as Fa, s as Pa, t as Ba, S as ka, q as Ma, r as fa, T as xa, H as Na, I as va, p as ya, u as ha } from "./empty-state-CPWpkmxa.js";
|
|
7
7
|
import { A as Wa, b as Ha, C as Aa, D as Ra, a as wa, F as Ua, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-DW0cMOJy.js";
|
|
8
|
-
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as Se, b as be, e as Fe, a as Pe, g as Be } from "./signature-panel-
|
|
8
|
+
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as Se, b as be, e as Fe, a as Pe, g as Be } from "./signature-panel-D00yXjos.js";
|
|
9
9
|
import { B as Me, I as fe, M as xe, d as Ne, e as ve, g as ye, N as he, b as Le, a as We, f as He, P as Ae, c as Re, S as we, T as Ue } from "./mobile-nav-wrapper-C7RyGC5a.js";
|
|
10
10
|
import { B as Oe, a as Ee, C as Ve, F as je, b as qe, c as Je, M as ze, P as Ke, S as Qe } from "./sidebar-menu-page-BtUJdw-T.js";
|
|
11
11
|
import { A as Xe, F as Ye, M as Ze, a as $e, T as as } 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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } 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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-D00yXjos.js";
|
|
2
2
|
import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-DW0cMOJy.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-C7RyGC5a.js";
|
|
4
4
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button as x, Div as o, On as v, Span as D, Th as
|
|
2
|
-
import { Atom as d, Component as h, Data as L, DateTime as
|
|
3
|
-
import { B as T, I as
|
|
1
|
+
import { Button as x, Div as o, On as v, Span as D, Th as z, UseParent as X, I as q, Thead as K, Tr as $, Td as _, Table as C, P as w, Li as S, Time as G, Nav as I, Ul as p, Section as N, Canvas as V } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as d, Component as h, Data as L, DateTime as J, router as k, NavLink as A, DataTracker as j, Jot as Z, base as M, Dom as W } from "@base-framework/base";
|
|
3
|
+
import { B as T, I as ee } from "./buttons-BKLL4I6r.js";
|
|
4
4
|
import { Icons as y } from "./icons.es.js";
|
|
5
|
-
import { TableBody as
|
|
5
|
+
import { TableBody as B, DataTableBody as te, ScrollableTableBody as U, List as se, IntervalTimer as ae } from "@base-framework/organisms";
|
|
6
6
|
import { C as ie, S as ne, I as oe, H as le } from "./skeleton-CLm2c9Bc.js";
|
|
7
7
|
import { A as re, P as ce } from "./range-calendar-DW0cMOJy.js";
|
|
8
8
|
d((t, e) => ({
|
|
@@ -58,7 +58,7 @@ const de = (t) => {
|
|
|
58
58
|
{ length: s },
|
|
59
59
|
(i, n) => new Date(t, e - 1, a - s + n + 1)
|
|
60
60
|
);
|
|
61
|
-
}, fe = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)),
|
|
61
|
+
}, fe = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), P = (t, e) => {
|
|
62
62
|
const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
|
|
63
63
|
i.setDate(s.getDate() - a);
|
|
64
64
|
const n = new Date(i);
|
|
@@ -92,19 +92,19 @@ const de = (t) => {
|
|
|
92
92
|
`,
|
|
93
93
|
click: () => i(a, s)
|
|
94
94
|
});
|
|
95
|
-
},
|
|
95
|
+
}, we = (t, e) => {
|
|
96
96
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = ue(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = fe(t, e, u), f = [...i, ...n, ...c], g = [];
|
|
97
97
|
for (let r = 0; r < f.length; r += 7) {
|
|
98
|
-
const m = f.slice(r, r + 7), b = m.find((
|
|
98
|
+
const m = f.slice(r, r + 7), b = m.find((Q) => Q) || new Date(t, e, 1), { weekNumber: F, year: E } = he(b);
|
|
99
99
|
g.push({
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
100
|
+
weekNumber: F,
|
|
101
|
+
year: E,
|
|
102
102
|
days: m
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
return g;
|
|
106
|
-
},
|
|
107
|
-
const { year: i, month: n, currentDate: l } = a, u =
|
|
106
|
+
}, pe = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
|
|
107
|
+
const { year: i, month: n, currentDate: l } = a, u = we(i, n);
|
|
108
108
|
return o(
|
|
109
109
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
110
110
|
[
|
|
@@ -154,7 +154,7 @@ const de = (t) => {
|
|
|
154
154
|
)
|
|
155
155
|
]
|
|
156
156
|
);
|
|
157
|
-
}),
|
|
157
|
+
}), O = ({ label: t, click: e }) => T(
|
|
158
158
|
{
|
|
159
159
|
class: `
|
|
160
160
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -169,11 +169,11 @@ const de = (t) => {
|
|
|
169
169
|
}
|
|
170
170
|
), be = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
171
171
|
D("[[monthName]] [[year]]"),
|
|
172
|
-
|
|
172
|
+
O({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: e
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
O({
|
|
177
177
|
label: "Next",
|
|
178
178
|
click: t
|
|
179
179
|
})
|
|
@@ -193,7 +193,7 @@ class ct extends h {
|
|
|
193
193
|
* @returns {Data}
|
|
194
194
|
*/
|
|
195
195
|
setData() {
|
|
196
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
196
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = P(s, e.getFullYear());
|
|
197
197
|
return new L({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
@@ -231,7 +231,7 @@ class ct extends h {
|
|
|
231
231
|
* @returns {string}
|
|
232
232
|
*/
|
|
233
233
|
getMonthName(e) {
|
|
234
|
-
return
|
|
234
|
+
return J.monthNames[e];
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Updates the calendar to show the previous month.
|
|
@@ -276,7 +276,7 @@ class ct extends h {
|
|
|
276
276
|
*/
|
|
277
277
|
selectWeek(e, s) {
|
|
278
278
|
this.data.currentWeek = e;
|
|
279
|
-
const a =
|
|
279
|
+
const a = P(e, s);
|
|
280
280
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -290,7 +290,7 @@ class ct extends h {
|
|
|
290
290
|
next: () => this.goToNextMonth(),
|
|
291
291
|
previous: () => this.goToPreviousMonth()
|
|
292
292
|
}),
|
|
293
|
-
|
|
293
|
+
pe({
|
|
294
294
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
295
295
|
})
|
|
296
296
|
]);
|
|
@@ -299,21 +299,21 @@ class ct extends h {
|
|
|
299
299
|
const ke = (t, e) => {
|
|
300
300
|
const s = t.toggleAllSelectedRows();
|
|
301
301
|
e.state.checked = !s;
|
|
302
|
-
}, ye = (t) =>
|
|
303
|
-
|
|
302
|
+
}, ye = (t) => z({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
303
|
+
X((e) => new ie({ class: "mr-2", onChange: (s, a) => ke(e, a) }))
|
|
304
304
|
]), xe = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
305
|
const l = t || "justify-start";
|
|
306
|
-
return
|
|
306
|
+
return z({
|
|
307
307
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
308
308
|
click: e && (() => i(s))
|
|
309
309
|
}, [
|
|
310
310
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
311
311
|
D(a),
|
|
312
|
-
e &&
|
|
312
|
+
e && q({ class: "ml-2", html: y.arrows.upDown })
|
|
313
313
|
])
|
|
314
314
|
]);
|
|
315
|
-
},
|
|
316
|
-
|
|
315
|
+
}, R = (t) => K([
|
|
316
|
+
$({
|
|
317
317
|
class: "text-muted-foreground border-b",
|
|
318
318
|
map: [
|
|
319
319
|
t.headers,
|
|
@@ -326,7 +326,7 @@ const ke = (t, e) => {
|
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
328
|
})
|
|
329
|
-
]), ve = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i }) => new
|
|
329
|
+
]), ve = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i }) => new B({
|
|
330
330
|
cache: "list",
|
|
331
331
|
key: t,
|
|
332
332
|
items: e,
|
|
@@ -338,17 +338,17 @@ const ke = (t, e) => {
|
|
|
338
338
|
if (e && typeof e == "function")
|
|
339
339
|
return e(i);
|
|
340
340
|
const n = ["w-3/4", "w-1/2", "w-full", "w-2/3", "w-5/6"], l = n[i % n.length];
|
|
341
|
-
return
|
|
341
|
+
return _({ class: "px-6 py-4" }, [
|
|
342
342
|
ne({ width: l, height: "h-4" })
|
|
343
343
|
]);
|
|
344
344
|
};
|
|
345
|
-
return
|
|
345
|
+
return $({
|
|
346
346
|
class: "border-b",
|
|
347
347
|
key: s,
|
|
348
348
|
children: Array.from({ length: t }, (i, n) => a(n))
|
|
349
349
|
});
|
|
350
350
|
};
|
|
351
|
-
class
|
|
351
|
+
class Y extends h {
|
|
352
352
|
/**
|
|
353
353
|
* Initializes component data.
|
|
354
354
|
*
|
|
@@ -406,7 +406,7 @@ class j extends h {
|
|
|
406
406
|
* @returns {void}
|
|
407
407
|
*/
|
|
408
408
|
removeSkeleton() {
|
|
409
|
-
if (this.data.
|
|
409
|
+
if (this.data.showSkeleton) {
|
|
410
410
|
this.data.showSkeleton = !1;
|
|
411
411
|
const e = this.rows && this.rows.length > 0;
|
|
412
412
|
this.data.hasItems = e;
|
|
@@ -448,19 +448,27 @@ class j extends h {
|
|
|
448
448
|
* @returns {object}
|
|
449
449
|
*/
|
|
450
450
|
render() {
|
|
451
|
-
const e = this.data.get("showSkeleton") ? this.generateSkeletonRows() : this.rows,
|
|
451
|
+
const e = this.data.get("showSkeleton"), s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
|
|
452
452
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
453
|
-
v("hasItems", (
|
|
454
|
-
o({ class: `w-full rounded-md ${
|
|
453
|
+
v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
|
|
454
|
+
o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
455
455
|
C({ class: "w-full" }, [
|
|
456
456
|
// @ts-ignore
|
|
457
|
-
this.headers &&
|
|
457
|
+
this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
|
|
458
458
|
// @ts-ignore
|
|
459
459
|
this.customHeader ?? null,
|
|
460
|
-
|
|
460
|
+
e ? new B({
|
|
461
|
+
cache: "list",
|
|
462
|
+
// @ts-ignore
|
|
463
|
+
key: this.key,
|
|
464
|
+
items: s,
|
|
465
|
+
rowItem: (i) => i,
|
|
466
|
+
// Skeleton rows are already complete components
|
|
467
|
+
class: "divide-y divide-border"
|
|
468
|
+
}) : ve({
|
|
461
469
|
// @ts-ignore
|
|
462
470
|
key: this.key,
|
|
463
|
-
rows:
|
|
471
|
+
rows: s,
|
|
464
472
|
// @ts-ignore
|
|
465
473
|
selectRow: this.selectRow.bind(this),
|
|
466
474
|
// @ts-ignore
|
|
@@ -532,7 +540,7 @@ class j extends h {
|
|
|
532
540
|
this.data.selectedRows = [];
|
|
533
541
|
}
|
|
534
542
|
}
|
|
535
|
-
const Se = (t) => new
|
|
543
|
+
const Se = (t) => new te({
|
|
536
544
|
cache: "list",
|
|
537
545
|
loadMoreItems: t.loadMoreItems,
|
|
538
546
|
offset: t.offset,
|
|
@@ -543,23 +551,31 @@ const Se = (t) => new ee({
|
|
|
543
551
|
rowItem: (e) => t.rowItem(e, t.selectRow),
|
|
544
552
|
class: "divide-y divide-border"
|
|
545
553
|
});
|
|
546
|
-
class Ie extends
|
|
554
|
+
class Ie extends Y {
|
|
547
555
|
/**
|
|
548
556
|
* Renders the DataTable component.
|
|
549
557
|
*
|
|
550
558
|
* @returns {object}
|
|
551
559
|
*/
|
|
552
560
|
render() {
|
|
553
|
-
const e = this.data.showSkeleton ? this.generateSkeletonRows() : this.rows,
|
|
561
|
+
const e = this.data.showSkeleton, s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
|
|
554
562
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
555
|
-
v("hasItems", (
|
|
556
|
-
o({ class: `w-full rounded-md ${
|
|
563
|
+
v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
|
|
564
|
+
o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
557
565
|
C({ class: "w-full" }, [
|
|
558
566
|
// @ts-ignore
|
|
559
|
-
this.headers &&
|
|
567
|
+
this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
|
|
560
568
|
// @ts-ignore
|
|
561
569
|
this.customHeader ?? null,
|
|
562
|
-
|
|
570
|
+
e ? new B({
|
|
571
|
+
cache: "list",
|
|
572
|
+
// @ts-ignore
|
|
573
|
+
key: this.key,
|
|
574
|
+
items: s,
|
|
575
|
+
rowItem: (i) => i,
|
|
576
|
+
// Skeleton rows are already complete components
|
|
577
|
+
class: "divide-y divide-border"
|
|
578
|
+
}) : Se({
|
|
563
579
|
// @ts-ignore
|
|
564
580
|
loadMoreItems: this.loadMoreItems,
|
|
565
581
|
// @ts-ignore
|
|
@@ -572,7 +588,7 @@ class Ie extends j {
|
|
|
572
588
|
tableData: this.tableData,
|
|
573
589
|
// @ts-ignore
|
|
574
590
|
key: this.key,
|
|
575
|
-
items:
|
|
591
|
+
items: s,
|
|
576
592
|
// @ts-ignore
|
|
577
593
|
selectRow: this.selectRow.bind(this),
|
|
578
594
|
// @ts-ignore
|
|
@@ -608,7 +624,7 @@ const dt = d((t) => new Ie(
|
|
|
608
624
|
emptyState: t.emptyState,
|
|
609
625
|
skeleton: t.skeleton
|
|
610
626
|
}
|
|
611
|
-
)), Ce = (t) => new
|
|
627
|
+
)), Ce = (t) => new U({
|
|
612
628
|
cache: "list",
|
|
613
629
|
scrollContainer: t.scrollContainer,
|
|
614
630
|
loadMoreItems: t.loadMoreItems,
|
|
@@ -620,23 +636,31 @@ const dt = d((t) => new Ie(
|
|
|
620
636
|
rowItem: (e) => t.rowItem(e, t.selectRow),
|
|
621
637
|
class: "divide-y divide-border"
|
|
622
638
|
});
|
|
623
|
-
class Le extends
|
|
639
|
+
class Le extends Y {
|
|
624
640
|
/**
|
|
625
641
|
* Renders the DataTable component.
|
|
626
642
|
*
|
|
627
643
|
* @returns {object}
|
|
628
644
|
*/
|
|
629
645
|
render() {
|
|
630
|
-
const e = this.data.get("showSkeleton") ? this.generateSkeletonRows() : this.rows,
|
|
646
|
+
const e = this.data.get("showSkeleton"), s = e ? this.generateSkeletonRows() : this.rows, a = this.border !== !1 ? "border" : "";
|
|
631
647
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
632
|
-
v("hasItems", (
|
|
633
|
-
o({ class: `w-full rounded-md ${
|
|
648
|
+
v("hasItems", (i) => i === !1 && this.emptyState ? this.emptyState() : null),
|
|
649
|
+
o({ class: `w-full rounded-md ${a} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
634
650
|
C({ class: "w-full" }, [
|
|
635
651
|
// @ts-ignore
|
|
636
|
-
this.headers &&
|
|
652
|
+
this.headers && R({ headers: this.headers, sort: (i) => this.sortRows(i) }),
|
|
637
653
|
// @ts-ignore
|
|
638
654
|
this.customHeader ?? null,
|
|
639
|
-
|
|
655
|
+
e ? new U({
|
|
656
|
+
cache: "list",
|
|
657
|
+
// @ts-ignore
|
|
658
|
+
key: this.key,
|
|
659
|
+
items: s,
|
|
660
|
+
rowItem: (i) => i,
|
|
661
|
+
// Skeleton rows are already complete components
|
|
662
|
+
class: "divide-y divide-border"
|
|
663
|
+
}) : Ce({
|
|
640
664
|
// @ts-ignore
|
|
641
665
|
scrollContainer: this.scrollContainer,
|
|
642
666
|
// @ts-ignore
|
|
@@ -651,7 +675,7 @@ class Le extends j {
|
|
|
651
675
|
tableData: this.tableData,
|
|
652
676
|
// @ts-ignore
|
|
653
677
|
key: this.key,
|
|
654
|
-
items:
|
|
678
|
+
items: s,
|
|
655
679
|
// @ts-ignore
|
|
656
680
|
selectRow: this.selectRow.bind(this),
|
|
657
681
|
// @ts-ignore
|
|
@@ -689,18 +713,18 @@ const ht = d((t) => new Le(
|
|
|
689
713
|
skeleton: t.skeleton
|
|
690
714
|
}
|
|
691
715
|
)), Te = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
692
|
-
|
|
693
|
-
|
|
716
|
+
w({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
717
|
+
w({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
694
718
|
])), Be = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
695
719
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
696
720
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
697
721
|
]),
|
|
698
|
-
|
|
699
|
-
]), Re = (t) =>
|
|
722
|
+
w({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
723
|
+
]), Re = (t) => w({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
700
724
|
D("Last seen "),
|
|
701
|
-
|
|
725
|
+
G({ datetime: t }, "3h ago")
|
|
702
726
|
]), Me = (t, e) => t === "online" ? Be() : Re(e), We = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
703
|
-
|
|
727
|
+
w({ class: "text-sm leading-6 m-0" }, t),
|
|
704
728
|
Me(s, e)
|
|
705
729
|
])), Pe = (t) => t.split(" ").map((s) => s[0]).join(""), Oe = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
706
730
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
@@ -719,7 +743,7 @@ const ht = d((t) => new Le(
|
|
|
719
743
|
role: "list",
|
|
720
744
|
class: "divide-y divide-border",
|
|
721
745
|
rowItem: Oe
|
|
722
|
-
})), ze = (t, e) => e.includes(t), $e = (t, e, s) => t.exact ? s === e : ze(e, s), Ne = ({ text: t, href: e, exact: s, hidden: a }) => new
|
|
746
|
+
})), ze = (t, e) => e.includes(t), $e = (t, e, s) => t.exact ? s === e : ze(e, s), Ne = ({ text: t, href: e, exact: s, hidden: a }) => new A({
|
|
723
747
|
text: t,
|
|
724
748
|
href: e,
|
|
725
749
|
exact: s,
|
|
@@ -750,7 +774,7 @@ class ft extends h {
|
|
|
750
774
|
return I(
|
|
751
775
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
752
776
|
[
|
|
753
|
-
|
|
777
|
+
p({
|
|
754
778
|
class: "flex space-x-4",
|
|
755
779
|
map: [this.options, (e) => this.addLink(e)],
|
|
756
780
|
watch: {
|
|
@@ -830,7 +854,7 @@ const gt = d((t) => {
|
|
|
830
854
|
T({ variant: "back", class: "ghost", ...t })
|
|
831
855
|
]);
|
|
832
856
|
});
|
|
833
|
-
class
|
|
857
|
+
class H extends h {
|
|
834
858
|
/**
|
|
835
859
|
* This will declare the props for the compiler.
|
|
836
860
|
*
|
|
@@ -917,13 +941,13 @@ class U extends h {
|
|
|
917
941
|
return this.children;
|
|
918
942
|
}
|
|
919
943
|
}
|
|
920
|
-
|
|
944
|
+
j.addType("dockableOverlay", (t) => {
|
|
921
945
|
if (!t)
|
|
922
946
|
return;
|
|
923
947
|
const e = t.component;
|
|
924
948
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
925
949
|
});
|
|
926
|
-
class mt extends
|
|
950
|
+
class mt extends H {
|
|
927
951
|
/**
|
|
928
952
|
* This will stop presistence.
|
|
929
953
|
*
|
|
@@ -989,7 +1013,7 @@ class mt extends U {
|
|
|
989
1013
|
* @returns {void}
|
|
990
1014
|
*/
|
|
991
1015
|
afterSetup() {
|
|
992
|
-
|
|
1016
|
+
j.add(
|
|
993
1017
|
this.container,
|
|
994
1018
|
"dockableOverlay",
|
|
995
1019
|
{
|
|
@@ -1032,7 +1056,7 @@ class mt extends U {
|
|
|
1032
1056
|
document.documentElement.style.overflowY = "auto";
|
|
1033
1057
|
}
|
|
1034
1058
|
}
|
|
1035
|
-
class
|
|
1059
|
+
class wt extends H {
|
|
1036
1060
|
/**
|
|
1037
1061
|
* This will get the overlay type.
|
|
1038
1062
|
*
|
|
@@ -1060,7 +1084,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1060
1084
|
}]
|
|
1061
1085
|
],
|
|
1062
1086
|
click: () => e(t)
|
|
1063
|
-
}, a)), je = d(({ selectOption: t, state: e }) =>
|
|
1087
|
+
}, a)), je = d(({ selectOption: t, state: e }) => p({
|
|
1064
1088
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1065
1089
|
for: ["filteredOptions", (s, a) => Ae({ index: a, click: t, state: e }, s.label)]
|
|
1066
1090
|
})), Ue = d((t) => o({ class: "relative flex items-center" }, [
|
|
@@ -1080,7 +1104,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1080
1104
|
]
|
|
1081
1105
|
}),
|
|
1082
1106
|
t.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
1083
|
-
|
|
1107
|
+
ee(t.icon)
|
|
1084
1108
|
])
|
|
1085
1109
|
])), Ye = (t) => o({
|
|
1086
1110
|
class: "relative flex fle-auto flex-col",
|
|
@@ -1095,7 +1119,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1095
1119
|
je(t)
|
|
1096
1120
|
]);
|
|
1097
1121
|
}]
|
|
1098
|
-
}),
|
|
1122
|
+
}), pt = Z(
|
|
1099
1123
|
{
|
|
1100
1124
|
/**
|
|
1101
1125
|
* This will set up the data object.
|
|
@@ -1228,7 +1252,7 @@ const Ae = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1228
1252
|
}, t.label)
|
|
1229
1253
|
]
|
|
1230
1254
|
), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1231
|
-
|
|
1255
|
+
p({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
|
|
1232
1256
|
]);
|
|
1233
1257
|
class bt extends h {
|
|
1234
1258
|
/**
|
|
@@ -1252,7 +1276,7 @@ class bt extends h {
|
|
|
1252
1276
|
options: this.options,
|
|
1253
1277
|
callBack: e
|
|
1254
1278
|
}),
|
|
1255
|
-
|
|
1279
|
+
N({
|
|
1256
1280
|
class: "tab-content",
|
|
1257
1281
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1258
1282
|
})
|
|
@@ -1332,7 +1356,7 @@ const Qe = (t) => S(
|
|
|
1332
1356
|
}, t.label)
|
|
1333
1357
|
]
|
|
1334
1358
|
), Xe = (t, e) => (t.callBack = e, Qe(t)), qe = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1335
|
-
|
|
1359
|
+
p({ class: "flex flex-auto flex-row", map: [t.options, (e) => Xe(e, t.callBack)] })
|
|
1336
1360
|
]);
|
|
1337
1361
|
class kt extends h {
|
|
1338
1362
|
/**
|
|
@@ -1380,7 +1404,7 @@ class kt extends h {
|
|
|
1380
1404
|
const Ke = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), _e = (t, e) => {
|
|
1381
1405
|
const s = t.getLinkPath();
|
|
1382
1406
|
return t.exact ? e === s : Ke(s, e);
|
|
1383
|
-
}, Ge = ({ text: t, href: e, exact: s }) => new
|
|
1407
|
+
}, Ge = ({ text: t, href: e, exact: s }) => new A({
|
|
1384
1408
|
text: t,
|
|
1385
1409
|
href: e,
|
|
1386
1410
|
exact: s,
|
|
@@ -1409,7 +1433,7 @@ class Ve extends h {
|
|
|
1409
1433
|
*/
|
|
1410
1434
|
render() {
|
|
1411
1435
|
return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1412
|
-
|
|
1436
|
+
p({
|
|
1413
1437
|
class: "flex flex-auto flex-row",
|
|
1414
1438
|
map: [this.options, (e) => this.addLink(e)],
|
|
1415
1439
|
watch: {
|
|
@@ -1502,7 +1526,7 @@ class yt extends h {
|
|
|
1502
1526
|
class: this.class,
|
|
1503
1527
|
options: this.options
|
|
1504
1528
|
}),
|
|
1505
|
-
|
|
1529
|
+
N({
|
|
1506
1530
|
class: "tab-content",
|
|
1507
1531
|
switch: this.addGroup()
|
|
1508
1532
|
})
|
|
@@ -1546,7 +1570,7 @@ class Je extends h {
|
|
|
1546
1570
|
* @returns {object} Layout definition for the canvas.
|
|
1547
1571
|
*/
|
|
1548
1572
|
render() {
|
|
1549
|
-
return
|
|
1573
|
+
return V({
|
|
1550
1574
|
style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
|
|
1551
1575
|
});
|
|
1552
1576
|
}
|
|
@@ -1643,8 +1667,8 @@ class Je extends h {
|
|
|
1643
1667
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1644
1668
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1645
1669
|
const i = new globalThis.Image();
|
|
1646
|
-
|
|
1647
|
-
s.drawImage(i, 0, 0),
|
|
1670
|
+
M.on("load", i, function n() {
|
|
1671
|
+
s.drawImage(i, 0, 0), M.off("load", i, n);
|
|
1648
1672
|
}), i.src = a;
|
|
1649
1673
|
}
|
|
1650
1674
|
this.draw();
|
|
@@ -1664,7 +1688,7 @@ class Je extends h {
|
|
|
1664
1688
|
* @returns {void}
|
|
1665
1689
|
*/
|
|
1666
1690
|
noScaleResize() {
|
|
1667
|
-
const e =
|
|
1691
|
+
const e = W.getSize(container);
|
|
1668
1692
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1669
1693
|
}
|
|
1670
1694
|
/**
|
|
@@ -1674,7 +1698,7 @@ class Je extends h {
|
|
|
1674
1698
|
* @returns {void}
|
|
1675
1699
|
*/
|
|
1676
1700
|
scale() {
|
|
1677
|
-
const e = this.canvas, s = this.container, a =
|
|
1701
|
+
const e = this.canvas, s = this.container, a = W.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1678
1702
|
let u = n + "px", c = l + "px";
|
|
1679
1703
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1680
1704
|
const f = a.width, g = a.height, r = f / n, m = g / l, b = Math.min(r, m);
|
|
@@ -1837,28 +1861,28 @@ export {
|
|
|
1837
1861
|
ye as C,
|
|
1838
1862
|
ve as D,
|
|
1839
1863
|
xe as H,
|
|
1840
|
-
|
|
1864
|
+
wt as I,
|
|
1841
1865
|
ft as N,
|
|
1842
|
-
|
|
1866
|
+
H as O,
|
|
1843
1867
|
ot as P,
|
|
1844
1868
|
ht as S,
|
|
1845
|
-
|
|
1869
|
+
R as T,
|
|
1846
1870
|
Oe as U,
|
|
1847
1871
|
ct as W,
|
|
1848
1872
|
fe as a,
|
|
1849
|
-
|
|
1873
|
+
P as b,
|
|
1850
1874
|
he as c,
|
|
1851
1875
|
lt as d,
|
|
1852
1876
|
rt as e,
|
|
1853
1877
|
me as f,
|
|
1854
1878
|
ue as g,
|
|
1855
|
-
|
|
1879
|
+
pe as h,
|
|
1856
1880
|
be as i,
|
|
1857
|
-
j,
|
|
1881
|
+
Y as j,
|
|
1858
1882
|
dt as k,
|
|
1859
1883
|
ut as l,
|
|
1860
1884
|
mt as m,
|
|
1861
|
-
|
|
1885
|
+
pt as n,
|
|
1862
1886
|
Ue as o,
|
|
1863
1887
|
bt as p,
|
|
1864
1888
|
kt as q,
|
package/package.json
CHANGED