vlite3 1.5.6 → 1.5.8
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/README.md +2 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +2 -2
- 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/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/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 +2 -2
- 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 +5 -6
- 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
|
@@ -35,6 +35,13 @@ export interface TableHeader {
|
|
|
35
35
|
width?: string;
|
|
36
36
|
minWidth?: string;
|
|
37
37
|
sortable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Per-column opt-out for column resizing.
|
|
40
|
+
* Only meaningful when the table sets `resizable`.
|
|
41
|
+
* `false` pins this column (action / utility / fixed-width columns).
|
|
42
|
+
* @default true (resizable when the table is)
|
|
43
|
+
*/
|
|
44
|
+
resizable?: boolean;
|
|
38
45
|
hideOnMobile?: boolean;
|
|
39
46
|
align?: 'left' | 'center' | 'right';
|
|
40
47
|
format?: (value: any, row?: any) => string;
|
|
@@ -96,6 +103,24 @@ export interface DataTableProps {
|
|
|
96
103
|
* Set to `false` to keep the always-table + horizontal-scroll layout.
|
|
97
104
|
*/
|
|
98
105
|
responsive?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Opt in to drag-to-resize column boundaries on the desktop table.
|
|
108
|
+
* Each header renders and owns the control on its logical trailing edge
|
|
109
|
+
* (right in LTR, left in RTL), so there is no boundary-to-column index mapping.
|
|
110
|
+
* Disabled by default — when `false` the table renders and behaves exactly
|
|
111
|
+
* as it does without the feature (no handles, no width persistence).
|
|
112
|
+
* Individual columns can opt out with `header.resizable: false`.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
resizable?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Stable key used to persist user column widths in local storage
|
|
118
|
+
* (`data-table:{persistenceKey}:column-widths`). Deliberately separate from
|
|
119
|
+
* `keyField`, which identifies rows.
|
|
120
|
+
*
|
|
121
|
+
* Omit it to keep resizing session-only — nothing is written to storage.
|
|
122
|
+
*/
|
|
123
|
+
persistenceKey?: string;
|
|
99
124
|
}
|
|
100
125
|
export interface SelectionState {
|
|
101
126
|
selected: any[];
|
|
@@ -116,6 +141,29 @@ export interface ExpandPayload {
|
|
|
116
141
|
children?: any[];
|
|
117
142
|
depth: number;
|
|
118
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Emitted by `@column-resize` when a column resize is committed
|
|
146
|
+
* (drag end, keyboard adjust, or double-click reset).
|
|
147
|
+
*/
|
|
148
|
+
export interface ColumnResizePayload {
|
|
149
|
+
/** `header.field` owning the dragged logical trailing-edge boundary. */
|
|
150
|
+
field: string;
|
|
151
|
+
/** Committed width in px, or `null` when the column was reset to its configured width. */
|
|
152
|
+
width: number | null;
|
|
153
|
+
/** Width in px before this interaction started. */
|
|
154
|
+
previousWidth: number | null;
|
|
155
|
+
/** How the change was made. */
|
|
156
|
+
source: 'pointer' | 'keyboard' | 'reset';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Persisted column-width payload (local storage).
|
|
160
|
+
* Versioned so the schema can change without breaking saved state.
|
|
161
|
+
*/
|
|
162
|
+
export interface ColumnWidthsState {
|
|
163
|
+
version: number;
|
|
164
|
+
/** Pixel widths keyed by stable `header.field` — never by column index. */
|
|
165
|
+
widths: Record<string, number>;
|
|
166
|
+
}
|
|
119
167
|
/** Flattened visible tree row metadata used internally by DataTable. */
|
|
120
168
|
export interface DataTableFlatRow {
|
|
121
169
|
row: any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ColumnResizePayload, TableHeader } from './types';
|
|
3
|
+
export { DEFAULT_MIN_COLUMN_WIDTH, MAX_COLUMN_WIDTH, COLUMN_WIDTHS_VERSION, SELECTION_COLUMN_WIDTH, sanitizeColumnWidths, } from './dataTableColumnWidths';
|
|
4
|
+
export interface UseDataTableColumnResizeOptions {
|
|
5
|
+
headers: Ref<TableHeader[]> | ComputedRef<TableHeader[]>;
|
|
6
|
+
enabled: Ref<boolean> | ComputedRef<boolean>;
|
|
7
|
+
/** Enables one measured, full-table-height boundary per resizable column. */
|
|
8
|
+
fullHeightBoundaries: Ref<boolean> | ComputedRef<boolean>;
|
|
9
|
+
persistenceKey: Ref<string | undefined> | ComputedRef<string | undefined>;
|
|
10
|
+
isRtl: Ref<boolean> | Readonly<Ref<boolean>>;
|
|
11
|
+
tableRef: Ref<HTMLTableElement | null>;
|
|
12
|
+
viewportRef: Ref<HTMLElement | null>;
|
|
13
|
+
hasSelectionColumn: Ref<boolean> | ComputedRef<boolean>;
|
|
14
|
+
measurementReady: Ref<boolean> | ComputedRef<boolean>;
|
|
15
|
+
onCommit?: (payload: ColumnResizePayload) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface DataTableColumnBoundary {
|
|
18
|
+
field: string;
|
|
19
|
+
/** Logical inline position of the owning column's rendered trailing edge. */
|
|
20
|
+
offset: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Conventional table-column resizing.
|
|
24
|
+
*
|
|
25
|
+
* A non-bordered table renders the separator inside the owning `<th>`. A
|
|
26
|
+
* cell-bordered table uses one measured full-height control at that same
|
|
27
|
+
* rendered trailing edge. Both paths pass `header.field` directly into this
|
|
28
|
+
* composable; no boundary index or neighbouring-column lookup is involved.
|
|
29
|
+
* A fixed final column may separately receive passive viewport slack so the
|
|
30
|
+
* table stays flush at its trailing edge.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useDataTableColumnResize({ headers, enabled, fullHeightBoundaries, persistenceKey, isRtl, tableRef, viewportRef, hasSelectionColumn, measurementReady, onCommit, }: UseDataTableColumnResizeOptions): {
|
|
33
|
+
isResizing: Ref<boolean, boolean>;
|
|
34
|
+
activeField: Ref<string, string>;
|
|
35
|
+
isApplyingWidths: ComputedRef<boolean>;
|
|
36
|
+
columnWidths: ComputedRef<Record<string, number>>;
|
|
37
|
+
tableWidth: ComputedRef<number>;
|
|
38
|
+
columnBoundaries: Ref<{
|
|
39
|
+
field: string;
|
|
40
|
+
offset: number;
|
|
41
|
+
}[], DataTableColumnBoundary[] | {
|
|
42
|
+
field: string;
|
|
43
|
+
offset: number;
|
|
44
|
+
}[]>;
|
|
45
|
+
boundaryLayerWidth: Ref<number, number>;
|
|
46
|
+
boundaryLayerHeight: Ref<number, number>;
|
|
47
|
+
minWidthFor: (header: TableHeader) => number;
|
|
48
|
+
resolveWidth: (header: TableHeader) => number | undefined;
|
|
49
|
+
startResize: (field: string, event: PointerEvent) => void;
|
|
50
|
+
adjustWidth: (field: string, physicalDirection: 1 | -1, large?: boolean) => void;
|
|
51
|
+
resetColumn: (field: string) => void;
|
|
52
|
+
};
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { ref as s, computed as p, onMounted as Je, watch as E, nextTick as Te, onUnmounted as Qe } from "vue";
|
|
2
|
+
import { useResizeObserver as Oe } from "@vueuse/core";
|
|
3
|
+
import { usePersistentState as Ze } from "../../utils/usePersistentState.js";
|
|
4
|
+
import { pruneUnusableWidths as Ae, sanitizeColumnWidths as et, computeColumnLayout as tt, COLUMN_WIDTHS_VERSION as De, clampWidth as Be, resolveColumnWidth as nt, minWidthFor as rt, MAX_COLUMN_WIDTH as ze } from "./dataTableColumnWidths.js";
|
|
5
|
+
import { DEFAULT_MIN_COLUMN_WIDTH as mt, SELECTION_COLUMN_WIDTH as ht } from "./dataTableColumnWidths.js";
|
|
6
|
+
const ot = 8, lt = 40, it = 250;
|
|
7
|
+
function ct({
|
|
8
|
+
headers: c,
|
|
9
|
+
enabled: d,
|
|
10
|
+
fullHeightBoundaries: ue,
|
|
11
|
+
persistenceKey: ae,
|
|
12
|
+
isRtl: H,
|
|
13
|
+
tableRef: h,
|
|
14
|
+
viewportRef: se,
|
|
15
|
+
hasSelectionColumn: de,
|
|
16
|
+
measurementReady: U,
|
|
17
|
+
onCommit: q
|
|
18
|
+
}) {
|
|
19
|
+
const y = s({}), w = s({}), u = s({}), b = s(!1), K = s(!1), R = s(!1), W = s(!1), $ = s(null), ce = s(null), j = s([]), G = s(0), Y = s(0), T = p(() => {
|
|
20
|
+
const e = /* @__PURE__ */ new Map();
|
|
21
|
+
for (const t of c.value) e.set(t.field, t);
|
|
22
|
+
return e;
|
|
23
|
+
}), O = (e) => !!e && d.value && e.resizable !== !1, S = (e) => rt(e, w.value[e.field]), A = (e) => nt(
|
|
24
|
+
e,
|
|
25
|
+
u.value,
|
|
26
|
+
y.value,
|
|
27
|
+
w.value[e.field]
|
|
28
|
+
), V = p(
|
|
29
|
+
() => d.value && b.value && !K.value
|
|
30
|
+
), D = p(() => {
|
|
31
|
+
const e = c.value[c.value.length - 1];
|
|
32
|
+
return e?.resizable === !1 ? e.field : null;
|
|
33
|
+
}), J = (e) => tt({
|
|
34
|
+
headers: c.value,
|
|
35
|
+
userWidths: e,
|
|
36
|
+
baseWidths: y.value,
|
|
37
|
+
minimumWidths: w.value,
|
|
38
|
+
hasSelectionColumn: de.value,
|
|
39
|
+
containerWidth: ce.value,
|
|
40
|
+
trailingFillField: D.value
|
|
41
|
+
}), Q = p(() => V.value ? J(u.value) : { widths: {}, totalWidth: null, complete: !1 }), ve = p(() => Q.value.widths), ke = p(
|
|
42
|
+
() => Q.value.complete ? Q.value.totalWidth : null
|
|
43
|
+
), Z = () => {
|
|
44
|
+
const e = h.value;
|
|
45
|
+
if (!e) return {};
|
|
46
|
+
const t = {};
|
|
47
|
+
return e.querySelectorAll("thead th[data-vlite-col]").forEach((r) => {
|
|
48
|
+
const o = r.dataset.vliteCol, l = r.getBoundingClientRect().width;
|
|
49
|
+
o && Number.isFinite(l) && l > 0 && (t[o] = Math.round(l));
|
|
50
|
+
}), t;
|
|
51
|
+
}, fe = () => {
|
|
52
|
+
const e = h.value;
|
|
53
|
+
if (!e || typeof window > "u") return {};
|
|
54
|
+
const t = {};
|
|
55
|
+
return e.querySelectorAll("thead th[data-vlite-col]").forEach((r) => {
|
|
56
|
+
const o = r.dataset.vliteCol, l = r.querySelector("[data-vlite-header-content]");
|
|
57
|
+
if (!o || !l) return;
|
|
58
|
+
const a = Array.from(l.children).filter(
|
|
59
|
+
(le) => le instanceof HTMLElement
|
|
60
|
+
), f = window.getComputedStyle(l), i = Number.parseFloat(f.columnGap) || 0, m = (Number.parseFloat(f.paddingInlineStart) || 0) + (Number.parseFloat(f.paddingInlineEnd) || 0), P = a.reduce((le, ie) => {
|
|
61
|
+
const Pe = window.getComputedStyle(ie), Ve = (Number.parseFloat(Pe.marginInlineStart) || 0) + (Number.parseFloat(Pe.marginInlineEnd) || 0);
|
|
62
|
+
return le + Math.max(ie.scrollWidth, ie.getBoundingClientRect().width) + Ve;
|
|
63
|
+
}, m + i * Math.max(0, a.length - 1)), Ne = window.getComputedStyle(r), Ye = (Number.parseFloat(Ne.paddingInlineStart) || 0) + (Number.parseFloat(Ne.paddingInlineEnd) || 0), oe = Math.ceil(P + Ye);
|
|
64
|
+
Number.isFinite(oe) && oe > 0 && (t[o] = oe);
|
|
65
|
+
}), t;
|
|
66
|
+
}, me = () => {
|
|
67
|
+
const e = fe();
|
|
68
|
+
Object.keys(e).length && (w.value = { ...w.value, ...e });
|
|
69
|
+
};
|
|
70
|
+
let M = null;
|
|
71
|
+
const I = /* @__PURE__ */ new Set(), he = (e) => {
|
|
72
|
+
if (!M) return;
|
|
73
|
+
const t = new Set(e);
|
|
74
|
+
for (const r of I)
|
|
75
|
+
t.has(r) || (M.unobserve(r), I.delete(r));
|
|
76
|
+
for (const r of t)
|
|
77
|
+
I.has(r) || (M.observe(r), I.add(r));
|
|
78
|
+
}, _e = () => {
|
|
79
|
+
if (!d.value || !ue.value) {
|
|
80
|
+
he([]), j.value = [], G.value = 0, Y.value = 0;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (W.value) return;
|
|
84
|
+
const e = h.value;
|
|
85
|
+
if (!e) return;
|
|
86
|
+
const t = e.getBoundingClientRect();
|
|
87
|
+
if (t.width <= 0 || t.height <= 0) return;
|
|
88
|
+
const r = Array.from(
|
|
89
|
+
e.querySelectorAll("thead th[data-vlite-col]")
|
|
90
|
+
);
|
|
91
|
+
he(r);
|
|
92
|
+
const o = [];
|
|
93
|
+
r.forEach((l) => {
|
|
94
|
+
const a = l.dataset.vliteCol, f = a ? T.value.get(a) : void 0;
|
|
95
|
+
if (!a || !O(f)) return;
|
|
96
|
+
const i = l.getBoundingClientRect();
|
|
97
|
+
if (i.width <= 0 || i.height <= 0) return;
|
|
98
|
+
const m = H.value ? t.right - i.left : i.right - t.left;
|
|
99
|
+
Number.isFinite(m) && o.push({ field: a, offset: m });
|
|
100
|
+
}), j.value = o, G.value = t.width, Y.value = t.height;
|
|
101
|
+
};
|
|
102
|
+
let C = null;
|
|
103
|
+
const v = () => {
|
|
104
|
+
typeof window > "u" || C != null || (C = window.requestAnimationFrame(() => {
|
|
105
|
+
C = null, _e();
|
|
106
|
+
}));
|
|
107
|
+
}, xe = () => {
|
|
108
|
+
C == null || typeof window > "u" || (window.cancelAnimationFrame(C), C = null);
|
|
109
|
+
}, ee = () => {
|
|
110
|
+
if (me(), b.value) return !0;
|
|
111
|
+
const e = Z();
|
|
112
|
+
return Object.keys(e).length ? (y.value = { ...y.value, ...e }, b.value = !0, !0) : !1;
|
|
113
|
+
}, Xe = async () => {
|
|
114
|
+
if (!d.value || !b.value || W.value) return;
|
|
115
|
+
if (!c.value.some((o) => y.value[o.field] == null)) {
|
|
116
|
+
me();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
K.value = !0, await Te();
|
|
120
|
+
const t = Z(), r = fe();
|
|
121
|
+
K.value = !1, y.value = { ...y.value, ...t }, w.value = { ...w.value, ...r };
|
|
122
|
+
}, B = p(
|
|
123
|
+
() => ae.value ? `data-table:${ae.value}:column-widths` : null
|
|
124
|
+
), pe = p(() => !!B.value), te = Ze(
|
|
125
|
+
() => B.value ?? "data-table:@session:column-widths",
|
|
126
|
+
{ version: De, widths: {} },
|
|
127
|
+
{ writeDefaults: !1, onError: () => {
|
|
128
|
+
} }
|
|
129
|
+
), ne = () => {
|
|
130
|
+
pe.value && (te.value = {
|
|
131
|
+
version: De,
|
|
132
|
+
widths: Ae(u.value, c.value)
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
let ye = "", we = "", z = !1;
|
|
136
|
+
const He = () => {
|
|
137
|
+
z || typeof document > "u" || (ye = document.body.style.cursor, we = document.body.style.userSelect, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", z = !0);
|
|
138
|
+
}, Ue = () => {
|
|
139
|
+
!z || typeof document > "u" || (document.body.style.cursor = ye, document.body.style.userSelect = we, z = !1);
|
|
140
|
+
}, ge = () => H.value ? -1 : 1, be = (e, t) => {
|
|
141
|
+
u.value = { ...u.value, [e]: Math.round(t) };
|
|
142
|
+
}, k = (e) => {
|
|
143
|
+
const t = h.value;
|
|
144
|
+
if (!t) return null;
|
|
145
|
+
for (const r of t.querySelectorAll("col[data-vlite-col]"))
|
|
146
|
+
if (r.dataset.vliteCol === e) return r;
|
|
147
|
+
return null;
|
|
148
|
+
};
|
|
149
|
+
let n = null, F = null;
|
|
150
|
+
const We = (e) => Be(
|
|
151
|
+
e.startWidth + (e.lastX - e.startX) * ge(),
|
|
152
|
+
e.min,
|
|
153
|
+
ze
|
|
154
|
+
), qe = () => {
|
|
155
|
+
F != null && (cancelAnimationFrame(F), F = null);
|
|
156
|
+
}, Ke = () => {
|
|
157
|
+
if (!n) return;
|
|
158
|
+
const e = Math.round(We(n)), t = J({ ...u.value, [n.field]: e });
|
|
159
|
+
n.col || (n.col = k(n.field)), n.col && (n.col.style.width = `${t.widths[n.field] ?? e}px`);
|
|
160
|
+
const r = D.value;
|
|
161
|
+
if (r) {
|
|
162
|
+
n.trailingFillCol || (n.trailingFillCol = k(r));
|
|
163
|
+
const l = t.widths[r];
|
|
164
|
+
n.trailingFillCol && l != null && (n.trailingFillCol.style.width = `${l}px`);
|
|
165
|
+
}
|
|
166
|
+
h.value && t.totalWidth != null && (h.value.style.width = `${t.totalWidth}px`, n.boundaryLayer && (n.boundaryLayer.style.inlineSize = `${t.totalWidth}px`));
|
|
167
|
+
const o = t.widths[n.field] ?? e;
|
|
168
|
+
n.boundary && n.boundaryStart != null && (n.boundary.style.insetInlineStart = `${n.boundaryStart + o - n.startWidth}px`);
|
|
169
|
+
}, Ce = (e) => {
|
|
170
|
+
!n || e.pointerId !== n.pointerId || (e.cancelable && e.preventDefault(), n.lastX = e.clientX, e.clientX !== n.startX && (n.moved = !0), F == null && (F = requestAnimationFrame(() => {
|
|
171
|
+
F = null, Ke();
|
|
172
|
+
})));
|
|
173
|
+
}, Re = () => {
|
|
174
|
+
typeof window > "u" || (n?.handle?.removeEventListener("lostpointercapture", Ee), n?.handle?.hasPointerCapture(n.pointerId) && n.handle.releasePointerCapture(n.pointerId), window.removeEventListener("pointermove", Ce), window.removeEventListener("pointerup", Fe), window.removeEventListener("pointercancel", Le), window.removeEventListener("keydown", Se, !0), window.removeEventListener("blur", Me));
|
|
175
|
+
}, g = (e) => {
|
|
176
|
+
const t = n;
|
|
177
|
+
if (qe(), Re(), Ue(), n = null, W.value = !1, $.value = null, !t) return;
|
|
178
|
+
if (t.col?.style.removeProperty("width"), t.trailingFillCol?.style.removeProperty("width"), t.boundary?.style.removeProperty("inset-inline-start"), t.boundaryLayer?.style.removeProperty("inline-size"), h.value?.style.removeProperty("width"), !t.moved || !e) {
|
|
179
|
+
v();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const r = Math.round(We(t));
|
|
183
|
+
if (r === t.startWidth) {
|
|
184
|
+
v();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
be(t.field, r), ne(), q?.({
|
|
188
|
+
field: t.field,
|
|
189
|
+
width: r,
|
|
190
|
+
previousWidth: t.startWidth,
|
|
191
|
+
source: "pointer"
|
|
192
|
+
}), v();
|
|
193
|
+
};
|
|
194
|
+
function Fe(e) {
|
|
195
|
+
!n || e.pointerId !== n.pointerId || g(!0);
|
|
196
|
+
}
|
|
197
|
+
function Le(e) {
|
|
198
|
+
!n || e.pointerId !== n.pointerId || g(!1);
|
|
199
|
+
}
|
|
200
|
+
function Ee(e) {
|
|
201
|
+
!n || e.pointerId !== n.pointerId || g(!1);
|
|
202
|
+
}
|
|
203
|
+
function Se(e) {
|
|
204
|
+
e.key === "Escape" && (e.preventDefault(), g(!1));
|
|
205
|
+
}
|
|
206
|
+
function Me() {
|
|
207
|
+
g(!1);
|
|
208
|
+
}
|
|
209
|
+
const $e = (e, t) => {
|
|
210
|
+
const r = T.value.get(e);
|
|
211
|
+
if (!O(r) || n || t.button !== 0 || !ee()) return;
|
|
212
|
+
t.preventDefault(), t.stopPropagation(), X();
|
|
213
|
+
const o = J(u.value), l = Z()[e], a = Math.round(
|
|
214
|
+
o.widths[e] ?? l ?? A(r) ?? S(r)
|
|
215
|
+
), f = t.currentTarget, i = f instanceof HTMLElement ? f : null, m = i?.dataset.vliteResizeBoundary === e ? i : null, P = m ? Number.parseFloat(m.style.insetInlineStart) : null;
|
|
216
|
+
n = {
|
|
217
|
+
field: e,
|
|
218
|
+
pointerId: t.pointerId,
|
|
219
|
+
startX: t.clientX,
|
|
220
|
+
lastX: t.clientX,
|
|
221
|
+
startWidth: a,
|
|
222
|
+
min: S(r),
|
|
223
|
+
moved: !1,
|
|
224
|
+
handle: i,
|
|
225
|
+
col: k(e),
|
|
226
|
+
trailingFillCol: D.value ? k(D.value) : null,
|
|
227
|
+
boundary: m,
|
|
228
|
+
boundaryLayer: m?.parentElement ?? null,
|
|
229
|
+
boundaryStart: P != null && Number.isFinite(P) ? P : null
|
|
230
|
+
}, W.value = !0, $.value = e, He(), i?.setPointerCapture(t.pointerId), i?.addEventListener("lostpointercapture", Ee), !(typeof window > "u") && (window.addEventListener("pointermove", Ce, { passive: !1 }), window.addEventListener("pointerup", Fe), window.addEventListener("pointercancel", Le), window.addEventListener("keydown", Se, !0), window.addEventListener("blur", Me));
|
|
231
|
+
};
|
|
232
|
+
let L = null, _ = null, N = null, re = null;
|
|
233
|
+
const x = () => {
|
|
234
|
+
L && clearTimeout(L), L = null, _ = null, N = null, re = null;
|
|
235
|
+
}, X = () => {
|
|
236
|
+
const e = _;
|
|
237
|
+
x(), e?.();
|
|
238
|
+
}, je = (e, t, r = !1) => {
|
|
239
|
+
const o = T.value.get(e);
|
|
240
|
+
if (!O(o) || (_ && N !== e && X(), !ee())) return;
|
|
241
|
+
const l = Math.round(A(o) ?? S(o)), a = N === e ? re : l, i = Be(
|
|
242
|
+
l + (r ? lt : ot) * t * ge(),
|
|
243
|
+
S(o),
|
|
244
|
+
ze
|
|
245
|
+
);
|
|
246
|
+
i !== l && (be(e, i), L && clearTimeout(L), N = e, re = a, _ = () => {
|
|
247
|
+
ne(), q?.({ field: e, width: i, previousWidth: a, source: "keyboard" });
|
|
248
|
+
}, L = setTimeout(X, it));
|
|
249
|
+
}, Ge = (e) => {
|
|
250
|
+
const t = T.value.get(e);
|
|
251
|
+
if (!O(t) || u.value[e] == null) return;
|
|
252
|
+
N === e ? x() : X();
|
|
253
|
+
const r = A(t) ?? u.value[e], o = { ...u.value };
|
|
254
|
+
delete o[e], u.value = o, ne(), q?.({ field: e, width: null, previousWidth: r, source: "reset" });
|
|
255
|
+
}, Ie = () => {
|
|
256
|
+
const e = se.value?.clientWidth;
|
|
257
|
+
e != null && Number.isFinite(e) && e > 0 && (ce.value = e), v();
|
|
258
|
+
};
|
|
259
|
+
return Oe(se, Ie), Oe(h, v), Je(() => {
|
|
260
|
+
R.value = !0, typeof ResizeObserver < "u" && (M = new ResizeObserver(v)), Ie(), v();
|
|
261
|
+
}), E(
|
|
262
|
+
[B, d, te],
|
|
263
|
+
() => {
|
|
264
|
+
!d.value || W.value || !pe.value || (u.value = Ae(
|
|
265
|
+
et(te.value),
|
|
266
|
+
c.value
|
|
267
|
+
));
|
|
268
|
+
},
|
|
269
|
+
{ immediate: !0, deep: !0 }
|
|
270
|
+
), E(B, (e, t) => {
|
|
271
|
+
e !== t && (x(), e || (u.value = {}));
|
|
272
|
+
}), E(
|
|
273
|
+
[
|
|
274
|
+
d,
|
|
275
|
+
U,
|
|
276
|
+
R,
|
|
277
|
+
() => Object.keys(u.value).length > 0,
|
|
278
|
+
() => c.value.length
|
|
279
|
+
],
|
|
280
|
+
async () => {
|
|
281
|
+
!d.value || !U.value || !R.value || b.value || !Object.keys(u.value).length || (await Te(), ee());
|
|
282
|
+
},
|
|
283
|
+
{ immediate: !0 }
|
|
284
|
+
), E(
|
|
285
|
+
() => c.value.map((e) => e.field).join("\0"),
|
|
286
|
+
() => {
|
|
287
|
+
d.value && b.value && Xe(), v();
|
|
288
|
+
}
|
|
289
|
+
), E(
|
|
290
|
+
[
|
|
291
|
+
d,
|
|
292
|
+
ue,
|
|
293
|
+
H,
|
|
294
|
+
V,
|
|
295
|
+
ve,
|
|
296
|
+
U,
|
|
297
|
+
de
|
|
298
|
+
],
|
|
299
|
+
v,
|
|
300
|
+
{ deep: !0, flush: "post" }
|
|
301
|
+
), E(d, (e) => {
|
|
302
|
+
!e && n && g(!1);
|
|
303
|
+
}), Qe(() => {
|
|
304
|
+
x(), g(!1), xe(), M?.disconnect(), I.clear();
|
|
305
|
+
}), {
|
|
306
|
+
isResizing: W,
|
|
307
|
+
activeField: $,
|
|
308
|
+
isApplyingWidths: V,
|
|
309
|
+
columnWidths: ve,
|
|
310
|
+
tableWidth: ke,
|
|
311
|
+
columnBoundaries: j,
|
|
312
|
+
boundaryLayerWidth: G,
|
|
313
|
+
boundaryLayerHeight: Y,
|
|
314
|
+
minWidthFor: S,
|
|
315
|
+
resolveWidth: A,
|
|
316
|
+
startResize: $e,
|
|
317
|
+
adjustWidth: je,
|
|
318
|
+
resetColumn: Ge
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
export {
|
|
322
|
+
De as COLUMN_WIDTHS_VERSION,
|
|
323
|
+
mt as DEFAULT_MIN_COLUMN_WIDTH,
|
|
324
|
+
ze as MAX_COLUMN_WIDTH,
|
|
325
|
+
ht as SELECTION_COLUMN_WIDTH,
|
|
326
|
+
et as sanitizeColumnWidths,
|
|
327
|
+
ct as useDataTableColumnResize
|
|
328
|
+
};
|
|
@@ -151,10 +151,10 @@ declare const __VLS_component: import('vue').DefineComponent<PanZoomViewportProp
|
|
|
151
151
|
disabled: boolean;
|
|
152
152
|
modelValue: PanZoomViewportTransform;
|
|
153
153
|
contentClass: string;
|
|
154
|
+
keyboard: boolean;
|
|
154
155
|
zoomStep: number;
|
|
155
156
|
minScale: number;
|
|
156
157
|
maxScale: number;
|
|
157
|
-
keyboard: boolean;
|
|
158
158
|
wheelZoomSpeed: number;
|
|
159
159
|
keyboardPanStep: number;
|
|
160
160
|
fitPadding: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./RichTextToolbar.
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./RichTextLinkPopover.
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue2.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue2.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -10,6 +10,11 @@ interface Props {
|
|
|
10
10
|
hideIcon?: boolean | null;
|
|
11
11
|
/** Override chip size */
|
|
12
12
|
size?: ChipProps['size'];
|
|
13
|
+
/**
|
|
14
|
+
* Surface style passed to Chip.
|
|
15
|
+
* `transparent` keeps the resolved semantic text/icon color with no background or border.
|
|
16
|
+
*/
|
|
17
|
+
appearance?: ChipProps['appearance'];
|
|
13
18
|
/** Extra classes */
|
|
14
19
|
class?: string;
|
|
15
20
|
}
|
|
@@ -17,5 +22,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
17
22
|
class: string;
|
|
18
23
|
size: ChipProps["size"];
|
|
19
24
|
hideIcon: boolean | null;
|
|
25
|
+
appearance: ChipProps["appearance"];
|
|
20
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
27
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as t, openBlock as u, createBlock as p, unref as f, normalizeClass as m } from "vue";
|
|
2
2
|
import d from "../Chip/Chip.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { resolveStatus as v } from "./status-map.js";
|
|
5
5
|
import { $t as b } from "../../utils/i18n.js";
|
|
6
6
|
import { useVLiteConfig as h } from "../../core/config.js";
|
|
7
7
|
import "../../icons/IconRegistry.js";
|
|
8
|
-
const k = /* @__PURE__ */
|
|
8
|
+
const k = /* @__PURE__ */ c({
|
|
9
9
|
__name: "StatusChip",
|
|
10
10
|
props: {
|
|
11
11
|
status: {},
|
|
@@ -13,17 +13,19 @@ const k = /* @__PURE__ */ u({
|
|
|
13
13
|
labelI18n: {},
|
|
14
14
|
hideIcon: { type: [Boolean, null], default: null },
|
|
15
15
|
size: { default: "small" },
|
|
16
|
+
appearance: { default: "filled" },
|
|
16
17
|
class: { default: "" }
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
20
|
-
return (
|
|
21
|
-
text:
|
|
22
|
-
variant:
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
setup(l) {
|
|
20
|
+
const e = l, s = h(), n = t(() => s?.components?.statusChip), r = t(() => e.hideIcon !== null ? e.hideIcon : n.value?.hideIcon ?? !1), a = t(() => v(e.status, n.value?.customStatuses)), i = t(() => e.labelI18n ? b(e.labelI18n) : a.value.label ? a.value.label : e.label ? e.label : e.status.replace(/[_\-]+/g, " ").replace(/\b\w/g, (o) => o.toUpperCase()));
|
|
21
|
+
return (o, I) => (u(), p(f(d), {
|
|
22
|
+
text: i.value,
|
|
23
|
+
variant: a.value.variant,
|
|
24
|
+
appearance: l.appearance,
|
|
25
|
+
icon: r.value ? void 0 : a.value.icon,
|
|
26
|
+
size: l.size,
|
|
25
27
|
class: m(["status-chip", "scrollbar-hide", e.class].filter(Boolean).join(" "))
|
|
26
|
-
}, null, 8, ["text", "variant", "icon", "size", "class"]));
|
|
28
|
+
}, null, 8, ["text", "variant", "appearance", "icon", "size", "class"]));
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
31
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tabes.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e5574264"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|