@synopackageland/ui 0.25.15 → 0.25.16
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/CHANGELOG.md +12 -1
- package/dist/components/app/app-layout/pageTitle.d.ts +6 -0
- package/dist/components/app/app-layout/shellBack.d.ts +4 -4
- package/dist/grid.js +97 -97
- package/dist/i18n/text.d.ts +1 -1
- package/dist/index.js +6060 -6046
- package/dist/json-preview/preview.js +4818 -4789
- package/dist/lib/nativeShell.d.ts +37 -5
- package/dist/reka-runtime.json +1 -1
- package/docs/adaptive-layout.md +40 -10
- package/package.json +97 -1
package/dist/grid.js
CHANGED
|
@@ -118,7 +118,7 @@ const rt = "…", mn = new ct(1e3), gn = new ct(1e3), io = () => ({
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
k(p + rt, w + S), p = "", w = 0;
|
|
121
|
-
},
|
|
121
|
+
}, L = (M, E, N) => {
|
|
122
122
|
if (w + E <= a) {
|
|
123
123
|
P(M, E, N);
|
|
124
124
|
return;
|
|
@@ -149,11 +149,11 @@ const rt = "…", mn = new ct(1e3), gn = new ct(1e3), io = () => ({
|
|
|
149
149
|
k(p, w), p = "", w = 0, v = I;
|
|
150
150
|
}
|
|
151
151
|
const W = E[N];
|
|
152
|
-
W.length > 0 && (I += W.length,
|
|
152
|
+
W.length > 0 && (I += W.length, L(W, e.measureText(W).width, I - W.length));
|
|
153
153
|
}
|
|
154
154
|
continue;
|
|
155
155
|
}
|
|
156
|
-
I += M.length,
|
|
156
|
+
I += M.length, L(M, e.measureText(M).width, I - M.length);
|
|
157
157
|
}
|
|
158
158
|
C.length < s && p !== "" && k(p, w), gn.set(y, C);
|
|
159
159
|
}
|
|
@@ -365,7 +365,7 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
365
365
|
y: 1 / 0,
|
|
366
366
|
width: 0,
|
|
367
367
|
height: 0
|
|
368
|
-
}, { groupHeaderHeight: vi, columnHeadPadding: fn, columnResizeHandlerWidth: pn, rowHeadIconPaddingTop: Si, columnFreezeHandlerWidth: yi, fillHandlerSize: bi, fillHandlerPadding: xi } = B, Ri = (e) => Ii(e) ?? Wi(e) ?? Pi(e) ?? zi(e) ?? Mi(e) ?? Ai(e) ?? Ei(e) ?? Hi(e) ?? Ti(e) ?? Ni(e) ??
|
|
368
|
+
}, { groupHeaderHeight: vi, columnHeadPadding: fn, columnResizeHandlerWidth: pn, rowHeadIconPaddingTop: Si, columnFreezeHandlerWidth: yi, fillHandlerSize: bi, fillHandlerPadding: xi } = B, Ri = (e) => Ii(e) ?? Wi(e) ?? Pi(e) ?? zi(e) ?? Mi(e) ?? Ai(e) ?? Ei(e) ?? Hi(e) ?? Ti(e) ?? Ni(e) ?? Li(e) ?? Fi(e) ?? Di(e) ?? Bi(e) ?? Oi(e) ?? ne, ki = (e, t, n) => {
|
|
369
369
|
const o = pi(e.coordInstance, e.scrollState, t), i = Ci(e.coordInstance, e.scrollState, t, n), a = Ri({
|
|
370
370
|
...e,
|
|
371
371
|
position: o,
|
|
@@ -401,10 +401,10 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
401
401
|
if (!s || l !== -1 || u !== -1 || !o.some((v) => v.type === X.Checkbox)) return null;
|
|
402
402
|
const { iconSizeXS: h } = n, m = h / 2, { rowInitSize: g, columnInitSize: C } = a, p = co({ width: C, theme: n, rowControls: o, rowControlPaddingX: i }) - m, w = g / 2 - m;
|
|
403
403
|
return V(r, p, p + h) && V(c, w, w + h) ? { type: x.AllCheckbox, x: p, y: w, width: h, height: h } : null;
|
|
404
|
-
},
|
|
404
|
+
}, Li = (e) => {
|
|
405
405
|
const { rowIndex: t, columnIndex: n } = e.position;
|
|
406
406
|
return n >= -1 && t > -1 ? e.getLinearRow(t).type !== se.Append ? null : { ...ne, type: x.AppendRow } : null;
|
|
407
|
-
},
|
|
407
|
+
}, Fi = (e) => {
|
|
408
408
|
const { position: t, theme: n, rowControls: o, rowControlPaddingX: i, scrollState: a, coordInstance: s } = e, { x: r, y: c, rowIndex: l, columnIndex: u } = t;
|
|
409
409
|
if (l <= -1 || u !== -1) return null;
|
|
410
410
|
const h = e.getLinearRow(l);
|
|
@@ -427,7 +427,7 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
427
427
|
if (!r) return null;
|
|
428
428
|
const { isCellSelection: l, ranges: u } = n, { x: h, y: m, rowIndex: g, columnIndex: C } = t;
|
|
429
429
|
if (!l || g < 0 || C < 0) return null;
|
|
430
|
-
const [S, p] = u[0], [w, v] = u[1], y = Math.max(S, w), R = Math.max(p, v), I = c(R), k = o.getColumnRelativeOffset(y, i.scrollLeft) + o.getColumnWidth(y),
|
|
430
|
+
const [S, p] = u[0], [w, v] = u[1], y = Math.max(S, w), R = Math.max(p, v), I = c(R), k = o.getColumnRelativeOffset(y, i.scrollLeft) + o.getColumnWidth(y), L = S === w && p === v && a != null && s != null && a[0] === y && a[1] === R && s ? s.height : o.getRowHeight(I), M = o.getRowOffset(I) + L - i.scrollTop, E = bi / 2 + xi, N = k - E, W = M - E;
|
|
431
431
|
return V(h, N, N + E * 2) && V(m, W, W + E * 2) ? { type: x.FillHandler, x: N, y: W, width: E * 2, height: E * 2 } : null;
|
|
432
432
|
}, Bi = (e) => {
|
|
433
433
|
const { coordInstance: t, position: n, scrollState: o, getLinearRow: i } = e, { rowIndex: a, columnIndex: s } = n;
|
|
@@ -449,8 +449,8 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
449
449
|
const P = k - m - fn / 2, A = (C - m) / 2;
|
|
450
450
|
if (p && V(c, P, P + m) && V(l, A, A + m))
|
|
451
451
|
return { type: x.ColumnDescription, x: P, y: A, width: m, height: m };
|
|
452
|
-
const
|
|
453
|
-
return S && V(c,
|
|
452
|
+
const L = R + m / 2, M = (C - m) / 2;
|
|
453
|
+
return S && V(c, L, L + m) && V(l, M, M + m) ? { type: x.ColumnPrimaryIcon, x: L, y: M, width: m, height: m } : s && (h !== 0 && V(c, R, R + pn / 2) || V(c, I - pn / 2, I)) ? { ...ne, type: x.ColumnResizeHandler } : { type: x.ColumnHeader, x: R, y: 0, width: y, height: C };
|
|
454
454
|
}, {
|
|
455
455
|
fillHandlerSize: ot,
|
|
456
456
|
cellTextLineHeight: Cn,
|
|
@@ -477,31 +477,31 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
477
477
|
getLinearRow: e.getLinearRow ?? Wt,
|
|
478
478
|
real2RowIndex: e.real2RowIndex ?? oo
|
|
479
479
|
}), In = (e, t) => {
|
|
480
|
-
const { coordInstance: n, visibleRegion: o, activeCell: i, highlightedRowIndex: a, mouseState: s, scrollState: r, selection: c, isSelecting: l, theme: u, getLinearRow: h } = e, { freezeColumnCount: m, columnInitSize: g, totalWidth: C, rowCount: S } = n, { isRowSelection: p, isColumnSelection: w } = c, { scrollLeft: v, scrollTop: y } = r, { rowIndex: R, type: I, isOutOfBounds: k } = s, P = [], A = [],
|
|
481
|
-
if (!S) return { cellPropList: P, rowHeaderPropList: A, appendRowList:
|
|
480
|
+
const { coordInstance: n, visibleRegion: o, activeCell: i, highlightedRowIndex: a, mouseState: s, scrollState: r, selection: c, isSelecting: l, theme: u, getLinearRow: h } = e, { freezeColumnCount: m, columnInitSize: g, totalWidth: C, rowCount: S } = n, { isRowSelection: p, isColumnSelection: w } = c, { scrollLeft: v, scrollTop: y } = r, { rowIndex: R, type: I, isOutOfBounds: k } = s, P = [], A = [], L = [];
|
|
481
|
+
if (!S) return { cellPropList: P, rowHeaderPropList: A, appendRowList: L };
|
|
482
482
|
const M = t === "freeze", E = M ? 0 : Math.max(m, o.startColumnIndex), N = M ? Math.max(m - 1, 0) : o.stopColumnIndex, W = M && m === 0, { cellBg: K, cellBgHovered: G, cellBgSelected: ke } = u;
|
|
483
483
|
for (let z = E; z <= N; z++) {
|
|
484
|
-
const
|
|
484
|
+
const F = n.getColumnRelativeOffset(z, v), ge = n.getColumnWidth(z), Ye = w && c.includes([z, z]), ie = z === 0;
|
|
485
485
|
for (let re = o.startRowIndex; re <= o.stopRowIndex; re++) {
|
|
486
|
-
const Te = h(re), Ne = n.getRowHeight(re),
|
|
486
|
+
const Te = h(re), Ne = n.getRowHeight(re), Le = n.getRowOffset(re) - y;
|
|
487
487
|
if (Te.type === se.Group) continue;
|
|
488
488
|
if (Te.type === se.Append) {
|
|
489
|
-
ie &&
|
|
489
|
+
ie && L.push({ x: 0.5, y: Le + 0.5, width: C - v, height: Ne, isHover: I === x.AppendRow && R === re });
|
|
490
490
|
continue;
|
|
491
491
|
}
|
|
492
|
-
const { displayIndex: mt, realIndex: Ie } = Te,
|
|
492
|
+
const { displayIndex: mt, realIndex: Ie } = Te, Fe = !k && !l && ii.has(I) && re === R, { isCellActive: Pe, isRowActive: ve } = hi(i, Ie, z), { isRowSelected: ae, isCellSelected: gt } = mi(c, Ie, z), le = a === Ie;
|
|
493
493
|
let q;
|
|
494
|
-
gt || ae || Ye ? q = ke : (
|
|
494
|
+
gt || ae || Ye ? q = ke : (Fe || ve || le) && (q = G), ie && A.push({
|
|
495
495
|
x: 0.5,
|
|
496
|
-
y:
|
|
496
|
+
y: Le + 0.5,
|
|
497
497
|
width: g + 0.5,
|
|
498
498
|
height: Ne,
|
|
499
499
|
displayIndex: String(mt),
|
|
500
|
-
isHover:
|
|
500
|
+
isHover: Fe || ve || le,
|
|
501
501
|
isChecked: p && ae
|
|
502
502
|
}), !W && P.push({
|
|
503
|
-
x:
|
|
504
|
-
y:
|
|
503
|
+
x: F + 0.5,
|
|
504
|
+
y: Le + 0.5,
|
|
505
505
|
width: ge,
|
|
506
506
|
height: Ne,
|
|
507
507
|
rowIndex: Ie,
|
|
@@ -512,16 +512,16 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
return { cellPropList: P, rowHeaderPropList: A, appendRowList:
|
|
515
|
+
return { cellPropList: P, rowHeaderPropList: A, appendRowList: L };
|
|
516
516
|
}, Gi = (e, t, n) => {
|
|
517
517
|
const { x: o, y: i, width: a, height: s, displayIndex: r, isHover: c, isChecked: l } = t, { theme: u, rowControls: h, rowControlPaddingX: m, rowIndexVisible: g = !0, drawIcon: C } = n, { cellBg: S, cellBgHovered: p, cellBgSelected: w, cellLineColor: v, rowHeaderTextColor: y, iconSizeXS: R, staticWhite: I, iconBgSelected: k } = u;
|
|
518
518
|
D(e, { x: o, y: i, width: a, height: s, fill: l ? w : c ? p : S }), Ke(e, { x: o, y: i, points: [0, 0, a, 0], stroke: v }), Ke(e, { x: o, y: i, points: [0, s, a, s], stroke: v });
|
|
519
519
|
const A = R / 2;
|
|
520
520
|
if (e.font = `${u.fontSizeXXS}px ${u.fontFamily}`, (l || c || !g) && h.length > 0) {
|
|
521
|
-
for (let
|
|
522
|
-
const { type: M } = h[
|
|
521
|
+
for (let L = 0; L < h.length; L++) {
|
|
522
|
+
const { type: M } = h[L];
|
|
523
523
|
if (M === X.Spacer) continue;
|
|
524
|
-
const E = Gt(a, u, m, h.length,
|
|
524
|
+
const E = Gt(a, u, m, h.length, L);
|
|
525
525
|
if (M === X.Checkbox) {
|
|
526
526
|
Bt(e, {
|
|
527
527
|
x: o + E - A,
|
|
@@ -562,7 +562,7 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
562
562
|
}, $i = (e, t) => {
|
|
563
563
|
const { selection: n, mouseState: o, coordInstance: i, scrollState: a, theme: s, isFilling: r, isFillEnabled: c, real2RowIndex: l, getLinearRow: u } = t;
|
|
564
564
|
if (!r || !c || !n.isCellSelection) return;
|
|
565
|
-
const [h, m] = n.ranges, g = Math.min(h[0], m[0]), C = Math.max(h[0], m[0]), S = Math.min(h[1], m[1]), p = Math.max(h[1], m[1]), w = u(o.rowIndex).realIndex, { scrollLeft: v, scrollTop: y } = a, R = i.getColumnRelativeOffset(g, v), I = i.getColumnRelativeOffset(C, v) + i.getColumnWidth(C), k = (
|
|
565
|
+
const [h, m] = n.ranges, g = Math.min(h[0], m[0]), C = Math.max(h[0], m[0]), S = Math.min(h[1], m[1]), p = Math.max(h[1], m[1]), w = u(o.rowIndex).realIndex, { scrollLeft: v, scrollTop: y } = a, R = i.getColumnRelativeOffset(g, v), I = i.getColumnRelativeOffset(C, v) + i.getColumnWidth(C), k = (L) => i.getRowOffset(l(L)) + i.getRowHeight(l(L)) - y;
|
|
566
566
|
let P = null, A = null;
|
|
567
567
|
Number.isFinite(w) && w > p ? (P = i.getRowOffset(l(p + 1)) - y, A = k(w)) : Number.isFinite(w) && w < S && (P = i.getRowOffset(l(w)) - y, A = k(S - 1)), !(P == null || A == null) && (e.save(), e.globalAlpha = 0.12, D(e, { x: R + 0.5, y: P + 0.5, width: I - R, height: A - P, fill: s.interactionLineColorHighlight }), e.restore(), D(e, { x: R + 0.5, y: P + 0.5, width: I - R, height: A - P, stroke: s.interactionLineColorHighlight }));
|
|
568
568
|
}, qi = (e, t) => {
|
|
@@ -575,8 +575,8 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
575
575
|
}, Xi = (e, t, n) => {
|
|
576
576
|
const { x: o, y: i, width: a, height: s, fill: r, column: c, hasMenu: l } = t, { theme: u, drawIcon: h } = n, { name: m, description: g, hasMenu: C, isPrimary: S, hasIcon: p } = c, { cellLineColor: w, columnHeaderBg: v, iconFgCommon: y, columnHeaderNameColor: R, fontSizeSM: I, iconSizeXS: k } = u;
|
|
577
577
|
let P = a - te * 2, A = te;
|
|
578
|
-
const
|
|
579
|
-
if (D(e, { x: o + 0.5, y: i, width: a - 0.5, height: s, fill: r ?? v }), Ke(e, { x: o, y: i, points: [0, s, a, s, a, 0], stroke: w }), S && (P = P - k - te, h?.(e, { kind: "primary", x: o + A, y: M, size: k, theme: u, column: c }), A += k + te / 2), p && (P = P - k, h?.(e, { kind: "column", x: o + A, y: M, size: k, theme: u, column: c }), A += k + te / 2),
|
|
578
|
+
const L = l && C, M = i + (vn - k) / 2;
|
|
579
|
+
if (D(e, { x: o + 0.5, y: i, width: a - 0.5, height: s, fill: r ?? v }), Ke(e, { x: o, y: i, points: [0, s, a, s, a, 0], stroke: w }), S && (P = P - k - te, h?.(e, { kind: "primary", x: o + A, y: M, size: k, theme: u, column: c }), A += k + te / 2), p && (P = P - k, h?.(e, { kind: "column", x: o + A, y: M, size: k, theme: u, column: c }), A += k + te / 2), L) {
|
|
580
580
|
P = P - Me - te;
|
|
581
581
|
const E = i + vn / 2;
|
|
582
582
|
si(e, {
|
|
@@ -589,7 +589,7 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
589
589
|
fill: y
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
|
-
g && (h?.(e, { kind: "description", x:
|
|
592
|
+
g && (h?.(e, { kind: "description", x: L ? o + a - 2 * k - te : o + a - k - te, y: M, size: k, theme: u, column: c }), P = P - k - te), ai(e, {
|
|
593
593
|
x: o + A,
|
|
594
594
|
y: i + Nt,
|
|
595
595
|
text: m,
|
|
@@ -613,9 +613,9 @@ const lo = (e, t) => t ? Math.max(t - (e.iconSizeMD - e.iconSizeXS) / 2, 0) : 0,
|
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
615
|
}, Pn = (e, t, n) => {
|
|
616
|
-
const { visibleRegion: o, coordInstance: i, columns: a, theme: s, mouseState: r, scrollState: c, selection: l, isInteracting: u, isColumnHeaderMenuVisible: h } = t, { containerWidth: m, freezeRegionWidth: g, rowInitSize: C, columnInitSize: S, freezeColumnCount: p, pureRowCount: w } = i, { isColumnSelection: v, isRowSelection: y, ranges: R } = l, { type: I, columnIndex: k } = r, P = n === "freeze", A = P ? 0 : Math.max(p, o.startColumnIndex),
|
|
616
|
+
const { visibleRegion: o, coordInstance: i, columns: a, theme: s, mouseState: r, scrollState: c, selection: l, isInteracting: u, isColumnHeaderMenuVisible: h } = t, { containerWidth: m, freezeRegionWidth: g, rowInitSize: C, columnInitSize: S, freezeColumnCount: p, pureRowCount: w } = i, { isColumnSelection: v, isRowSelection: y, ranges: R } = l, { type: I, columnIndex: k } = r, P = n === "freeze", A = P ? 0 : Math.max(p, o.startColumnIndex), L = P ? Math.max(p - 1, 0) : o.stopColumnIndex;
|
|
617
617
|
e.save(), e.beginPath(), e.rect(P ? 0 : g + 1, 0, P ? g + 1 : m - g, C + 1), e.clip(), e.font = `normal ${s.fontSizeSM}px ${s.fontFamily}`;
|
|
618
|
-
for (let E = A; E <=
|
|
618
|
+
for (let E = A; E <= L; E++) {
|
|
619
619
|
const N = a[E];
|
|
620
620
|
if (N == null) continue;
|
|
621
621
|
const W = v && l.includes([E, E]), K = !u && (I === x.ColumnHeader || I === x.ColumnHeaderMenu) && k === E, G = W ? s.columnHeaderBgSelected : K ? s.columnHeaderBgHovered : void 0;
|
|
@@ -1095,7 +1095,7 @@ const Co = "data-ui-ignore-outside", Pt = /* @__PURE__ */ new WeakMap(), Tn = /*
|
|
|
1095
1095
|
function Nn(e) {
|
|
1096
1096
|
return [...e.options.elements()].filter((t) => !!t);
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Ln(e, t) {
|
|
1099
1099
|
return e.some((n) => n instanceof Node && t.some((o) => o === n || o.contains(n)));
|
|
1100
1100
|
}
|
|
1101
1101
|
function Ha(e) {
|
|
@@ -1113,7 +1113,7 @@ function Na(e, t = 400) {
|
|
|
1113
1113
|
};
|
|
1114
1114
|
return e.addEventListener("click", i, !0), e.addEventListener("pointerdown", o, !0), e.addEventListener("keydown", o, !0), n = e.setTimeout(o, t), o;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function La(e) {
|
|
1117
1117
|
const t = e.document, n = { layers: [], guard: fo(e), teardown: () => {
|
|
1118
1118
|
} }, o = (a) => {
|
|
1119
1119
|
if (Tn.has(a)) return;
|
|
@@ -1123,7 +1123,7 @@ function Fa(e) {
|
|
|
1123
1123
|
for (const r of [...n.layers].reverse()) {
|
|
1124
1124
|
if (r.disposed) continue;
|
|
1125
1125
|
const c = Nn(r);
|
|
1126
|
-
if (
|
|
1126
|
+
if (Ln(s, c) || Mn(s, c)) return;
|
|
1127
1127
|
if (r.options.onOutside?.(a) === "veto") {
|
|
1128
1128
|
a.preventDefault(), a.stopImmediatePropagation(), Na(e);
|
|
1129
1129
|
return;
|
|
@@ -1136,14 +1136,14 @@ function Fa(e) {
|
|
|
1136
1136
|
const r = a.composedPath(), c = Nn(s);
|
|
1137
1137
|
if (Mn(r, c)) return;
|
|
1138
1138
|
const l = r.find((u) => u instanceof Element && u.hasAttribute(Co));
|
|
1139
|
-
l && !
|
|
1139
|
+
l && !Ln([l], c) || s.options.onEscape(a) && (a.preventDefault(), a.stopPropagation());
|
|
1140
1140
|
};
|
|
1141
1141
|
return e.addEventListener("pointerdown", o, !0), e.addEventListener("keydown", i, !0), n.teardown = () => {
|
|
1142
1142
|
e.removeEventListener("pointerdown", o, !0), e.removeEventListener("keydown", i, !0), n.guard.dispose();
|
|
1143
1143
|
}, n;
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
const n = Pt.get(e) ??
|
|
1145
|
+
function Fa(e, t) {
|
|
1146
|
+
const n = Pt.get(e) ?? La(e);
|
|
1147
1147
|
Pt.set(e, n);
|
|
1148
1148
|
const o = { options: t, disposed: !1 };
|
|
1149
1149
|
return n.layers.push(o), {
|
|
@@ -1155,15 +1155,15 @@ function La(e, t) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function Fn(e) {
|
|
1159
1159
|
const t = to(e);
|
|
1160
1160
|
return Array.isArray(t) ? [...t] : [t];
|
|
1161
1161
|
}
|
|
1162
1162
|
function Da(e, t, n) {
|
|
1163
1163
|
const o = ue(() => to(t), (i, a, s) => {
|
|
1164
1164
|
if (!i || typeof window > "u") return;
|
|
1165
|
-
const r =
|
|
1166
|
-
elements: () =>
|
|
1165
|
+
const r = Fn(e).find(Boolean)?.ownerDocument?.defaultView ?? window, c = Fa(r, {
|
|
1166
|
+
elements: () => Fn(e),
|
|
1167
1167
|
onOutside: (l) => n.onOutside?.(l),
|
|
1168
1168
|
onEscape: (l) => n.onEscape?.(l)
|
|
1169
1169
|
});
|
|
@@ -2793,7 +2793,7 @@ const Ps = () => {
|
|
|
2793
2793
|
}, Ms = (e, t, n) => n > 0 ? Math.max(0, Math.floor((e - t) / n)) : 0, As = ["aria-labelledby", "aria-rowcount", "aria-colcount", "aria-readonly", "aria-busy", "data-ui-grid-skeleton"], Es = ["id"], Hs = { role: "rowgroup" }, Ts = {
|
|
2794
2794
|
role: "row",
|
|
2795
2795
|
"aria-rowindex": "1"
|
|
2796
|
-
}, Ns = ["id", "aria-colindex"],
|
|
2796
|
+
}, Ns = ["id", "aria-colindex"], Ls = { role: "rowgroup" }, Fs = ["aria-rowindex", "aria-hidden"], Ds = ["id"], Ws = ["aria-colindex", "aria-selected", "aria-readonly"], Bs = ["id"], Os = ["data-ui-grid-editing", "aria-labelledby", "aria-invalid", "aria-describedby", "readonly"], Vs = ["id"], Gs = {
|
|
2797
2797
|
key: 1,
|
|
2798
2798
|
role: "status",
|
|
2799
2799
|
class: "sr-only"
|
|
@@ -2837,7 +2837,7 @@ const Ps = () => {
|
|
|
2837
2837
|
setup(e, { expose: t, emit: n }) {
|
|
2838
2838
|
const o = e, i = n, a = oi(), s = jo(), r = xe(), c = xe(), l = xe(), u = xe(), h = xe(), m = ce({ rowHeight: B.rowHeight, headerHeight: B.columnHeadHeight }), g = ce({ ...uo, ...o.themeOverrides }), C = ce({ width: 0, height: 0 }), S = ce({ kind: "none", ranges: [], activeCell: null }), p = ce({ width: 0, height: 0 }), w = xe(!1), v = xe(!1), y = ce(0);
|
|
2839
2839
|
let R = Ue.danger;
|
|
2840
|
-
const I = ce(null), k = _(() => o.rowHeight ?? m.value.rowHeight), P = _(() => o.headerHeight ?? m.value.headerHeight), A = _(() => Ms(C.value.height, P.value, k.value)),
|
|
2840
|
+
const I = ce(null), k = _(() => o.rowHeight ?? m.value.rowHeight), P = _(() => o.headerHeight ?? m.value.headerHeight), A = _(() => Ms(C.value.height, P.value, k.value)), L = _(() => !o.loading && o.rowCount === 0), M = () => {
|
|
2841
2841
|
const d = o.loading && o.rowCount === 0;
|
|
2842
2842
|
return {
|
|
2843
2843
|
columns: o.columns,
|
|
@@ -2855,25 +2855,25 @@ const Ps = () => {
|
|
|
2855
2855
|
};
|
|
2856
2856
|
}, E = () => o.loading && o.rowCount === 0;
|
|
2857
2857
|
let N = 0, W, K = null, G = null;
|
|
2858
|
-
const ke = () => o.editing ||
|
|
2858
|
+
const ke = () => o.editing || F.active, z = new Is(M(), {
|
|
2859
2859
|
render: () => ge(),
|
|
2860
2860
|
selectionChange: (d) => {
|
|
2861
|
-
const f =
|
|
2862
|
-
|
|
2861
|
+
const f = F.state.value.cell;
|
|
2862
|
+
F.active && f && (d.activeCell?.[0] !== f[0] || d.activeCell?.[1] !== f[1]) && F.commit("selection"), S.value = d, !ke() && h.value && (h.value.value = ""), Fe(), i("selection-change", d);
|
|
2863
2863
|
},
|
|
2864
2864
|
scrollTo: (d, f) => {
|
|
2865
2865
|
const b = l.value;
|
|
2866
2866
|
b && (b.scrollLeft = d, b.scrollTop = f);
|
|
2867
2867
|
},
|
|
2868
2868
|
editRequest: (d, f, b, T) => {
|
|
2869
|
-
if ((b !== "tap" || f.editor !== "long-text") &&
|
|
2869
|
+
if ((b !== "tap" || f.editor !== "long-text") && F.open(d, f, b, "edit")) {
|
|
2870
2870
|
je = b === "tap";
|
|
2871
2871
|
return;
|
|
2872
2872
|
}
|
|
2873
2873
|
i("edit-request", { cell: d, column: f, trigger: b, replace: T });
|
|
2874
2874
|
},
|
|
2875
2875
|
viewRequest: (d, f, b) => {
|
|
2876
|
-
|
|
2876
|
+
F.open(d, f, b, "view") && (je = b === "tap");
|
|
2877
2877
|
},
|
|
2878
2878
|
clearRequest: (d) => {
|
|
2879
2879
|
De(), i("clear-request", d);
|
|
@@ -2894,7 +2894,7 @@ const Ps = () => {
|
|
|
2894
2894
|
visibleRangeChange: (d) => {
|
|
2895
2895
|
E() || i("visible-range-change", d);
|
|
2896
2896
|
}
|
|
2897
|
-
}),
|
|
2897
|
+
}), F = Ya({
|
|
2898
2898
|
owner: () => h.value,
|
|
2899
2899
|
root: () => r.value,
|
|
2900
2900
|
enabled: () => !!o.getEditText,
|
|
@@ -2912,12 +2912,12 @@ const Ps = () => {
|
|
|
2912
2912
|
i("edit-end", { cell: d, column: f, committed: b }), ge();
|
|
2913
2913
|
},
|
|
2914
2914
|
moveSelection: (d) => {
|
|
2915
|
-
const f =
|
|
2915
|
+
const f = F.state.value.cell ?? S.value.activeCell;
|
|
2916
2916
|
f && z.moveAfterEdit(f, d);
|
|
2917
2917
|
},
|
|
2918
2918
|
clearSelection: () => z.setSelection({ kind: "none", ranges: [] }),
|
|
2919
2919
|
refocus: () => {
|
|
2920
|
-
if (je && !
|
|
2920
|
+
if (je && !F.active) {
|
|
2921
2921
|
je = !1, h.value?.blur();
|
|
2922
2922
|
return;
|
|
2923
2923
|
}
|
|
@@ -2940,7 +2940,7 @@ const Ps = () => {
|
|
|
2940
2940
|
drawCell: mt,
|
|
2941
2941
|
drawIcon: o.drawIcon ? Ie : void 0
|
|
2942
2942
|
};
|
|
2943
|
-
ia(d, K, f, W), W = f, re(d), l.value && (l.value.style.cursor = z.cursor),
|
|
2943
|
+
ia(d, K, f, W), W = f, re(d), l.value && (l.value.style.cursor = z.cursor), Fe();
|
|
2944
2944
|
}
|
|
2945
2945
|
function ie() {
|
|
2946
2946
|
N && (cancelAnimationFrame(N), Ye());
|
|
@@ -2966,7 +2966,7 @@ const Ps = () => {
|
|
|
2966
2966
|
fill: f.theme.cellBgLoading
|
|
2967
2967
|
});
|
|
2968
2968
|
}
|
|
2969
|
-
function
|
|
2969
|
+
function Le(d, f, b) {
|
|
2970
2970
|
if (!b) return;
|
|
2971
2971
|
const { fontSizeSM: T, cellTextColor: U } = f.theme;
|
|
2972
2972
|
$e(d, {
|
|
@@ -2997,13 +2997,13 @@ const Ps = () => {
|
|
|
2997
2997
|
return;
|
|
2998
2998
|
}
|
|
2999
2999
|
const Z = o.cellRenderer?.(b, f.columnIndex);
|
|
3000
|
-
Z ? Z.draw(d, U) :
|
|
3000
|
+
Z ? Z.draw(d, U) : Le(d, U, o.getCellText(U.cell));
|
|
3001
3001
|
}
|
|
3002
3002
|
function Ie(d, f) {
|
|
3003
3003
|
const b = f.column ? o.columns.find((T) => T.id === f.column?.id) : void 0;
|
|
3004
3004
|
o.drawIcon?.(d, { kind: f.kind, x: f.x, y: f.y, size: f.size, theme: f.theme, column: b });
|
|
3005
3005
|
}
|
|
3006
|
-
function
|
|
3006
|
+
function Fe() {
|
|
3007
3007
|
const d = u.value;
|
|
3008
3008
|
if (!d) return;
|
|
3009
3009
|
const f = z.selection.activeCell, b = f ? z.getCellRect(f) : null;
|
|
@@ -3054,7 +3054,7 @@ const Ps = () => {
|
|
|
3054
3054
|
}
|
|
3055
3055
|
function zo(d) {
|
|
3056
3056
|
const f = q;
|
|
3057
|
-
!f || f.id !== d.pointerId || (Ze(), !(f.longPressed || f.flingStop) && (
|
|
3057
|
+
!f || f.id !== d.pointerId || (Ze(), !(f.longPressed || f.flingStop) && (F.active && !F.commit("pointer") || o.editing || (z.tap(ae(d)), ie(), le && clearTimeout(le), le = setTimeout(() => {
|
|
3058
3058
|
le = null, z.clearTapFeedback();
|
|
3059
3059
|
}, Xs))));
|
|
3060
3060
|
}
|
|
@@ -3064,7 +3064,7 @@ const Ps = () => {
|
|
|
3064
3064
|
return;
|
|
3065
3065
|
}
|
|
3066
3066
|
if (d.button !== 0 || gt(d)) return;
|
|
3067
|
-
if (
|
|
3067
|
+
if (F.active && !F.commit("pointer")) {
|
|
3068
3068
|
d.preventDefault();
|
|
3069
3069
|
return;
|
|
3070
3070
|
}
|
|
@@ -3118,13 +3118,13 @@ const Ps = () => {
|
|
|
3118
3118
|
}
|
|
3119
3119
|
G = r.value.getBoundingClientRect(), z.contextMenu(ae(d)) && (d.preventDefault(), Pe());
|
|
3120
3120
|
}
|
|
3121
|
-
function
|
|
3121
|
+
function Lo() {
|
|
3122
3122
|
const d = l.value;
|
|
3123
3123
|
d && (G = null, jt = Qe(), z.setScroll(d.scrollLeft, d.scrollTop));
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3126
|
-
if (
|
|
3127
|
-
|
|
3125
|
+
function Fo(d) {
|
|
3126
|
+
if (F.active) {
|
|
3127
|
+
F.keyDown(d, ve(d)) && d.stopPropagation();
|
|
3128
3128
|
return;
|
|
3129
3129
|
}
|
|
3130
3130
|
if (o.editing) return;
|
|
@@ -3158,7 +3158,7 @@ const Ps = () => {
|
|
|
3158
3158
|
!d || d.value || (d.value = " ", d.select(), fe && clearTimeout(fe), fe = setTimeout(Jt, 0));
|
|
3159
3159
|
}
|
|
3160
3160
|
function Jt() {
|
|
3161
|
-
fe && clearTimeout(fe), fe = null, h.value && !
|
|
3161
|
+
fe && clearTimeout(fe), fe = null, h.value && !F.active && (h.value.value = "");
|
|
3162
3162
|
}
|
|
3163
3163
|
function pt(d, f, b, T) {
|
|
3164
3164
|
T && (Je = qe(d, ft()), ge()), i("clipboard-copy", { block: f, cellCount: za(f), cut: b, ok: T }), T && b && !o.readonly && i("clear-request", d);
|
|
@@ -3180,7 +3180,7 @@ const Ps = () => {
|
|
|
3180
3180
|
);
|
|
3181
3181
|
}
|
|
3182
3182
|
function tn(d, f) {
|
|
3183
|
-
|
|
3183
|
+
F.active || o.editing || (Jt(), d.preventDefault(), en(f, d));
|
|
3184
3184
|
}
|
|
3185
3185
|
function nn(d) {
|
|
3186
3186
|
if (o.readonly) return null;
|
|
@@ -3191,7 +3191,7 @@ const Ps = () => {
|
|
|
3191
3191
|
return f ? (De(), i("paste-request", f), f) : null;
|
|
3192
3192
|
}
|
|
3193
3193
|
function Bo(d) {
|
|
3194
|
-
|
|
3194
|
+
F.active || fa({ isEditing: o.editing, eventTarget: d.target, hiddenFocusEl: h.value ?? null }) && (d.preventDefault(), S.value.kind !== "none" && nn(d.clipboardData?.getData("text/plain") ?? ""));
|
|
3195
3195
|
}
|
|
3196
3196
|
const Ct = /* @__PURE__ */ new Map();
|
|
3197
3197
|
let ze = null;
|
|
@@ -3205,10 +3205,10 @@ const Ps = () => {
|
|
|
3205
3205
|
Ct.set(d, f), ze && clearTimeout(ze), ze = setTimeout(on, Ys);
|
|
3206
3206
|
}
|
|
3207
3207
|
function Vo() {
|
|
3208
|
-
o.editing || (
|
|
3208
|
+
o.editing || (F.active || z.compositionStart(), F.active && F.compositionStart());
|
|
3209
3209
|
}
|
|
3210
3210
|
function Go() {
|
|
3211
|
-
|
|
3211
|
+
F.compositionEnd();
|
|
3212
3212
|
}
|
|
3213
3213
|
let wt = null, vt = null, St = null, We = null;
|
|
3214
3214
|
function an() {
|
|
@@ -3254,14 +3254,14 @@ const Ps = () => {
|
|
|
3254
3254
|
const Y = _(() => S.value.activeCell), Uo = _(() => Y.value ? o.columns[Y.value[0]] : void 0), Ko = _(() => {
|
|
3255
3255
|
const d = Y.value;
|
|
3256
3256
|
return d ? o.getRowLabel?.(d[1]) ?? String(d[1] + 1) : "";
|
|
3257
|
-
}), _o = _(() => Y.value && o.rowCount > 0 ? o.getCellText(Y.value) : ""), rn = (d) => `${s}-col-${d}`, $o = _(() => Y.value ? `${rn(Y.value[0])} ${s}-rowheader ${s}-cell` : `${s}-label`), ln = (d) => z.getCellRect(d), j = _(() =>
|
|
3257
|
+
}), _o = _(() => Y.value && o.rowCount > 0 ? o.getCellText(Y.value) : ""), rn = (d) => `${s}-col-${d}`, $o = _(() => Y.value ? `${rn(Y.value[0])} ${s}-rowheader ${s}-cell` : `${s}-label`), ln = (d) => z.getCellRect(d), j = _(() => F.state.value), cn = _(() => j.value.active && j.value.mode === "edit" && j.value.kind === "long-text" && !!o.editHint), et = _(() => ({
|
|
3258
3258
|
open: j.value.active,
|
|
3259
3259
|
kind: j.value.kind,
|
|
3260
3260
|
view: j.value.mode === "view",
|
|
3261
3261
|
invalid: !!j.value.error,
|
|
3262
3262
|
hint: cn.value,
|
|
3263
3263
|
rowHeight: k.value,
|
|
3264
|
-
lines:
|
|
3264
|
+
lines: F.lines.value,
|
|
3265
3265
|
theme: g.value,
|
|
3266
3266
|
dangerColor: R,
|
|
3267
3267
|
textBox: I.value
|
|
@@ -3281,9 +3281,9 @@ const Ps = () => {
|
|
|
3281
3281
|
y.value++, z.invalidate();
|
|
3282
3282
|
},
|
|
3283
3283
|
refreshTheme: ye,
|
|
3284
|
-
isEditing: () =>
|
|
3285
|
-
commitEdit: () => !
|
|
3286
|
-
cancelEdit: () =>
|
|
3284
|
+
isEditing: () => F.active,
|
|
3285
|
+
commitEdit: () => !F.active || F.commit("selection"),
|
|
3286
|
+
cancelEdit: () => F.cancel(),
|
|
3287
3287
|
copy: (d = !1) => en(d),
|
|
3288
3288
|
paste: (d) => nn(d)
|
|
3289
3289
|
}), (d, f) => (pe(), Ce("div", {
|
|
@@ -3317,7 +3317,7 @@ const Ps = () => {
|
|
|
3317
3317
|
"data-ui-grid-scroller": "",
|
|
3318
3318
|
"aria-hidden": "true",
|
|
3319
3319
|
style: { position: "absolute", inset: "0", overflow: "auto", "overscroll-behavior": "contain", "z-index": "1", "touch-action": "pan-x pan-y", "-webkit-overflow-scrolling": "touch", "-webkit-touch-callout": "none", "-webkit-user-select": "none", "user-select": "none", "-webkit-tap-highlight-color": "transparent" },
|
|
3320
|
-
onScrollPassive:
|
|
3320
|
+
onScrollPassive: Lo,
|
|
3321
3321
|
onPointerdown: Mo,
|
|
3322
3322
|
onPointermove: Ao,
|
|
3323
3323
|
onPointerup: Eo,
|
|
@@ -3342,7 +3342,7 @@ const Ps = () => {
|
|
|
3342
3342
|
}, we(b.name), 9, Ns))), 128))
|
|
3343
3343
|
])
|
|
3344
3344
|
]),
|
|
3345
|
-
ee("div",
|
|
3345
|
+
ee("div", Ls, [
|
|
3346
3346
|
ee("div", {
|
|
3347
3347
|
role: "row",
|
|
3348
3348
|
"aria-rowindex": Y.value ? Y.value[1] + 2 : 2,
|
|
@@ -3381,11 +3381,11 @@ const Ps = () => {
|
|
|
3381
3381
|
spellcheck: "false",
|
|
3382
3382
|
rows: "1",
|
|
3383
3383
|
style: Be(qo.value),
|
|
3384
|
-
onKeydown:
|
|
3384
|
+
onKeydown: Fo,
|
|
3385
3385
|
onCompositionstart: Vo,
|
|
3386
3386
|
onCompositionend: Go,
|
|
3387
|
-
onInput: f[0] || (f[0] = (b) => J(
|
|
3388
|
-
onBlur: f[1] || (f[1] = (b) => J(
|
|
3387
|
+
onInput: f[0] || (f[0] = (b) => J(F).input()),
|
|
3388
|
+
onBlur: f[1] || (f[1] = (b) => J(F).blur()),
|
|
3389
3389
|
onCopy: f[2] || (f[2] = (b) => tn(b, !1)),
|
|
3390
3390
|
onCut: f[3] || (f[3] = (b) => tn(b, !0))
|
|
3391
3391
|
}, null, 44, Os),
|
|
@@ -3402,9 +3402,9 @@ const Ps = () => {
|
|
|
3402
3402
|
style: Be({ ...J($a)(et.value), top: `${un.value + 4}px` })
|
|
3403
3403
|
}, we(tt.value), 13, Vs)) : Oe("", !0)
|
|
3404
3404
|
], 8, Ws)
|
|
3405
|
-
], 8,
|
|
3405
|
+
], 8, Fs)
|
|
3406
3406
|
]),
|
|
3407
|
-
|
|
3407
|
+
L.value ? (pe(), Ce("div", {
|
|
3408
3408
|
key: 0,
|
|
3409
3409
|
"data-ui-grid-empty": "",
|
|
3410
3410
|
style: Be([{ top: `${P.value}px` }, { position: "absolute", left: "0", right: "0", bottom: "0", display: "flex", "align-items": "center", "justify-content": "center", overflow: "hidden", color: "var(--ui-text-muted)", "font-size": "var(--ui-font-size)", "pointer-events": "none", "z-index": "1" }])
|
|
@@ -3566,7 +3566,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3566
3566
|
return s + a + r;
|
|
3567
3567
|
}
|
|
3568
3568
|
return t.type === "percent" ? `${$n(o * 100, i)}%` : $n(o, i);
|
|
3569
|
-
},
|
|
3569
|
+
}, Lr = (e, t) => {
|
|
3570
3570
|
if (e == null || e === "") return null;
|
|
3571
3571
|
const n = String(e), o = t?.type === "percent" || n.includes("%"), i = n.replace(/[^\d.+-]/g, "").replace(/([+\-.])+/g, "$1"), a = Number.parseFloat(i);
|
|
3572
3572
|
return Number.isNaN(a) ? null : o ? a / 100 : a;
|
|
@@ -3660,7 +3660,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3660
3660
|
const n = Math.min(st(e), Number(t));
|
|
3661
3661
|
return { type: "update", value: n === 0 || n === e.value ? null : n };
|
|
3662
3662
|
}
|
|
3663
|
-
}, He = (e, t, n) => `${e}|${t.width}|${t.metrics.rowHeight}|${n.join("\0")}`,
|
|
3663
|
+
}, He = (e, t, n) => `${e}|${t.width}|${t.metrics.rowHeight}|${n.join("\0")}`, Lt = new qt(), Ro = (e, t, n) => {
|
|
3664
3664
|
const { metrics: o, theme: i } = t;
|
|
3665
3665
|
if (!n.length) return [];
|
|
3666
3666
|
he(e, o.chipFontSize, i.fontFamily);
|
|
@@ -3679,10 +3679,10 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3679
3679
|
}, pr = {
|
|
3680
3680
|
draw: (e, t, n) => {
|
|
3681
3681
|
const o = { fill: t.cellTheme.badgeFill, color: t.cellTheme.text }, i = Ro(e, t, n.records.map((a) => ({ label: a.label, colors: o })));
|
|
3682
|
-
|
|
3682
|
+
Lt.set(He("link", t, n.records.map((a) => a.id)), i);
|
|
3683
3683
|
},
|
|
3684
3684
|
describe: (e) => dt(e.records.map((t) => t.label)),
|
|
3685
|
-
hitTest: (e, t) => ko(
|
|
3685
|
+
hitTest: (e, t) => ko(Lt.get(He("link", Xt(t), e.records.map((n) => n.id))), t, (n) => ({ type: "open-record", id: e.records[n].id }))
|
|
3686
3686
|
}, Xt = (e) => ({ width: e.size.width, metrics: e.metrics }), ko = (e, t, n, o = !1) => {
|
|
3687
3687
|
if (!t.wasActive && !o || !e) return null;
|
|
3688
3688
|
const i = e.findIndex((a) => Xe(t.point, a));
|
|
@@ -3717,7 +3717,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3717
3717
|
}, Qn = (e) => {
|
|
3718
3718
|
const t = /\.([\p{L}\p{N}]{1,5})$/u.exec(e);
|
|
3719
3719
|
return t ? t[1].toUpperCase() : "";
|
|
3720
|
-
},
|
|
3720
|
+
}, Ft = new qt(), vr = {
|
|
3721
3721
|
draw: (e, t, n) => {
|
|
3722
3722
|
const { metrics: o, cellTheme: i, theme: a } = t;
|
|
3723
3723
|
if (!n.files.length) return;
|
|
@@ -3729,10 +3729,10 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3729
3729
|
l.widths.forEach((g, C) => {
|
|
3730
3730
|
const S = n.files[C], p = S.thumbnailUrl ? t.images.get(S.thumbnailUrl) : void 0;
|
|
3731
3731
|
p ? (e.save(), D(e, { x: h, y: u, width: g, height: s, radius: 3 }), e.clip(), e.drawImage(p, h, u, g, s), e.restore(), D(e, { x: h + 0.5, y: u + 0.5, width: g - 1, height: s - 1, radius: 3, stroke: a.cellLineColor })) : (D(e, { x: h, y: u, width: g, height: s, radius: 3, fill: i.badgeFill }), he(e, r, a.fontFamily, "600"), e.fillStyle = i.badgeText, e.textAlign = "center", e.textBaseline = "middle", e.fillText(Qn(S.name) || "?", h + g / 2, u + s / 2 + 0.5, g - 4)), m.push({ x: h - t.x, y: u - t.y, width: g, height: s }), h += g + _e;
|
|
3732
|
-
}), l.more > 0 && $t(e, t, h, l.more, l.badgeWidth),
|
|
3732
|
+
}), l.more > 0 && $t(e, t, h, l.more, l.badgeWidth), Ft.set(He("attachment", t, n.files.map((g) => g.id)), m);
|
|
3733
3733
|
},
|
|
3734
3734
|
describe: (e) => dt(e.files.map((t) => t.name)),
|
|
3735
|
-
hitTest: (e, t) => ko(
|
|
3735
|
+
hitTest: (e, t) => ko(Ft.get(He("attachment", Xt(t), e.files.map((n) => n.id))), t, (n) => ({ type: "open-attachment", id: e.files[n].id }), !0)
|
|
3736
3736
|
}, Zn = (e) => `${Math.round(Math.max(0, Math.min(1, e)) * 100)}%`, Sr = {
|
|
3737
3737
|
draw: (e, t, n) => {
|
|
3738
3738
|
if (n.value == null) return;
|
|
@@ -3770,8 +3770,8 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3770
3770
|
progress: Sr,
|
|
3771
3771
|
button: yr,
|
|
3772
3772
|
derived: ur
|
|
3773
|
-
},
|
|
3774
|
-
|
|
3773
|
+
}, Fr = () => {
|
|
3774
|
+
Lt.clear(), Ft.clear(), Dt.clear();
|
|
3775
3775
|
}, xr = 6, Rr = (e, t, n, o) => {
|
|
3776
3776
|
if (e.save(), n === "pending") {
|
|
3777
3777
|
const i = xr / 2, a = t.x + t.width - 3 - i, s = t.y + 3 + i;
|
|
@@ -3830,7 +3830,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3830
3830
|
if (!k || I.kind !== "cells" || !eo(I.ranges[0], I.ranges[1])) return;
|
|
3831
3831
|
const P = y.currentTarget?.querySelector("[data-ui-grid]"), A = R.getCellRect(k);
|
|
3832
3832
|
if (!P || !A) return;
|
|
3833
|
-
const
|
|
3833
|
+
const L = P.getBoundingClientRect(), M = { x: y.clientX - L.left - A.x, y: y.clientY - L.top - A.y };
|
|
3834
3834
|
if (M.x < 0 || M.y < 0 || M.x >= A.width || M.y >= A.height) return;
|
|
3835
3835
|
const E = g(k, M, A, eo(v, k));
|
|
3836
3836
|
E && w(E.action, k);
|
|
@@ -3952,7 +3952,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
3952
3952
|
"Free now {now}, free after {after}": "Free now {now}, free after {after}",
|
|
3953
3953
|
Sections: "Sections",
|
|
3954
3954
|
"Back to the previous page": "Back",
|
|
3955
|
-
"
|
|
3955
|
+
"Launcher home": "Home",
|
|
3956
3956
|
"Page actions": "Page actions",
|
|
3957
3957
|
Slider: "Slider",
|
|
3958
3958
|
"Increase value": "Increase value",
|
|
@@ -4226,7 +4226,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
4226
4226
|
"Free now {now}, free after {after}": "目前可用 {now},清理後可用 {after}",
|
|
4227
4227
|
Sections: "區段",
|
|
4228
4228
|
"Back to the previous page": "返回",
|
|
4229
|
-
"
|
|
4229
|
+
"Launcher home": "主畫面",
|
|
4230
4230
|
"Page actions": "頁面動作",
|
|
4231
4231
|
Slider: "滑桿",
|
|
4232
4232
|
"Increase value": "增加數值",
|
|
@@ -4499,7 +4499,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
4499
4499
|
"Free now {now}, free after {after}": "当前可用 {now},清理后可用 {after}",
|
|
4500
4500
|
Sections: "区段",
|
|
4501
4501
|
"Back to the previous page": "返回",
|
|
4502
|
-
"
|
|
4502
|
+
"Launcher home": "主屏幕",
|
|
4503
4503
|
"Page actions": "页面操作",
|
|
4504
4504
|
Slider: "滑块",
|
|
4505
4505
|
"Increase value": "增加数值",
|
|
@@ -4772,7 +4772,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
4772
4772
|
"Free now {now}, free after {after}": "現在の空き {now}、解放後の空き {after}",
|
|
4773
4773
|
Sections: "セクション",
|
|
4774
4774
|
"Back to the previous page": "戻る",
|
|
4775
|
-
"
|
|
4775
|
+
"Launcher home": "ホーム",
|
|
4776
4776
|
"Page actions": "ページの操作",
|
|
4777
4777
|
Slider: "スライダー",
|
|
4778
4778
|
"Increase value": "値を増やす",
|
|
@@ -5045,7 +5045,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
5045
5045
|
"Free now {now}, free after {after}": "현재 여유 공간 {now}, 정리 후 여유 공간 {after}",
|
|
5046
5046
|
Sections: "섹션",
|
|
5047
5047
|
"Back to the previous page": "뒤로",
|
|
5048
|
-
"
|
|
5048
|
+
"Launcher home": "홈",
|
|
5049
5049
|
"Page actions": "페이지 작업",
|
|
5050
5050
|
Slider: "슬라이더",
|
|
5051
5051
|
"Increase value": "값 증가",
|
|
@@ -5318,7 +5318,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
5318
5318
|
"Free now {now}, free after {after}": "Jetzt frei {now}, danach frei {after}",
|
|
5319
5319
|
Sections: "Abschnitte",
|
|
5320
5320
|
"Back to the previous page": "Zurück",
|
|
5321
|
-
"
|
|
5321
|
+
"Launcher home": "Startseite",
|
|
5322
5322
|
"Page actions": "Seitenaktionen",
|
|
5323
5323
|
Slider: "Schieberegler",
|
|
5324
5324
|
"Increase value": "Wert erhöhen",
|
|
@@ -5591,7 +5591,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
5591
5591
|
"Free now {now}, free after {after}": "Libre maintenant {now}, libre ensuite {after}",
|
|
5592
5592
|
Sections: "Sections",
|
|
5593
5593
|
"Back to the previous page": "Retour",
|
|
5594
|
-
"
|
|
5594
|
+
"Launcher home": "Accueil",
|
|
5595
5595
|
"Page actions": "Actions de la page",
|
|
5596
5596
|
Slider: "Curseur",
|
|
5597
5597
|
"Increase value": "Augmenter la valeur",
|
|
@@ -5864,7 +5864,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
5864
5864
|
"Free now {now}, free after {after}": "Libre ahora {now}, libre después {after}",
|
|
5865
5865
|
Sections: "Secciones",
|
|
5866
5866
|
"Back to the previous page": "Atrás",
|
|
5867
|
-
"
|
|
5867
|
+
"Launcher home": "Inicio",
|
|
5868
5868
|
"Page actions": "Acciones de la página",
|
|
5869
5869
|
Slider: "Control deslizante",
|
|
5870
5870
|
"Increase value": "Aumentar valor",
|
|
@@ -6137,7 +6137,7 @@ const Xe = (e, t) => e.x >= t.x && e.x < t.x + t.width && e.y >= t.y && e.y < t.
|
|
|
6137
6137
|
"Free now {now}, free after {after}": "Libero ora {now}, libero dopo {after}",
|
|
6138
6138
|
Sections: "Sezioni",
|
|
6139
6139
|
"Back to the previous page": "Indietro",
|
|
6140
|
-
"
|
|
6140
|
+
"Launcher home": "Home",
|
|
6141
6141
|
"Page actions": "Azioni della pagina",
|
|
6142
6142
|
Slider: "Cursore",
|
|
6143
6143
|
"Increase value": "Aumenta valore",
|
|
@@ -6373,7 +6373,7 @@ export {
|
|
|
6373
6373
|
Ma as buildPasteProposal,
|
|
6374
6374
|
qe as cellRange,
|
|
6375
6375
|
Br as cellStatusMark,
|
|
6376
|
-
|
|
6376
|
+
Fr as clearGridCellRegions,
|
|
6377
6377
|
Wr as createCellStatusStore,
|
|
6378
6378
|
Za as createGridCellTheme,
|
|
6379
6379
|
kr as createGridCells,
|
|
@@ -6385,7 +6385,7 @@ export {
|
|
|
6385
6385
|
gs as filledRange,
|
|
6386
6386
|
ar as formatGridNumber,
|
|
6387
6387
|
Dn as gridCellMetrics,
|
|
6388
|
-
|
|
6388
|
+
Lr as parseGridNumber,
|
|
6389
6389
|
va as parseTsv,
|
|
6390
6390
|
ms as planFill,
|
|
6391
6391
|
So as readGridCellTheme,
|