vlite3 1.5.6 → 1.5.7
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/components/ButtonGroup.vue.js +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +3 -3
- package/components/Chip/Chip.vue.d.ts +1 -0
- package/components/Chip/Chip.vue.js +67 -36
- package/components/Chip/types.d.ts +5 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DataTable/DataTable.vue.d.ts +12 -3
- package/components/DataTable/DataTable.vue.js +5 -586
- package/components/DataTable/DataTable.vue2.js +711 -2
- package/components/DataTable/DataTableHeader.vue.d.ts +22 -0
- package/components/DataTable/DataTableHeader.vue.js +5 -58
- package/components/DataTable/DataTableHeader.vue2.js +106 -2
- package/components/DataTable/DataTableRow.vue.d.ts +13 -0
- package/components/DataTable/DataTableRow.vue.js +2 -2
- package/components/DataTable/DataTableRow.vue2.js +133 -123
- package/components/DataTable/dataTableColumnWidths.d.ts +91 -0
- package/components/DataTable/dataTableColumnWidths.js +82 -0
- package/components/DataTable/types.d.ts +48 -0
- package/components/DataTable/useDataTableColumnResize.d.ts +52 -0
- package/components/DataTable/useDataTableColumnResize.js +328 -0
- package/components/Form/{AccordionView.vue.js → AccordionView.vue2.js} +1 -1
- package/components/Form/index.vue2.js +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/StatusChip/StatusChip.vue.d.ts +6 -0
- package/components/StatusChip/StatusChip.vue.js +12 -10
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +241 -220
- package/components/Tabes/types.d.ts +3 -1
- package/package.json +1 -1
- package/style.css +17 -3
- package/utils/usePersistentState.d.ts +4 -1
- package/utils/usePersistentState.js +4 -3
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
|
@@ -6,14 +6,36 @@ interface Props {
|
|
|
6
6
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
7
7
|
tableSortable?: boolean;
|
|
8
8
|
cellBordered?: boolean;
|
|
9
|
+
/** Enables resizing at this header's logical trailing edge. */
|
|
10
|
+
resizable?: boolean;
|
|
11
|
+
/** Render the header-local handle (bordered tables use the shared full-height layer). */
|
|
12
|
+
resizeHandleVisible?: boolean;
|
|
13
|
+
/** Column widths are currently owned by the table's `<colgroup>`. */
|
|
14
|
+
columnsFrozen?: boolean;
|
|
15
|
+
resizeActive?: boolean;
|
|
16
|
+
resizeWidth?: number;
|
|
17
|
+
resizeMin?: number;
|
|
18
|
+
resizeMax?: number;
|
|
19
|
+
resizeLabel?: string;
|
|
9
20
|
}
|
|
10
21
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
22
|
sort: (field: string) => any;
|
|
23
|
+
resizeStart: (event: PointerEvent) => any;
|
|
24
|
+
resizeKeyboard: (direction: 1 | -1, large: boolean) => any;
|
|
25
|
+
resizeReset: () => any;
|
|
12
26
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
13
27
|
onSort?: (field: string) => any;
|
|
28
|
+
onResizeStart?: (event: PointerEvent) => any;
|
|
29
|
+
onResizeKeyboard?: (direction: 1 | -1, large: boolean) => any;
|
|
30
|
+
onResizeReset?: () => any;
|
|
14
31
|
}>, {
|
|
15
32
|
size: "xs" | "sm" | "md" | "lg";
|
|
16
33
|
compact: boolean;
|
|
17
34
|
tableSortable: boolean;
|
|
35
|
+
resizable: boolean;
|
|
36
|
+
resizeHandleVisible: boolean;
|
|
37
|
+
columnsFrozen: boolean;
|
|
38
|
+
resizeActive: boolean;
|
|
39
|
+
resizeMax: number;
|
|
18
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableCellElement>;
|
|
19
41
|
export default _default;
|
|
@@ -1,60 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "w-4 h-4 shrink-0"
|
|
7
|
-
}, j = /* @__PURE__ */ y({
|
|
8
|
-
__name: "DataTableHeader",
|
|
9
|
-
props: {
|
|
10
|
-
header: {},
|
|
11
|
-
sortConfig: {},
|
|
12
|
-
compact: { type: Boolean, default: !1 },
|
|
13
|
-
size: { default: "md" },
|
|
14
|
-
tableSortable: { type: Boolean, default: !0 },
|
|
15
|
-
cellBordered: { type: Boolean }
|
|
16
|
-
},
|
|
17
|
-
emits: ["sort"],
|
|
18
|
-
setup(l, { emit: d }) {
|
|
19
|
-
const e = l, u = d, n = t(() => e.header.sortKey || e.header.field), f = t(
|
|
20
|
-
() => e.sortConfig?.field === n.value && e.sortConfig?.order
|
|
21
|
-
), p = t(() => !e.sortConfig || e.sortConfig.field !== n.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), r = t(() => {
|
|
22
|
-
const o = !!e.header.title || !!e.header.titleI18n;
|
|
23
|
-
return e.tableSortable && e.header.sortable !== !1 && o;
|
|
24
|
-
}), h = () => {
|
|
25
|
-
r.value && u("sort", e.header.field);
|
|
26
|
-
}, m = t(() => ({
|
|
27
|
-
left: "justify-start text-left",
|
|
28
|
-
center: "justify-center text-center",
|
|
29
|
-
right: "justify-end text-right"
|
|
30
|
-
})[e.header.align || "left"]), g = t(
|
|
31
|
-
() => e.header.titleI18n ? B(e.header.titleI18n) : e.header.title
|
|
32
|
-
), x = t(() => e.size === "xs" || e.compact ? `py-1.5! ${e.cellBordered ? "px-3!" : ""}` : e.size === "sm" ? `py-2! ${e.cellBordered ? "px-3!" : ""}` : e.size === "lg" ? `py-4! ${e.cellBordered ? "px-4!" : ""}` : `py-3! ${e.cellBordered ? "px-3.5!" : ""}`);
|
|
33
|
-
return (o, S) => (s(), i("th", {
|
|
34
|
-
scope: "col",
|
|
35
|
-
class: a(["group/th px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
|
|
36
|
-
x.value,
|
|
37
|
-
r.value ? "cursor-pointer hover:bg-muted/50" : "",
|
|
38
|
-
l.header.hideOnMobile ? "hidden md:table-cell" : ""
|
|
39
|
-
]]),
|
|
40
|
-
onClick: h
|
|
41
|
-
}, [
|
|
42
|
-
c("div", {
|
|
43
|
-
class: a(["flex items-center gap-2 space-x-2", m.value])
|
|
44
|
-
}, [
|
|
45
|
-
c("span", _, v(g.value), 1),
|
|
46
|
-
r.value ? (s(), i("span", k, [
|
|
47
|
-
C(w, {
|
|
48
|
-
icon: p.value,
|
|
49
|
-
class: a(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
|
|
50
|
-
f.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
|
|
51
|
-
]])
|
|
52
|
-
}, null, 8, ["icon", "class"])
|
|
53
|
-
])) : b("", !0)
|
|
54
|
-
], 2)
|
|
55
|
-
], 2));
|
|
56
|
-
}
|
|
57
|
-
});
|
|
1
|
+
import a from "./DataTableHeader.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-8735eb06"]]);
|
|
58
5
|
export {
|
|
59
|
-
|
|
6
|
+
m as default
|
|
60
7
|
};
|
|
@@ -1,4 +1,108 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as S, computed as r, openBlock as d, createElementBlock as u, normalizeStyle as R, normalizeClass as o, createElementVNode as c, toDisplayString as M, createVNode as $, createCommentVNode as h, withModifiers as p } from "vue";
|
|
2
|
+
import K from "../Icon.vue.js";
|
|
3
|
+
import { $t as D } from "../../utils/i18n.js";
|
|
4
|
+
const A = ["data-vlite-col"], E = {
|
|
5
|
+
"data-vlite-header-title": "",
|
|
6
|
+
class: "truncate text-xs font-bold! uppercase tracking-wider text-gray-900"
|
|
7
|
+
}, I = {
|
|
8
|
+
key: 0,
|
|
9
|
+
"data-vlite-header-action": "",
|
|
10
|
+
class: "h-4 w-4 shrink-0"
|
|
11
|
+
}, V = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"], L = /* @__PURE__ */ S({
|
|
12
|
+
__name: "DataTableHeader",
|
|
13
|
+
props: {
|
|
14
|
+
header: {},
|
|
15
|
+
sortConfig: {},
|
|
16
|
+
compact: { type: Boolean, default: !1 },
|
|
17
|
+
size: { default: "md" },
|
|
18
|
+
tableSortable: { type: Boolean, default: !0 },
|
|
19
|
+
cellBordered: { type: Boolean },
|
|
20
|
+
resizable: { type: Boolean, default: !1 },
|
|
21
|
+
resizeHandleVisible: { type: Boolean, default: !0 },
|
|
22
|
+
columnsFrozen: { type: Boolean, default: !1 },
|
|
23
|
+
resizeActive: { type: Boolean, default: !1 },
|
|
24
|
+
resizeWidth: {},
|
|
25
|
+
resizeMin: {},
|
|
26
|
+
resizeMax: { default: 4e3 },
|
|
27
|
+
resizeLabel: {}
|
|
28
|
+
},
|
|
29
|
+
emits: ["sort", "resizeStart", "resizeKeyboard", "resizeReset"],
|
|
30
|
+
setup(a, { emit: m }) {
|
|
31
|
+
const e = a, l = m, f = r(() => e.header.sortKey || e.header.field), z = r(
|
|
32
|
+
() => e.sortConfig?.field === f.value && e.sortConfig?.order
|
|
33
|
+
), y = r(() => !e.sortConfig || e.sortConfig.field !== f.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), n = r(() => {
|
|
34
|
+
const t = !!e.header.title || !!e.header.titleI18n;
|
|
35
|
+
return e.tableSortable && e.header.sortable !== !1 && t;
|
|
36
|
+
}), s = r(() => e.resizable && e.header.resizable !== !1), v = r(() => s.value && e.resizeHandleVisible), g = () => {
|
|
37
|
+
n.value && l("sort", e.header.field);
|
|
38
|
+
}, x = (t) => {
|
|
39
|
+
!s.value || t.button !== 0 || (t.preventDefault(), t.stopPropagation(), l("resizeStart", t));
|
|
40
|
+
}, b = (t) => {
|
|
41
|
+
if (t.key === "ArrowLeft" || t.key === "ArrowRight") {
|
|
42
|
+
t.preventDefault(), t.stopPropagation(), l("resizeKeyboard", t.key === "ArrowRight" ? 1 : -1, t.shiftKey);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), l("resizeReset"));
|
|
46
|
+
}, w = r(() => ({
|
|
47
|
+
left: "justify-start text-left",
|
|
48
|
+
center: "justify-center text-center",
|
|
49
|
+
right: "justify-end text-right"
|
|
50
|
+
})[e.header.align || "left"]), k = r(
|
|
51
|
+
() => e.header.titleI18n ? D(e.header.titleI18n) : e.header.title
|
|
52
|
+
), B = r(() => e.size === "xs" || e.compact ? `py-1.5! ${e.cellBordered ? "px-3!" : ""}` : e.size === "sm" ? `py-2! ${e.cellBordered ? "px-3!" : ""}` : e.size === "lg" ? `py-4! ${e.cellBordered ? "px-4!" : ""}` : `py-3! ${e.cellBordered ? "px-3.5!" : ""}`), C = r(
|
|
53
|
+
() => s.value ? { paddingInlineEnd: "1rem !important" } : void 0
|
|
54
|
+
);
|
|
55
|
+
return (t, i) => (d(), u("th", {
|
|
56
|
+
scope: "col",
|
|
57
|
+
"data-vlite-col": a.header.field,
|
|
58
|
+
class: o(["group/th relative px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0", [
|
|
59
|
+
B.value,
|
|
60
|
+
a.columnsFrozen ? "max-w-none" : "max-w-[400px]",
|
|
61
|
+
n.value ? "cursor-pointer hover:bg-muted/50" : "",
|
|
62
|
+
a.header.hideOnMobile ? "hidden md:table-cell" : ""
|
|
63
|
+
]]),
|
|
64
|
+
style: R(C.value),
|
|
65
|
+
onClick: g
|
|
66
|
+
}, [
|
|
67
|
+
c("div", {
|
|
68
|
+
"data-vlite-header-content": "",
|
|
69
|
+
class: o(["flex min-w-0 items-center gap-2 overflow-hidden", w.value])
|
|
70
|
+
}, [
|
|
71
|
+
c("span", E, M(k.value), 1),
|
|
72
|
+
n.value ? (d(), u("span", I, [
|
|
73
|
+
$(K, {
|
|
74
|
+
icon: y.value,
|
|
75
|
+
class: o(["mt-0.5 h-3.5 w-3.5 text-muted-foreground transition-all", [
|
|
76
|
+
z.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
|
|
77
|
+
]])
|
|
78
|
+
}, null, 8, ["icon", "class"])
|
|
79
|
+
])) : h("", !0)
|
|
80
|
+
], 2),
|
|
81
|
+
v.value ? (d(), u("span", {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: o(["data-table-header__resize-handle", a.resizeActive ? "data-table-header__resize-handle--active" : ""]),
|
|
84
|
+
role: "separator",
|
|
85
|
+
"aria-orientation": "vertical",
|
|
86
|
+
"aria-label": a.resizeLabel,
|
|
87
|
+
"aria-valuenow": a.resizeWidth,
|
|
88
|
+
"aria-valuemin": a.resizeMin,
|
|
89
|
+
"aria-valuemax": a.resizeMax,
|
|
90
|
+
"aria-valuetext": a.resizeWidth != null ? `${a.resizeWidth}px` : void 0,
|
|
91
|
+
tabindex: "0",
|
|
92
|
+
onPointerdown: x,
|
|
93
|
+
onClick: i[0] || (i[0] = p(() => {
|
|
94
|
+
}, ["stop"])),
|
|
95
|
+
onDblclick: i[1] || (i[1] = p((H) => l("resizeReset"), ["stop", "prevent"])),
|
|
96
|
+
onKeydown: b
|
|
97
|
+
}, [...i[2] || (i[2] = [
|
|
98
|
+
c("span", {
|
|
99
|
+
class: "data-table-header__resize-line",
|
|
100
|
+
"aria-hidden": "true"
|
|
101
|
+
}, null, -1)
|
|
102
|
+
])], 42, V)) : h("", !0)
|
|
103
|
+
], 14, A));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
2
106
|
export {
|
|
3
|
-
|
|
107
|
+
L as default
|
|
4
108
|
};
|
|
@@ -27,6 +27,17 @@ interface Props {
|
|
|
27
27
|
* Skips tree connector overlays; keeps expand + indent on the primary cell.
|
|
28
28
|
*/
|
|
29
29
|
stacked?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Column widths are owned by the table's `<colgroup>` (resizing is active).
|
|
32
|
+
* Configured `width` / `minWidth` styles and Tailwind `w-` / `min-w-` classes
|
|
33
|
+
* are skipped so they cannot fight the resolved width.
|
|
34
|
+
*/
|
|
35
|
+
columnsFrozen?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Resizing is enabled on this table — data cells get logical gutters on both
|
|
38
|
+
* inline sides so a column boundary never lands on top of cell content.
|
|
39
|
+
*/
|
|
40
|
+
columnResizing?: boolean;
|
|
30
41
|
}
|
|
31
42
|
declare function __VLS_template(): {
|
|
32
43
|
attrs: Partial<{}>;
|
|
@@ -80,6 +91,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
80
91
|
isLastSibling: boolean;
|
|
81
92
|
ancestorLastFlags: boolean[];
|
|
82
93
|
isIndeterminate: boolean;
|
|
94
|
+
columnsFrozen: boolean;
|
|
83
95
|
keyField: string;
|
|
84
96
|
selectionDisabled: boolean;
|
|
85
97
|
hoverable: boolean;
|
|
@@ -88,6 +100,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
88
100
|
expandable: boolean;
|
|
89
101
|
expanded: boolean;
|
|
90
102
|
treeLoading: boolean;
|
|
103
|
+
columnResizing: boolean;
|
|
91
104
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
92
105
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
93
106
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataTableRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e8f7eb8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|