@base-framework/ui 1.0.322 → 1.0.323
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/atoms.es.js +28 -27
- package/dist/{empty-state-C5ekpz8A.js → empty-state-ByQ_GcoM.js} +59 -58
- package/dist/form-group-CJzpq9Us.js +29 -0
- package/dist/index.es.js +157 -156
- package/dist/molecules.es.js +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-Dshz3HOW.js → signature-panel-DVIv9LO1.js} +239 -238
- package/dist/{tooltip-B5hKQNZQ.js → tooltip-PupzYM1r.js} +1 -1
- package/dist/types/components/organisms/tabs/button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/underlined-tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab.d.ts +2 -2
- package/dist/veil-CqnAmj-D.js +20 -0
- package/package.json +1 -1
- package/dist/types/components/organisms/tabs/underlined-tab-examples.d.ts +0 -2
- package/dist/veil-CVCuKSvj.js +0 -46
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as
|
|
3
|
-
import { B as
|
|
4
|
-
import { Icons as
|
|
5
|
-
import { TableBody as
|
|
6
|
-
import { C as
|
|
7
|
-
import { A as
|
|
8
|
-
|
|
1
|
+
import { Button as w, Div as o, On as C, Span as L, Th as N, UseParent as E, I as Q, Thead as V, Tr as G, Table as B, P as v, Li as y, Time as X, Nav as m, Ul as f, Section as I, Canvas as q } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as d, Component as p, Data as T, DateTime as K, router as k, NavLink as M, DataTracker as U, Jot as _, base as O, Dom as W } from "@base-framework/base";
|
|
3
|
+
import { B as P, I as J } from "./buttons-CHEs54Wl.js";
|
|
4
|
+
import { Icons as S } from "./icons.es.js";
|
|
5
|
+
import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
|
|
6
|
+
import { C as ie, I as ne, H as oe } from "./inputs-9udyzkHR.js";
|
|
7
|
+
import { A as le, P as re } from "./range-calendar-BMWSJTE0.js";
|
|
8
|
+
import { V as g } from "./veil-CqnAmj-D.js";
|
|
9
|
+
d((t, e) => ({
|
|
9
10
|
class: "flex items-center px-4 py-2",
|
|
10
11
|
...t,
|
|
11
12
|
children: e
|
|
12
13
|
}));
|
|
13
|
-
|
|
14
|
+
d(({ value: t, label: e }) => w({
|
|
14
15
|
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
16
|
onState: ["performance", { active: t }],
|
|
16
17
|
dataSet: ["performance", ["state", t, "active"]],
|
|
17
18
|
click: (s, { state: a }) => a.performance = t
|
|
18
19
|
}, e));
|
|
19
|
-
class
|
|
20
|
+
class mt extends p {
|
|
20
21
|
/**
|
|
21
22
|
* This will declare the props for the compiler.
|
|
22
23
|
*
|
|
@@ -34,55 +35,55 @@ class ft extends c {
|
|
|
34
35
|
return o({ class: this.class || "" }, this.children);
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
+
const ce = (t) => {
|
|
38
39
|
const e = new Date(t, 11, 31), s = new Date(t, 0, 1);
|
|
39
40
|
return e.getDay() === 4 || // December 31 is a Thursday
|
|
40
41
|
s.getDay() === 4;
|
|
41
|
-
},
|
|
42
|
+
}, de = (t) => {
|
|
42
43
|
const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
|
|
43
44
|
e.setDate(e.getDate() - s + 3);
|
|
44
45
|
const a = e.getFullYear(), i = new Date(a, 0, 4);
|
|
45
46
|
i.setDate(i.getDate() - (i.getDay() + 6) % 7);
|
|
46
47
|
const n = Math.ceil((e - i) / 6048e5) + 1;
|
|
47
|
-
return n > 52 && !
|
|
48
|
+
return n > 52 && !ce(a) ? {
|
|
48
49
|
weekNumber: 1,
|
|
49
50
|
year: a + 1
|
|
50
51
|
} : {
|
|
51
52
|
weekNumber: n,
|
|
52
53
|
year: a
|
|
53
54
|
};
|
|
54
|
-
},
|
|
55
|
+
}, he = (t, e, s) => {
|
|
55
56
|
if (s === 0) return [];
|
|
56
57
|
const a = new Date(t, e, 0).getDate();
|
|
57
58
|
return Array.from(
|
|
58
59
|
{ length: s },
|
|
59
60
|
(i, n) => new Date(t, e - 1, a - s + n + 1)
|
|
60
61
|
);
|
|
61
|
-
},
|
|
62
|
+
}, ue = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), $ = (t, e) => {
|
|
62
63
|
const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
|
|
63
64
|
i.setDate(s.getDate() - a);
|
|
64
65
|
const n = new Date(i);
|
|
65
66
|
return n.setDate(i.getDate() + (t - 1) * 7), n;
|
|
66
|
-
},
|
|
67
|
+
}, pt = (t, e) => {
|
|
67
68
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
|
|
68
69
|
let n = [];
|
|
69
70
|
for (let l = 1 - s; l <= a; l++) {
|
|
70
|
-
const
|
|
71
|
-
n.push(l > 0 ?
|
|
71
|
+
const c = new Date(t, e, l);
|
|
72
|
+
n.push(l > 0 ? c : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
|
|
72
73
|
}
|
|
73
74
|
return i;
|
|
74
|
-
},
|
|
75
|
+
}, bt = (t, e) => {
|
|
75
76
|
const s = new Date(t, e + 1, 0).getDate(), a = [];
|
|
76
77
|
let i = [];
|
|
77
78
|
for (let n = 1; n <= s; n++)
|
|
78
79
|
i.push(new Date(t, e, n)), i.length === 7 && (a.push(i), i = []);
|
|
79
80
|
return i.length > 0 && a.push(i), a;
|
|
80
|
-
},
|
|
81
|
+
}, fe = (t, e, s) => {
|
|
81
82
|
const a = /* @__PURE__ */ new Date();
|
|
82
83
|
return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
|
|
83
|
-
},
|
|
84
|
-
const n =
|
|
85
|
-
return
|
|
84
|
+
}, ge = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
|
|
85
|
+
const n = fe(t, e, s);
|
|
86
|
+
return w({
|
|
86
87
|
text: t || "",
|
|
87
88
|
disabled: !t,
|
|
88
89
|
class: `
|
|
@@ -92,19 +93,19 @@ const re = (t) => {
|
|
|
92
93
|
`,
|
|
93
94
|
click: () => i(a, s)
|
|
94
95
|
});
|
|
95
|
-
},
|
|
96
|
-
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i =
|
|
97
|
-
for (let
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
102
|
-
days:
|
|
96
|
+
}, me = (t, e) => {
|
|
97
|
+
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = he(t, e, s), n = Array.from({ length: a }, (h, x) => new Date(t, e, x + 1)), l = (i.length + n.length) % 7, c = l === 0 ? 0 : 7 - l, r = ue(t, e, c), u = [...i, ...n, ...r], b = [];
|
|
98
|
+
for (let h = 0; h < u.length; h += 7) {
|
|
99
|
+
const x = u.slice(h, h + 7), D = x.find((F) => F) || new Date(t, e, 1), { weekNumber: H, year: Y } = de(D);
|
|
100
|
+
b.push({
|
|
101
|
+
weekNumber: H,
|
|
102
|
+
year: Y,
|
|
103
|
+
days: x
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
return
|
|
106
|
-
},
|
|
107
|
-
const { year: i, month: n, currentDate: l } = a,
|
|
106
|
+
return b;
|
|
107
|
+
}, pe = ({ selectWeek: t }) => C("month", (e, s, { data: a }) => {
|
|
108
|
+
const { year: i, month: n, currentDate: l } = a, c = me(i, n);
|
|
108
109
|
return o(
|
|
109
110
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
110
111
|
[
|
|
@@ -115,12 +116,12 @@ const re = (t) => {
|
|
|
115
116
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
116
117
|
},
|
|
117
118
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
118
|
-
(r) =>
|
|
119
|
+
(r) => L({ class: "px-1 py-1", text: r })
|
|
119
120
|
)
|
|
120
121
|
),
|
|
121
122
|
// Render each "week" row
|
|
122
|
-
...
|
|
123
|
-
({ weekNumber: r, days:
|
|
123
|
+
...c.map(
|
|
124
|
+
({ weekNumber: r, days: u, year: b }) => o({
|
|
124
125
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
125
126
|
onSet: ["currentWeek", {
|
|
126
127
|
ring: r
|
|
@@ -129,7 +130,7 @@ const re = (t) => {
|
|
|
129
130
|
// Left column: ISO week number
|
|
130
131
|
o({
|
|
131
132
|
class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
|
|
132
|
-
click: () => t(r,
|
|
133
|
+
click: () => t(r, b),
|
|
133
134
|
// If you have a 'currentWeek' state, you can highlight it with 'onSet'
|
|
134
135
|
onSet: ["currentWeek", {
|
|
135
136
|
"text-primary-foreground": r,
|
|
@@ -140,11 +141,11 @@ const re = (t) => {
|
|
|
140
141
|
// The 7 cells for each day in the row
|
|
141
142
|
o(
|
|
142
143
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
143
|
-
|
|
144
|
-
(
|
|
145
|
-
year:
|
|
146
|
-
month:
|
|
147
|
-
day:
|
|
144
|
+
u.map(
|
|
145
|
+
(h) => ge({
|
|
146
|
+
year: h?.getFullYear() || null,
|
|
147
|
+
month: h?.getMonth() || null,
|
|
148
|
+
day: h?.getDate() || null,
|
|
148
149
|
weekNumber: r,
|
|
149
150
|
selectWeek: t
|
|
150
151
|
})
|
|
@@ -154,7 +155,7 @@ const re = (t) => {
|
|
|
154
155
|
)
|
|
155
156
|
]
|
|
156
157
|
);
|
|
157
|
-
}),
|
|
158
|
+
}), z = ({ label: t, click: e }) => P(
|
|
158
159
|
{
|
|
159
160
|
class: `
|
|
160
161
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -165,20 +166,20 @@ const re = (t) => {
|
|
|
165
166
|
click: e,
|
|
166
167
|
"aria-label": `${t} month`,
|
|
167
168
|
variant: "icon",
|
|
168
|
-
icon: t === "Previous" ?
|
|
169
|
+
icon: t === "Previous" ? S.chevron.single.left : S.chevron.single.right
|
|
169
170
|
}
|
|
170
|
-
),
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
), be = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
172
|
+
L("[[monthName]] [[year]]"),
|
|
173
|
+
z({
|
|
173
174
|
label: "Previous",
|
|
174
175
|
click: e
|
|
175
176
|
}),
|
|
176
|
-
|
|
177
|
+
z({
|
|
177
178
|
label: "Next",
|
|
178
179
|
click: t
|
|
179
180
|
})
|
|
180
181
|
]);
|
|
181
|
-
class
|
|
182
|
+
class xt extends p {
|
|
182
183
|
/**
|
|
183
184
|
* This will declare the props for the compiler.
|
|
184
185
|
*
|
|
@@ -193,8 +194,8 @@ class pt extends c {
|
|
|
193
194
|
* @returns {Data}
|
|
194
195
|
*/
|
|
195
196
|
setData() {
|
|
196
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
197
|
-
return new
|
|
197
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = $(s, e.getFullYear());
|
|
198
|
+
return new T({
|
|
198
199
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
200
|
year: a.getFullYear(),
|
|
200
201
|
month: a.getMonth(),
|
|
@@ -276,7 +277,7 @@ class pt extends c {
|
|
|
276
277
|
*/
|
|
277
278
|
selectWeek(e, s) {
|
|
278
279
|
this.data.currentWeek = e;
|
|
279
|
-
const a =
|
|
280
|
+
const a = $(e, s);
|
|
280
281
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
281
282
|
}
|
|
282
283
|
/**
|
|
@@ -286,38 +287,38 @@ class pt extends c {
|
|
|
286
287
|
*/
|
|
287
288
|
render() {
|
|
288
289
|
return o({ class: "week-calendar-container border rounded-md p-3" }, [
|
|
289
|
-
|
|
290
|
+
be({
|
|
290
291
|
next: () => this.goToNextMonth(),
|
|
291
292
|
previous: () => this.goToPreviousMonth()
|
|
292
293
|
}),
|
|
293
|
-
|
|
294
|
+
pe({
|
|
294
295
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
295
296
|
})
|
|
296
297
|
]);
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
const
|
|
300
|
+
const xe = (t, e) => {
|
|
300
301
|
const s = t.toggleAllSelectedRows();
|
|
301
302
|
e.state.checked = !s;
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
]),
|
|
303
|
+
}, ke = (t) => N({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
304
|
+
E((e) => new ie({ class: "mr-2", onChange: (s, a) => xe(e, a) }))
|
|
305
|
+
]), we = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
306
|
const l = t || "justify-start";
|
|
306
|
-
return
|
|
307
|
+
return N({
|
|
307
308
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
308
309
|
click: e && (() => i(s))
|
|
309
310
|
}, [
|
|
310
311
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
311
|
-
|
|
312
|
-
e &&
|
|
312
|
+
L(a),
|
|
313
|
+
e && Q({ class: "ml-2", html: S.arrows.upDown })
|
|
313
314
|
])
|
|
314
315
|
]);
|
|
315
|
-
},
|
|
316
|
+
}, R = (t) => V([
|
|
316
317
|
G({
|
|
317
318
|
class: "text-muted-foreground border-b",
|
|
318
319
|
map: [
|
|
319
320
|
t.headers,
|
|
320
|
-
(e) => e.label === "checkbox" ?
|
|
321
|
+
(e) => e.label === "checkbox" ? ke({ toggle: t.toggle }) : we({
|
|
321
322
|
align: e.align,
|
|
322
323
|
sortable: e.sortable,
|
|
323
324
|
key: e.key,
|
|
@@ -326,17 +327,17 @@ const be = (t, e) => {
|
|
|
326
327
|
})
|
|
327
328
|
]
|
|
328
329
|
})
|
|
329
|
-
]),
|
|
330
|
+
]), ye = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new Z({
|
|
330
331
|
cache: "list",
|
|
331
332
|
key: t,
|
|
332
333
|
items: e,
|
|
333
|
-
rowItem: (
|
|
334
|
+
rowItem: (c) => a(c, s),
|
|
334
335
|
class: "divide-y divide-border",
|
|
335
336
|
emptyState: i,
|
|
336
337
|
skeleton: n,
|
|
337
338
|
columnCount: l
|
|
338
339
|
});
|
|
339
|
-
class
|
|
340
|
+
class j extends p {
|
|
340
341
|
/**
|
|
341
342
|
* Initializes component data.
|
|
342
343
|
*
|
|
@@ -344,7 +345,7 @@ class U extends c {
|
|
|
344
345
|
*/
|
|
345
346
|
setData() {
|
|
346
347
|
let e = this.rows && this.rows.length > 0;
|
|
347
|
-
return (this.loadMoreItems || this.tableData) && !e && (e = null), new
|
|
348
|
+
return (this.loadMoreItems || this.tableData) && !e && (e = null), new T({
|
|
348
349
|
selectedRows: [],
|
|
349
350
|
// @ts-ignore
|
|
350
351
|
hasItems: e,
|
|
@@ -415,14 +416,14 @@ class U extends c {
|
|
|
415
416
|
render() {
|
|
416
417
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
417
418
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
418
|
-
|
|
419
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
419
420
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
420
|
-
|
|
421
|
+
B({ class: "w-full" }, [
|
|
421
422
|
// @ts-ignore
|
|
422
|
-
this.headers &&
|
|
423
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
423
424
|
// @ts-ignore
|
|
424
425
|
this.customHeader ?? null,
|
|
425
|
-
|
|
426
|
+
ye({
|
|
426
427
|
// @ts-ignore
|
|
427
428
|
key: this.key,
|
|
428
429
|
// @ts-ignore
|
|
@@ -501,7 +502,7 @@ class U extends c {
|
|
|
501
502
|
this.data.selectedRows = [];
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
|
-
const
|
|
505
|
+
const ve = (t) => new ee({
|
|
505
506
|
cache: "list",
|
|
506
507
|
loadMoreItems: t.loadMoreItems,
|
|
507
508
|
offset: t.offset,
|
|
@@ -514,7 +515,7 @@ const ye = (t) => new Z({
|
|
|
514
515
|
skeleton: t.skeleton,
|
|
515
516
|
columnCount: t.columnCount
|
|
516
517
|
});
|
|
517
|
-
class
|
|
518
|
+
class De extends j {
|
|
518
519
|
/**
|
|
519
520
|
* Renders the DataTable component.
|
|
520
521
|
*
|
|
@@ -523,14 +524,14 @@ class ve extends U {
|
|
|
523
524
|
render() {
|
|
524
525
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
525
526
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
526
|
-
|
|
527
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
527
528
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
528
|
-
|
|
529
|
+
B({ class: "w-full" }, [
|
|
529
530
|
// @ts-ignore
|
|
530
|
-
this.headers &&
|
|
531
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
531
532
|
// @ts-ignore
|
|
532
533
|
this.customHeader ?? null,
|
|
533
|
-
|
|
534
|
+
ve({
|
|
534
535
|
// @ts-ignore
|
|
535
536
|
loadMoreItems: this.loadMoreItems,
|
|
536
537
|
// @ts-ignore
|
|
@@ -566,7 +567,7 @@ class ve extends U {
|
|
|
566
567
|
this.list.refresh();
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
|
-
const
|
|
570
|
+
const kt = d((t) => new De(
|
|
570
571
|
{
|
|
571
572
|
cache: t.cache ?? "list",
|
|
572
573
|
tableData: t.data,
|
|
@@ -583,7 +584,7 @@ const bt = h((t) => new ve(
|
|
|
583
584
|
emptyState: t.emptyState,
|
|
584
585
|
skeleton: t.skeleton
|
|
585
586
|
}
|
|
586
|
-
)),
|
|
587
|
+
)), Se = (t) => new te({
|
|
587
588
|
cache: "list",
|
|
588
589
|
scrollContainer: t.scrollContainer,
|
|
589
590
|
loadMoreItems: t.loadMoreItems,
|
|
@@ -597,7 +598,7 @@ const bt = h((t) => new ve(
|
|
|
597
598
|
skeleton: t.skeleton,
|
|
598
599
|
columnCount: t.columnCount
|
|
599
600
|
});
|
|
600
|
-
class
|
|
601
|
+
class Ce extends j {
|
|
601
602
|
/**
|
|
602
603
|
* Renders the DataTable component.
|
|
603
604
|
*
|
|
@@ -606,14 +607,14 @@ class Se extends U {
|
|
|
606
607
|
render() {
|
|
607
608
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
608
609
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
609
|
-
|
|
610
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
610
611
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
611
|
-
|
|
612
|
+
B({ class: "w-full" }, [
|
|
612
613
|
// @ts-ignore
|
|
613
|
-
this.headers &&
|
|
614
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
614
615
|
// @ts-ignore
|
|
615
616
|
this.customHeader ?? null,
|
|
616
|
-
|
|
617
|
+
Se({
|
|
617
618
|
// @ts-ignore
|
|
618
619
|
scrollContainer: this.scrollContainer,
|
|
619
620
|
// @ts-ignore
|
|
@@ -651,7 +652,7 @@ class Se extends U {
|
|
|
651
652
|
this.list.refresh();
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
|
-
const
|
|
655
|
+
const wt = d((t) => new Ce(
|
|
655
656
|
{
|
|
656
657
|
cache: t.cache ?? "list",
|
|
657
658
|
tableData: t.data,
|
|
@@ -669,45 +670,45 @@ const xt = h((t) => new Se(
|
|
|
669
670
|
emptyState: t.emptyState,
|
|
670
671
|
skeleton: t.skeleton
|
|
671
672
|
}
|
|
672
|
-
)),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
])),
|
|
673
|
+
)), Le = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
674
|
+
v({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
675
|
+
v({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
676
|
+
])), Ie = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
676
677
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
677
678
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
678
679
|
]),
|
|
679
|
-
|
|
680
|
-
]),
|
|
681
|
-
|
|
680
|
+
v({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
681
|
+
]), Be = (t) => v({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
682
|
+
L("Last seen "),
|
|
682
683
|
X({ datetime: t }, "3h ago")
|
|
683
|
-
]),
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
])),
|
|
684
|
+
]), Te = (t, e) => t === "online" ? Ie() : Be(e), Me = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
685
|
+
v({ class: "text-sm leading-6 m-0" }, t),
|
|
686
|
+
Te(s, e)
|
|
687
|
+
])), Pe = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => y({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
687
688
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
688
|
-
|
|
689
|
-
|
|
689
|
+
le({ src: t.image, alt: t.name, fallbackText: Pe(t.name) }),
|
|
690
|
+
Le({ name: t.name, email: t.email })
|
|
690
691
|
]),
|
|
691
|
-
|
|
692
|
+
Me({
|
|
692
693
|
role: t.role,
|
|
693
694
|
lastSeen: t.lastSeen,
|
|
694
695
|
status: t.status
|
|
695
696
|
})
|
|
696
|
-
])),
|
|
697
|
+
])), yt = d((t) => new se({
|
|
697
698
|
cache: "list",
|
|
698
699
|
key: "name",
|
|
699
700
|
items: t.users,
|
|
700
701
|
role: "list",
|
|
701
702
|
class: "divide-y divide-border",
|
|
702
|
-
rowItem:
|
|
703
|
-
})),
|
|
703
|
+
rowItem: Re
|
|
704
|
+
})), Oe = (t, e) => e.includes(t), We = (t, e, s) => t.exact ? s === e : Oe(e, s), $e = ({ text: t, href: e, exact: s, hidden: a }) => new M({
|
|
704
705
|
text: t,
|
|
705
706
|
href: e,
|
|
706
707
|
exact: s,
|
|
707
708
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
708
709
|
class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
|
|
709
710
|
});
|
|
710
|
-
class
|
|
711
|
+
class vt extends p {
|
|
711
712
|
/**
|
|
712
713
|
* This will declare the props for the compiler.
|
|
713
714
|
*
|
|
@@ -731,11 +732,11 @@ class wt extends c {
|
|
|
731
732
|
return m(
|
|
732
733
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
733
734
|
[
|
|
734
|
-
|
|
735
|
+
f({
|
|
735
736
|
class: "flex gap-x-4",
|
|
736
737
|
map: [this.options, (e) => this.addLink(e)],
|
|
737
738
|
watch: {
|
|
738
|
-
value: ["[[path]]",
|
|
739
|
+
value: ["[[path]]", k.data],
|
|
739
740
|
callBack: this.updateLinks.bind(this)
|
|
740
741
|
}
|
|
741
742
|
})
|
|
@@ -748,7 +749,7 @@ class wt extends c {
|
|
|
748
749
|
* @returns {void}
|
|
749
750
|
*/
|
|
750
751
|
afterSetup() {
|
|
751
|
-
const e =
|
|
752
|
+
const e = k.data.path;
|
|
752
753
|
this.updateLinks(e);
|
|
753
754
|
}
|
|
754
755
|
/**
|
|
@@ -763,7 +764,7 @@ class wt extends c {
|
|
|
763
764
|
for (const a of this.links) {
|
|
764
765
|
if (!a.rendered)
|
|
765
766
|
continue;
|
|
766
|
-
|
|
767
|
+
We(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
|
|
767
768
|
}
|
|
768
769
|
!s && this.links[0] && this.updateLink(this.links[0], !0);
|
|
769
770
|
}
|
|
@@ -793,7 +794,7 @@ class wt extends c {
|
|
|
793
794
|
* @returns {object}
|
|
794
795
|
*/
|
|
795
796
|
addLink({ label: e, href: s, exact: a, hidden: i }) {
|
|
796
|
-
const n =
|
|
797
|
+
const n = $e({ text: e, href: s, exact: a, hidden: i });
|
|
797
798
|
return this.links.push(n), n;
|
|
798
799
|
}
|
|
799
800
|
/**
|
|
@@ -805,13 +806,13 @@ class wt extends c {
|
|
|
805
806
|
this.links = [];
|
|
806
807
|
}
|
|
807
808
|
}
|
|
808
|
-
const
|
|
809
|
+
const Dt = d((t) => {
|
|
809
810
|
const e = t.margin || "m-4 ml-0";
|
|
810
811
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
811
|
-
|
|
812
|
+
P({ variant: "back", class: "ghost", ...t })
|
|
812
813
|
]);
|
|
813
814
|
});
|
|
814
|
-
class
|
|
815
|
+
class A extends p {
|
|
815
816
|
/**
|
|
816
817
|
* This will declare the props for the compiler.
|
|
817
818
|
*
|
|
@@ -898,13 +899,13 @@ class j extends c {
|
|
|
898
899
|
return this.children;
|
|
899
900
|
}
|
|
900
901
|
}
|
|
901
|
-
|
|
902
|
+
U.addType("dockableOverlay", (t) => {
|
|
902
903
|
if (!t)
|
|
903
904
|
return;
|
|
904
905
|
const e = t.component;
|
|
905
906
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
906
907
|
});
|
|
907
|
-
class
|
|
908
|
+
class St extends A {
|
|
908
909
|
/**
|
|
909
910
|
* This will stop presistence.
|
|
910
911
|
*
|
|
@@ -970,7 +971,7 @@ class vt extends j {
|
|
|
970
971
|
* @returns {void}
|
|
971
972
|
*/
|
|
972
973
|
afterSetup() {
|
|
973
|
-
|
|
974
|
+
U.add(
|
|
974
975
|
this.container,
|
|
975
976
|
"dockableOverlay",
|
|
976
977
|
{
|
|
@@ -1013,7 +1014,7 @@ class vt extends j {
|
|
|
1013
1014
|
document.documentElement.style.overflowY = "auto";
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
1016
|
-
class
|
|
1017
|
+
class Ct extends A {
|
|
1017
1018
|
/**
|
|
1018
1019
|
* This will get the overlay type.
|
|
1019
1020
|
*
|
|
@@ -1032,7 +1033,7 @@ class Dt extends j {
|
|
|
1032
1033
|
this.container = e, this.initialize();
|
|
1033
1034
|
}
|
|
1034
1035
|
}
|
|
1035
|
-
const
|
|
1036
|
+
const ze = d(({ index: t, click: e, state: s }, a) => y({
|
|
1036
1037
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1037
1038
|
onState: [
|
|
1038
1039
|
[s, "selectedIndex", {
|
|
@@ -1041,11 +1042,11 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1041
1042
|
}]
|
|
1042
1043
|
],
|
|
1043
1044
|
click: () => e(t)
|
|
1044
|
-
}, a)),
|
|
1045
|
+
}, a)), Ne = d(({ selectOption: t, state: e }) => f({
|
|
1045
1046
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1046
|
-
for: ["filteredOptions", (s, a) =>
|
|
1047
|
-
})),
|
|
1048
|
-
|
|
1047
|
+
for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
|
|
1048
|
+
})), Ue = d((t) => o({ class: "relative flex items-center" }, [
|
|
1049
|
+
ne({
|
|
1049
1050
|
cache: "input",
|
|
1050
1051
|
class: t.class ?? "",
|
|
1051
1052
|
placeholder: t.placeholder ?? "Search...",
|
|
@@ -1061,22 +1062,22 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1061
1062
|
]
|
|
1062
1063
|
}),
|
|
1063
1064
|
t.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
1064
|
-
|
|
1065
|
+
J(t.icon)
|
|
1065
1066
|
])
|
|
1066
|
-
])),
|
|
1067
|
+
])), je = (t) => o({
|
|
1067
1068
|
class: "relative flex fle-auto flex-col",
|
|
1068
1069
|
onState: ["open", (e, s, a) => {
|
|
1069
1070
|
if (e)
|
|
1070
|
-
return new
|
|
1071
|
+
return new re({
|
|
1071
1072
|
cache: "dropdown",
|
|
1072
1073
|
parent: a,
|
|
1073
1074
|
button: a.input,
|
|
1074
1075
|
size: "xl"
|
|
1075
1076
|
}, [
|
|
1076
|
-
|
|
1077
|
+
Ne(t)
|
|
1077
1078
|
]);
|
|
1078
1079
|
}]
|
|
1079
|
-
}),
|
|
1080
|
+
}), Lt = _(
|
|
1080
1081
|
{
|
|
1081
1082
|
/**
|
|
1082
1083
|
* This will set up the data object.
|
|
@@ -1085,7 +1086,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1085
1086
|
*/
|
|
1086
1087
|
setData() {
|
|
1087
1088
|
const t = this.options || [];
|
|
1088
|
-
return new
|
|
1089
|
+
return new T({
|
|
1089
1090
|
options: t,
|
|
1090
1091
|
filteredOptions: t
|
|
1091
1092
|
});
|
|
@@ -1173,7 +1174,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1173
1174
|
*/
|
|
1174
1175
|
render() {
|
|
1175
1176
|
return o({ class: "relative w-full max-w-md" }, [
|
|
1176
|
-
|
|
1177
|
+
Ue({
|
|
1177
1178
|
// @ts-ignore
|
|
1178
1179
|
state: this.state,
|
|
1179
1180
|
// @ts-ignore
|
|
@@ -1185,7 +1186,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1185
1186
|
// @ts-ignore
|
|
1186
1187
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
1187
1188
|
}),
|
|
1188
|
-
|
|
1189
|
+
je({
|
|
1189
1190
|
// @ts-ignore
|
|
1190
1191
|
state: this.state,
|
|
1191
1192
|
// @ts-ignore
|
|
@@ -1196,22 +1197,22 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1196
1197
|
]);
|
|
1197
1198
|
}
|
|
1198
1199
|
}
|
|
1199
|
-
),
|
|
1200
|
+
), Ae = (t) => y(
|
|
1200
1201
|
{
|
|
1201
1202
|
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",
|
|
1202
|
-
|
|
1203
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1203
1204
|
},
|
|
1204
1205
|
[
|
|
1205
|
-
|
|
1206
|
+
w({
|
|
1206
1207
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1207
|
-
|
|
1208
|
+
onState: ["selected", { selected: t.value }],
|
|
1208
1209
|
click: (e) => t.callBack(t.value)
|
|
1209
1210
|
}, t.label)
|
|
1210
1211
|
]
|
|
1211
|
-
),
|
|
1212
|
-
|
|
1212
|
+
), He = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1213
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => He(e, t.callBack)] })
|
|
1213
1214
|
]);
|
|
1214
|
-
class
|
|
1215
|
+
class It extends g {
|
|
1215
1216
|
/**
|
|
1216
1217
|
* This will declare the props for the compiler.
|
|
1217
1218
|
*
|
|
@@ -1228,12 +1229,12 @@ class Ct extends c {
|
|
|
1228
1229
|
render() {
|
|
1229
1230
|
const e = this.select.bind(this);
|
|
1230
1231
|
return o({ class: "" }, [
|
|
1231
|
-
|
|
1232
|
+
Ye({
|
|
1232
1233
|
class: this.class,
|
|
1233
1234
|
options: this.options,
|
|
1234
1235
|
callBack: e
|
|
1235
1236
|
}),
|
|
1236
|
-
|
|
1237
|
+
I({
|
|
1237
1238
|
class: "tab-content",
|
|
1238
1239
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1239
1240
|
})
|
|
@@ -1298,23 +1299,23 @@ class Ct extends c {
|
|
|
1298
1299
|
};
|
|
1299
1300
|
}
|
|
1300
1301
|
}
|
|
1301
|
-
const
|
|
1302
|
+
const Fe = (t) => y(
|
|
1302
1303
|
{
|
|
1303
1304
|
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",
|
|
1304
|
-
|
|
1305
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1305
1306
|
},
|
|
1306
1307
|
[
|
|
1307
|
-
|
|
1308
|
+
w({
|
|
1308
1309
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1309
|
-
|
|
1310
|
+
onState: ["selected", { selected: t.value }],
|
|
1310
1311
|
click: (e) => t.callBack(t.value),
|
|
1311
1312
|
disabled: t.disabled
|
|
1312
1313
|
}, t.label)
|
|
1313
1314
|
]
|
|
1314
|
-
),
|
|
1315
|
-
|
|
1315
|
+
), Ee = (t, e) => (t.callBack = e, Fe(t)), Qe = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1316
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ee(e, t.callBack)] })
|
|
1316
1317
|
]);
|
|
1317
|
-
class
|
|
1318
|
+
class Bt extends g {
|
|
1318
1319
|
/**
|
|
1319
1320
|
* This will declare the props for the compiler.
|
|
1320
1321
|
*
|
|
@@ -1330,7 +1331,7 @@ class Lt extends c {
|
|
|
1330
1331
|
*/
|
|
1331
1332
|
render() {
|
|
1332
1333
|
const e = this.select.bind(this);
|
|
1333
|
-
return
|
|
1334
|
+
return Qe({
|
|
1334
1335
|
class: this.class,
|
|
1335
1336
|
options: this.options,
|
|
1336
1337
|
callBack: e
|
|
@@ -1356,17 +1357,17 @@ class Lt extends c {
|
|
|
1356
1357
|
};
|
|
1357
1358
|
}
|
|
1358
1359
|
}
|
|
1359
|
-
const
|
|
1360
|
+
const Ve = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ge = (t, e) => {
|
|
1360
1361
|
const s = t.getLinkPath();
|
|
1361
|
-
return t.exact ? e === s :
|
|
1362
|
-
}, Xe = ({ text: t, href: e, exact: s }) => new
|
|
1362
|
+
return t.exact ? e === s : Ve(s, e);
|
|
1363
|
+
}, Xe = ({ text: t, href: e, exact: s }) => new M({
|
|
1363
1364
|
text: t,
|
|
1364
1365
|
href: e,
|
|
1365
1366
|
exact: s,
|
|
1366
1367
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1367
1368
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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"
|
|
1368
1369
|
});
|
|
1369
|
-
class qe extends
|
|
1370
|
+
class qe extends g {
|
|
1370
1371
|
/**
|
|
1371
1372
|
* This will declare the props for the compiler.
|
|
1372
1373
|
*
|
|
@@ -1388,11 +1389,11 @@ class qe extends c {
|
|
|
1388
1389
|
*/
|
|
1389
1390
|
render() {
|
|
1390
1391
|
return m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1391
|
-
|
|
1392
|
+
f({
|
|
1392
1393
|
class: "flex flex-auto flex-row",
|
|
1393
1394
|
map: [this.options, (e) => this.addLink(e)],
|
|
1394
1395
|
watch: {
|
|
1395
|
-
value: ["[[path]]",
|
|
1396
|
+
value: ["[[path]]", k.data],
|
|
1396
1397
|
callBack: this.updateLinks.bind(this)
|
|
1397
1398
|
}
|
|
1398
1399
|
})
|
|
@@ -1404,7 +1405,7 @@ class qe extends c {
|
|
|
1404
1405
|
* @returns {void}
|
|
1405
1406
|
*/
|
|
1406
1407
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1408
|
+
const e = k.data.path;
|
|
1408
1409
|
this.updateLinks(e);
|
|
1409
1410
|
}
|
|
1410
1411
|
/**
|
|
@@ -1461,7 +1462,7 @@ class qe extends c {
|
|
|
1461
1462
|
this.links = [];
|
|
1462
1463
|
}
|
|
1463
1464
|
}
|
|
1464
|
-
class
|
|
1465
|
+
class Tt extends g {
|
|
1465
1466
|
/**
|
|
1466
1467
|
* This will declare the props for the compiler.
|
|
1467
1468
|
*
|
|
@@ -1481,7 +1482,7 @@ class It extends c {
|
|
|
1481
1482
|
class: this.class,
|
|
1482
1483
|
options: this.options
|
|
1483
1484
|
}),
|
|
1484
|
-
|
|
1485
|
+
I({
|
|
1485
1486
|
class: "tab-content",
|
|
1486
1487
|
switch: this.addGroup()
|
|
1487
1488
|
})
|
|
@@ -1507,22 +1508,22 @@ class It extends c {
|
|
|
1507
1508
|
return s;
|
|
1508
1509
|
}
|
|
1509
1510
|
}
|
|
1510
|
-
const Ke = (t) =>
|
|
1511
|
+
const Ke = (t) => y(
|
|
1511
1512
|
{
|
|
1512
1513
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1513
|
-
|
|
1514
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1514
1515
|
},
|
|
1515
1516
|
[
|
|
1516
|
-
|
|
1517
|
+
w({
|
|
1517
1518
|
class: "flex flex-auto justify-center items-center px-4 py-3 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1518
|
-
|
|
1519
|
+
onState: ["selected", { selected: t.value }],
|
|
1519
1520
|
click: (e) => t.callBack(t.value)
|
|
1520
1521
|
}, t.label)
|
|
1521
1522
|
]
|
|
1522
|
-
),
|
|
1523
|
-
|
|
1523
|
+
), _e = (t, e) => (t.callBack = e, Ke(t)), Je = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1524
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => _e(e, t.callBack)] })
|
|
1524
1525
|
]);
|
|
1525
|
-
class
|
|
1526
|
+
class Mt extends g {
|
|
1526
1527
|
/**
|
|
1527
1528
|
* This will declare the props for the compiler.
|
|
1528
1529
|
*
|
|
@@ -1539,12 +1540,12 @@ class Bt extends c {
|
|
|
1539
1540
|
render() {
|
|
1540
1541
|
const e = this.select.bind(this);
|
|
1541
1542
|
return o({ class: "underlined-button-tab-panel" }, [
|
|
1542
|
-
|
|
1543
|
+
Je({
|
|
1543
1544
|
class: this.class,
|
|
1544
1545
|
options: this.options,
|
|
1545
1546
|
callBack: e
|
|
1546
1547
|
}),
|
|
1547
|
-
|
|
1548
|
+
I({
|
|
1548
1549
|
class: "tab-content pt-6",
|
|
1549
1550
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1550
1551
|
})
|
|
@@ -1600,23 +1601,23 @@ class Bt extends c {
|
|
|
1600
1601
|
};
|
|
1601
1602
|
}
|
|
1602
1603
|
}
|
|
1603
|
-
const
|
|
1604
|
+
const Ze = (t) => y(
|
|
1604
1605
|
{
|
|
1605
1606
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1606
|
-
|
|
1607
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1607
1608
|
},
|
|
1608
1609
|
[
|
|
1609
|
-
|
|
1610
|
+
w({
|
|
1610
1611
|
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
|
|
1611
|
-
|
|
1612
|
+
onState: ["selected", { selected: t.value }],
|
|
1612
1613
|
click: (e) => t.callBack(t.value),
|
|
1613
1614
|
disabled: t.disabled
|
|
1614
1615
|
}, t.label)
|
|
1615
1616
|
]
|
|
1616
|
-
),
|
|
1617
|
-
|
|
1617
|
+
), et = (t, e) => (t.callBack = e, Ze(t)), tt = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1618
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => et(e, t.callBack)] })
|
|
1618
1619
|
]);
|
|
1619
|
-
class
|
|
1620
|
+
class Pt extends g {
|
|
1620
1621
|
/**
|
|
1621
1622
|
* This will declare the props for the compiler.
|
|
1622
1623
|
*
|
|
@@ -1632,7 +1633,7 @@ class Tt extends c {
|
|
|
1632
1633
|
*/
|
|
1633
1634
|
render() {
|
|
1634
1635
|
const e = this.select.bind(this);
|
|
1635
|
-
return
|
|
1636
|
+
return tt({
|
|
1636
1637
|
class: this.class,
|
|
1637
1638
|
options: this.options,
|
|
1638
1639
|
callBack: e
|
|
@@ -1658,17 +1659,17 @@ class Tt extends c {
|
|
|
1658
1659
|
};
|
|
1659
1660
|
}
|
|
1660
1661
|
}
|
|
1661
|
-
const
|
|
1662
|
+
const st = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), at = (t, e) => {
|
|
1662
1663
|
const s = t.getLinkPath();
|
|
1663
|
-
return t.exact ? e === s :
|
|
1664
|
-
},
|
|
1664
|
+
return t.exact ? e === s : st(s, e);
|
|
1665
|
+
}, it = ({ text: t, href: e, exact: s }) => new M({
|
|
1665
1666
|
text: t,
|
|
1666
1667
|
href: e,
|
|
1667
1668
|
exact: s,
|
|
1668
1669
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1669
1670
|
class: "relative inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100"
|
|
1670
1671
|
});
|
|
1671
|
-
class
|
|
1672
|
+
class nt extends g {
|
|
1672
1673
|
/**
|
|
1673
1674
|
* This will declare the props for the compiler.
|
|
1674
1675
|
*
|
|
@@ -1690,11 +1691,11 @@ class it extends c {
|
|
|
1690
1691
|
*/
|
|
1691
1692
|
render() {
|
|
1692
1693
|
return m({ class: `border-b border-border ${this.class}` }, [
|
|
1693
|
-
|
|
1694
|
+
f({
|
|
1694
1695
|
class: "flex flex-row items-center",
|
|
1695
1696
|
map: [this.options, (e) => this.addLink(e)],
|
|
1696
1697
|
watch: {
|
|
1697
|
-
value: ["[[path]]",
|
|
1698
|
+
value: ["[[path]]", k.data],
|
|
1698
1699
|
callBack: this.updateLinks.bind(this)
|
|
1699
1700
|
}
|
|
1700
1701
|
})
|
|
@@ -1706,7 +1707,7 @@ class it extends c {
|
|
|
1706
1707
|
* @returns {void}
|
|
1707
1708
|
*/
|
|
1708
1709
|
afterSetup() {
|
|
1709
|
-
const e =
|
|
1710
|
+
const e = k.data.path;
|
|
1710
1711
|
this.updateLinks(e);
|
|
1711
1712
|
}
|
|
1712
1713
|
/**
|
|
@@ -1719,7 +1720,7 @@ class it extends c {
|
|
|
1719
1720
|
let s = !1, a = this.links[0];
|
|
1720
1721
|
this.deactivateAllLinks();
|
|
1721
1722
|
for (const i of this.links)
|
|
1722
|
-
if (i.rendered !== !1 && (s =
|
|
1723
|
+
if (i.rendered !== !1 && (s = at(i, e), s === !0)) {
|
|
1723
1724
|
this.updateLink(i, !0);
|
|
1724
1725
|
break;
|
|
1725
1726
|
}
|
|
@@ -1751,7 +1752,7 @@ class it extends c {
|
|
|
1751
1752
|
* @returns {object}
|
|
1752
1753
|
*/
|
|
1753
1754
|
addLink({ label: e, href: s, exact: a }) {
|
|
1754
|
-
const i =
|
|
1755
|
+
const i = it({ text: e, href: s, exact: a });
|
|
1755
1756
|
return this.links.push(i), i;
|
|
1756
1757
|
}
|
|
1757
1758
|
/**
|
|
@@ -1763,7 +1764,7 @@ class it extends c {
|
|
|
1763
1764
|
this.links = [];
|
|
1764
1765
|
}
|
|
1765
1766
|
}
|
|
1766
|
-
class
|
|
1767
|
+
class Rt extends g {
|
|
1767
1768
|
/**
|
|
1768
1769
|
* This will declare the props for the compiler.
|
|
1769
1770
|
*
|
|
@@ -1779,11 +1780,11 @@ class Mt extends c {
|
|
|
1779
1780
|
*/
|
|
1780
1781
|
render() {
|
|
1781
1782
|
return o({ class: "underlined-tab-panel flex flex-auto flex-col" }, [
|
|
1782
|
-
new
|
|
1783
|
+
new nt({
|
|
1783
1784
|
class: this.class,
|
|
1784
1785
|
options: this.options
|
|
1785
1786
|
}),
|
|
1786
|
-
|
|
1787
|
+
I({
|
|
1787
1788
|
class: "tab-content pt-6 flex flex-auto flex-col",
|
|
1788
1789
|
switch: this.addGroup()
|
|
1789
1790
|
})
|
|
@@ -1809,7 +1810,7 @@ class Mt extends c {
|
|
|
1809
1810
|
return s;
|
|
1810
1811
|
}
|
|
1811
1812
|
}
|
|
1812
|
-
class
|
|
1813
|
+
class ot extends p {
|
|
1813
1814
|
/**
|
|
1814
1815
|
* Runs before rendering, sets up defaults, a timer for drawing,
|
|
1815
1816
|
* and basic canvas properties.
|
|
@@ -1819,7 +1820,7 @@ class nt extends c {
|
|
|
1819
1820
|
onCreated() {
|
|
1820
1821
|
this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
|
|
1821
1822
|
const e = 1e3 / 60;
|
|
1822
|
-
this.timer = new
|
|
1823
|
+
this.timer = new ae(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
|
|
1823
1824
|
}
|
|
1824
1825
|
/**
|
|
1825
1826
|
* Renders a <canvas> element.
|
|
@@ -1876,12 +1877,12 @@ class nt extends c {
|
|
|
1876
1877
|
let s, a;
|
|
1877
1878
|
const i = this.canvas, n = i.width / parseInt(i.style.width), l = i.getBoundingClientRect();
|
|
1878
1879
|
if (e.touches && e.touches.length) {
|
|
1879
|
-
const
|
|
1880
|
-
s =
|
|
1880
|
+
const u = e.touches[0];
|
|
1881
|
+
s = u.clientX, a = u.clientY;
|
|
1881
1882
|
} else
|
|
1882
1883
|
s = e.x || e.clientX, a = e.y || e.clientY;
|
|
1883
|
-
const
|
|
1884
|
-
this.mouse.x =
|
|
1884
|
+
const c = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
|
|
1885
|
+
this.mouse.x = c, this.mouse.y = r;
|
|
1885
1886
|
}
|
|
1886
1887
|
/**
|
|
1887
1888
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1924,8 +1925,8 @@ class nt extends c {
|
|
|
1924
1925
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1925
1926
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1926
1927
|
const i = new globalThis.Image();
|
|
1927
|
-
|
|
1928
|
-
s.drawImage(i, 0, 0),
|
|
1928
|
+
O.on("load", i, function n() {
|
|
1929
|
+
s.drawImage(i, 0, 0), O.off("load", i, n);
|
|
1929
1930
|
}), i.src = a;
|
|
1930
1931
|
}
|
|
1931
1932
|
this.draw();
|
|
@@ -1945,7 +1946,7 @@ class nt extends c {
|
|
|
1945
1946
|
* @returns {void}
|
|
1946
1947
|
*/
|
|
1947
1948
|
noScaleResize() {
|
|
1948
|
-
const e =
|
|
1949
|
+
const e = W.getSize(container);
|
|
1949
1950
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1950
1951
|
}
|
|
1951
1952
|
/**
|
|
@@ -1955,13 +1956,13 @@ class nt extends c {
|
|
|
1955
1956
|
* @returns {void}
|
|
1956
1957
|
*/
|
|
1957
1958
|
scale() {
|
|
1958
|
-
const e = this.canvas, s = this.container, a =
|
|
1959
|
-
let
|
|
1959
|
+
const e = this.canvas, s = this.container, a = W.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1960
|
+
let c = n + "px", r = l + "px";
|
|
1960
1961
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1962
|
+
const u = a.width, b = a.height, h = u / n, x = b / l, D = Math.min(h, x);
|
|
1963
|
+
c = n * D + "px", r = l * D + "px";
|
|
1963
1964
|
}
|
|
1964
|
-
e.style.width =
|
|
1965
|
+
e.style.width = c, e.style.height = r;
|
|
1965
1966
|
}
|
|
1966
1967
|
/**
|
|
1967
1968
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -2035,7 +2036,7 @@ class nt extends c {
|
|
|
2035
2036
|
this.timer.stop(), this.status = "stopped";
|
|
2036
2037
|
}
|
|
2037
2038
|
}
|
|
2038
|
-
class
|
|
2039
|
+
class Ot extends p {
|
|
2039
2040
|
/**
|
|
2040
2041
|
* Sets up default properties for the signature panel.
|
|
2041
2042
|
*
|
|
@@ -2052,19 +2053,19 @@ class Pt extends c {
|
|
|
2052
2053
|
*/
|
|
2053
2054
|
render() {
|
|
2054
2055
|
return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
|
|
2055
|
-
|
|
2056
|
+
oe({
|
|
2056
2057
|
cache: "hiddenInput",
|
|
2057
2058
|
required: !0,
|
|
2058
2059
|
bind: this.path + ".data"
|
|
2059
2060
|
}),
|
|
2060
2061
|
o({ class: "absolute top-2 right-2" }, [
|
|
2061
|
-
|
|
2062
|
+
P({
|
|
2062
2063
|
variant: "icon",
|
|
2063
|
-
icon:
|
|
2064
|
+
icon: S.circleX,
|
|
2064
2065
|
click: this.reset.bind(this)
|
|
2065
2066
|
})
|
|
2066
2067
|
]),
|
|
2067
|
-
new
|
|
2068
|
+
new ot({
|
|
2068
2069
|
cache: "canvasLayer",
|
|
2069
2070
|
margin: this.margin,
|
|
2070
2071
|
targetSize: this.targetSize,
|
|
@@ -2114,40 +2115,40 @@ class Pt extends c {
|
|
|
2114
2115
|
}
|
|
2115
2116
|
}
|
|
2116
2117
|
export {
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2118
|
+
Dt as B,
|
|
2119
|
+
ke as C,
|
|
2120
|
+
ye as D,
|
|
2121
|
+
we as H,
|
|
2122
|
+
Ct as I,
|
|
2123
|
+
vt as N,
|
|
2124
|
+
A as O,
|
|
2125
|
+
mt as P,
|
|
2126
|
+
wt as S,
|
|
2127
|
+
R as T,
|
|
2128
|
+
Re as U,
|
|
2129
|
+
xt as W,
|
|
2130
|
+
ue as a,
|
|
2131
|
+
$ as b,
|
|
2132
|
+
de as c,
|
|
2133
|
+
pt as d,
|
|
2134
|
+
bt as e,
|
|
2135
|
+
ge as f,
|
|
2136
|
+
he as g,
|
|
2137
|
+
pe as h,
|
|
2138
|
+
be as i,
|
|
2139
|
+
j,
|
|
2140
|
+
kt as k,
|
|
2141
|
+
yt as l,
|
|
2142
|
+
St as m,
|
|
2143
|
+
Lt as n,
|
|
2144
|
+
Ue as o,
|
|
2145
|
+
It as p,
|
|
2146
|
+
Bt as q,
|
|
2146
2147
|
qe as r,
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2148
|
+
Tt as s,
|
|
2149
|
+
Mt as t,
|
|
2150
|
+
Pt as u,
|
|
2151
|
+
nt as v,
|
|
2152
|
+
Rt as w,
|
|
2153
|
+
Ot as x
|
|
2153
2154
|
};
|