@affino/datagrid-vue-app 0.1.57 → 0.1.59
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/DataGrid.d.ts +7 -3
- package/dist/chunks/{DataGridGanttStageEntry-CXAJI829.js → DataGridGanttStageEntry-pxdH3jzW.js} +555 -537
- package/dist/chunks/useDataGridAppRowModel-CsSB4MQp.js +5217 -0
- package/dist/config/dataGridFilterNormalization.d.ts +19 -0
- package/dist/config/dataGridFormulaOptions.d.ts +4 -1
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +10 -0
- package/dist/host/DataGridRuntimeHost.d.ts +23 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +802 -698
- package/dist/internal.js +2 -2
- package/dist/overlays/dataGridColumnMenu.d.ts +25 -0
- package/package.json +5 -5
- package/dist/chunks/useDataGridAppRowModel-BNf-auAJ.js +0 -5083
package/dist/chunks/{DataGridGanttStageEntry-CXAJI829.js → DataGridGanttStageEntry-pxdH3jzW.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as At, computed as o, resolveComponent as oi, openBlock as S, createBlock as Se, unref as m, withCtx as be, createVNode as Ye, createElementVNode as N, toDisplayString as de, normalizeStyle as ae, createElementBlock as D, Fragment as fe, renderList as ke, ref as Z, inject as
|
|
1
|
+
import { defineComponent as At, computed as o, resolveComponent as oi, openBlock as S, createBlock as Se, unref as m, withCtx as be, createVNode as Ye, createElementVNode as N, toDisplayString as de, normalizeStyle as ae, createElementBlock as D, Fragment as fe, renderList as ke, ref as Z, inject as En, watch as Ge, renderSlot as kr, createTextVNode as In, createCommentVNode as te, withModifiers as H, normalizeClass as ce, withDirectives as di, vModelText as ui, toRef as Ft, provide as si, toRefs as ci, onMounted as Fa, shallowRef as Ia, nextTick as Vr, onScopeDispose as gi, onBeforeUnmount as Dn, mergeProps as vi, h as mi } from "vue";
|
|
2
2
|
import { UiSubMenu as An, UiSubMenuTrigger as Tn, UiSubMenuContent as Bn, UiMenuItem as ar, UiMenu as pi, UiMenuTrigger as hi, UiMenuContent as fi, UiMenuLabel as bi, UiMenuSeparator as qr } from "@affino/menu-vue";
|
|
3
3
|
import { d as yi, r as wi } from "./dataGridOverlayThemeVars-vzY74EIz.js";
|
|
4
4
|
import { _ as xi } from "./DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-xry4J3Lx.js";
|
|
5
5
|
import { resolveDataGridCellInteraction as Vn, getDataGridRowRenderMeta as Ci, buildDataGridCellRenderModel as Si, invokeDataGridCellInteraction as ki } from "@affino/datagrid-vue";
|
|
6
6
|
import { useDataGridLinkedPaneScrollSync as Ri, useDataGridManagedWheelScroll as _i } from "@affino/datagrid-vue/advanced";
|
|
7
7
|
import { buildDataGridChromeRenderModel as fa } from "@affino/datagrid-chrome";
|
|
8
|
-
import { resolveDataGridGanttAnalysis as Mi, buildDataGridGanttVisibleBars as
|
|
8
|
+
import { resolveDataGridGanttAnalysis as Mi, buildDataGridGanttVisibleBars as Pi, buildDataGridGanttDependencyPaths as Ei, resolveDataGridGanttRangeFrame as ba, buildDataGridTimelineRenderModels as rn, resolveDataGridTimelineDateToPixel as an, resolveDataGridTimelineScrollLeftForDate as Ii, applyDataGridGanttDragDelta as Di, hitTestDataGridGanttBar as nn, clampDataGridTimelineScrollLeft as Ai, buildDataGridGanttRowEditPatch as Ti, normalizeDataGridGanttOptions as Bi } from "@affino/datagrid-gantt";
|
|
9
9
|
const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
10
10
|
__name: "DataGridColumnMenuCustomEntry",
|
|
11
11
|
props: {
|
|
@@ -19,13 +19,13 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
19
19
|
const r = e, d = t, u = o(() => r.pathPrefix.length > 0 ? `${r.pathPrefix}/${r.item.key}` : r.item.key), s = o(() => `custom:${u.value}`), C = o(() => {
|
|
20
20
|
const i = r.item.disabledReason?.trim() ?? "";
|
|
21
21
|
return i.length > 0 ? i : void 0;
|
|
22
|
-
}), w = o(() => r.item.kind === "submenu" ? null : r.item),
|
|
22
|
+
}), w = o(() => r.item.kind === "submenu" ? null : r.item), P = o(() => r.item.kind === "submenu" ? r.item.items.filter((i) => i.hidden !== !0) : []);
|
|
23
23
|
function b() {
|
|
24
24
|
w.value && d("select", w.value);
|
|
25
25
|
}
|
|
26
26
|
return (i, h) => {
|
|
27
27
|
const l = oi("DataGridColumnMenuCustomEntry", !0);
|
|
28
|
-
return i.item.kind === "submenu" &&
|
|
28
|
+
return i.item.kind === "submenu" && P.value.length > 0 ? (S(), Se(m(An), {
|
|
29
29
|
key: 0,
|
|
30
30
|
options: i.submenuOptions
|
|
31
31
|
}, {
|
|
@@ -50,7 +50,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
50
50
|
style: ae(i.menuThemeVars)
|
|
51
51
|
}, {
|
|
52
52
|
default: be(() => [
|
|
53
|
-
(S(!0), D(fe, null, ke(
|
|
53
|
+
(S(!0), D(fe, null, ke(P.value, (v) => (S(), Se(l, {
|
|
54
54
|
key: v.key,
|
|
55
55
|
item: v,
|
|
56
56
|
"path-prefix": u.value,
|
|
@@ -158,17 +158,17 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
158
158
|
},
|
|
159
159
|
emits: ["sort", "pin", "group", "apply-filter", "clear-filter", "update-text-filter"],
|
|
160
160
|
setup(e, { emit: t }) {
|
|
161
|
-
const r = e, d = t, u = Z(null), s =
|
|
161
|
+
const r = e, d = t, u = Z(null), s = En(yi, Z(null)), C = Z(!1), w = Z(""), P = Z(!1), b = Z(null), i = Z([]), h = Z(!1), l = Z(null), v = Z([]), R = Z(0), W = Z({}), p = Z(!1);
|
|
162
162
|
let ee = 0, U = !1, L = null;
|
|
163
|
-
const $ = o(() => k(r.columnDataType)),
|
|
163
|
+
const $ = o(() => k(r.columnDataType)), _ = o(() => new Set(r.disabledItems)), z = o(() => r.triggerMode !== "button"), G = o(() => !r.grouped || !Number.isFinite(r.groupOrder) ? null : lt(r.labels.groupLevel, "Level {level}", {
|
|
164
164
|
level: Number(r.groupOrder) + 1
|
|
165
|
-
})),
|
|
165
|
+
})), M = o(() => {
|
|
166
166
|
const c = Number.isFinite(r.valueFilterRowLimit) && r.valueFilterRowLimit >= 0 ? r.valueFilterRowLimit : Number.POSITIVE_INFINITY;
|
|
167
167
|
return Math.min(c, xo);
|
|
168
|
-
}), x = o(() => Number.isFinite(r.maxFilterValues) && r.maxFilterValues > 0 ? Math.max(20, Math.trunc(r.maxFilterValues)) : 120), A = o(() => r.filterEnabled ? r.rowCount <=
|
|
168
|
+
}), x = o(() => Number.isFinite(r.maxFilterValues) && r.maxFilterValues > 0 ? Math.max(20, Math.trunc(r.maxFilterValues)) : 120), A = o(() => r.filterEnabled ? r.rowCount <= M.value : !1), I = o(() => r.rowCount >= Co), O = o(() => r.filterEnabled && !A.value), B = o(() => r.items.filter((c) => c === "sort" ? he("sortAsc") || he("sortDesc") || he("clearSort") : c === "group" ? he("toggleGroup") : c === "pin" ? rt.value : c === "filter" ? Re.value : !0)), X = o(() => F(B.value, r.customItems)), q = o(() => _.value.has("sort")), Y = o(() => _.value.has("group")), J = o(() => _.value.has("pin")), le = o(() => _.value.has("filter")), we = o(() => new Set(v.value)), Re = o(() => A.value || r.textFilterEnabled), Pe = o(() => r.textFilterEnabled && !A.value), ge = o(() => w.value.trim().length > 0), Fe = o(() => h.value || l.value !== null), rt = o(() => he("pinMenu") && (he("pinLeft") || he("pinRight") || he("unpin"))), Ze = o(() => xe(
|
|
169
169
|
"toggleGroup",
|
|
170
170
|
r.labels.group ?? (r.grouped ? "Ungroup column" : "Group by this column")
|
|
171
|
-
)), $e = o(() => xe("pinMenu", r.labels.pin ?? "Pin column")), _t = o(() => r.labels.filter ?? (A.value ? "Filter" : "Filter by text")), Mt = o(() => xe("sortAsc", $.value.asc)), ut = o(() => xe("sortDesc", $.value.desc)),
|
|
171
|
+
)), $e = o(() => xe("pinMenu", r.labels.pin ?? "Pin column")), _t = o(() => r.labels.filter ?? (A.value ? "Filter" : "Filter by text")), Mt = o(() => xe("sortAsc", $.value.asc)), ut = o(() => xe("sortDesc", $.value.desc)), Ee = o(() => xe("clearSort", "Clear sort")), Ke = o(() => xe("pinLeft", "Pin left")), at = o(() => xe("pinRight", "Pin right")), yt = o(() => xe("unpin", "Unpin")), Ie = o(() => xe("clearFilter", "Clear filter")), pe = o(() => xe(
|
|
172
172
|
"addCurrentSelectionToFilter",
|
|
173
173
|
"Add current selection to filter"
|
|
174
174
|
)), st = o(() => xe("selectAllValues", "Select all")), wt = o(() => xe("clearAllValues", "Clear all")), ct = o(() => xe("cancelFilter", "Cancel")), De = o(() => xe("applyFilter", "Apply")), Ae = o(() => Be(r.labels.activeState, "Active")), se = o(() => Be(r.labels.textFilterPlaceholder, "Type to filter rows")), Je = o(() => Be(r.labels.valueSearchPlaceholder, "Search values")), He = o(() => Be(
|
|
@@ -186,14 +186,14 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
186
186
|
"Select at least one value to apply the filter."
|
|
187
187
|
)), We = o(() => {
|
|
188
188
|
const c = w.value.trim().toLowerCase();
|
|
189
|
-
return c.length > 0 ? i.value.filter((
|
|
189
|
+
return c.length > 0 ? i.value.filter((E) => E.searchText.includes(c)) : i.value;
|
|
190
190
|
}), nt = o(() => ge.value ? We.value : We.value.slice(0, R.value)), Wt = o(() => ge.value ? 0 : Math.max(0, We.value.length - nt.value.length)), vt = o(() => {
|
|
191
|
-
if (ge.value && !
|
|
192
|
-
const c = new Set(nt.value.map((
|
|
193
|
-
return v.value.filter((
|
|
191
|
+
if (ge.value && !P.value) {
|
|
192
|
+
const c = new Set(nt.value.map((E) => E.token));
|
|
193
|
+
return v.value.filter((E) => c.has(E));
|
|
194
194
|
}
|
|
195
195
|
return v.value;
|
|
196
|
-
}), Bt = o(() => ge.value ?
|
|
196
|
+
}), Bt = o(() => ge.value ? P.value ? i.value.length : nt.value.length : i.value.length), Vt = o(() => vt.value.length), Ct = o(() => lt(
|
|
197
197
|
r.labels.selectedValuesSummary,
|
|
198
198
|
"{selected} / {total} selected",
|
|
199
199
|
{
|
|
@@ -213,7 +213,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
213
213
|
closeOnSelect: !0,
|
|
214
214
|
openDelay: 0,
|
|
215
215
|
closeDelay: 90
|
|
216
|
-
},
|
|
216
|
+
}, Pt = {
|
|
217
217
|
mousePrediction: {},
|
|
218
218
|
loopFocus: !0,
|
|
219
219
|
closeOnSelect: !0,
|
|
@@ -228,7 +228,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
230
|
Ge(w, (c) => {
|
|
231
|
-
if (it(), c.trim().length === 0 && (
|
|
231
|
+
if (it(), c.trim().length === 0 && (P.value = !1, kt()), U) {
|
|
232
232
|
U = !1;
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
@@ -253,17 +253,17 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
253
253
|
function he(c) {
|
|
254
254
|
return r.actionOptions[c]?.hidden !== !0;
|
|
255
255
|
}
|
|
256
|
-
function ye(c,
|
|
257
|
-
return
|
|
256
|
+
function ye(c, E = !1) {
|
|
257
|
+
return E || r.actionOptions[c]?.disabled === !0;
|
|
258
258
|
}
|
|
259
|
-
function xe(c,
|
|
260
|
-
return r.actionOptions[c]?.label ??
|
|
259
|
+
function xe(c, E) {
|
|
260
|
+
return r.actionOptions[c]?.label ?? E;
|
|
261
261
|
}
|
|
262
|
-
function Be(c,
|
|
263
|
-
return typeof c == "string" && c.trim().length > 0 ? c.trim() :
|
|
262
|
+
function Be(c, E) {
|
|
263
|
+
return typeof c == "string" && c.trim().length > 0 ? c.trim() : E;
|
|
264
264
|
}
|
|
265
|
-
function lt(c,
|
|
266
|
-
let ie = Be(c,
|
|
265
|
+
function lt(c, E, g) {
|
|
266
|
+
let ie = Be(c, E);
|
|
267
267
|
for (const [Q, ze] of Object.entries(g))
|
|
268
268
|
ie = ie.split(`{${Q}}`).join(String(ze));
|
|
269
269
|
return ie;
|
|
@@ -271,14 +271,14 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
271
271
|
function St(c) {
|
|
272
272
|
return r.disabledReasons[c] ?? "";
|
|
273
273
|
}
|
|
274
|
-
function tt(c,
|
|
275
|
-
if (!
|
|
274
|
+
function tt(c, E) {
|
|
275
|
+
if (!E)
|
|
276
276
|
return;
|
|
277
277
|
const g = St(c);
|
|
278
278
|
return g.length > 0 ? g : void 0;
|
|
279
279
|
}
|
|
280
|
-
function ue(c,
|
|
281
|
-
if (!ye(c,
|
|
280
|
+
function ue(c, E = !1, g) {
|
|
281
|
+
if (!ye(c, E))
|
|
282
282
|
return;
|
|
283
283
|
const Q = r.actionOptions[c]?.disabledReason?.trim() ?? "";
|
|
284
284
|
if (Q.length > 0)
|
|
@@ -286,30 +286,30 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
286
286
|
if (g)
|
|
287
287
|
return tt(g, !0);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Et(c) {
|
|
290
290
|
return c.disabled === !0;
|
|
291
291
|
}
|
|
292
|
-
function $t(c,
|
|
292
|
+
function $t(c, E) {
|
|
293
293
|
if (c == null)
|
|
294
294
|
return Be(r.labels.blankValue, "(Blanks)");
|
|
295
|
-
const g = typeof
|
|
295
|
+
const g = typeof E == "string" && E.length > 0 ? E : String(c);
|
|
296
296
|
return g.length > 0 ? g : Be(r.labels.blankValue, "(Blanks)");
|
|
297
297
|
}
|
|
298
298
|
function Ne(c) {
|
|
299
|
-
const
|
|
299
|
+
const E = [];
|
|
300
300
|
for (const g of c) {
|
|
301
301
|
const ie = ht(String(g.token ?? ""));
|
|
302
302
|
if (!ie)
|
|
303
303
|
continue;
|
|
304
304
|
const Q = $t(g.value, g.text);
|
|
305
|
-
|
|
305
|
+
E.push({
|
|
306
306
|
token: ie,
|
|
307
307
|
label: Q,
|
|
308
308
|
count: Math.max(0, Math.trunc(g.count)),
|
|
309
309
|
searchText: Q.toLowerCase()
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
return
|
|
312
|
+
return E.sort((g, ie) => g.label.localeCompare(ie.label, void 0, {
|
|
313
313
|
numeric: !0,
|
|
314
314
|
sensitivity: "base"
|
|
315
315
|
}));
|
|
@@ -324,7 +324,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
324
324
|
mt(), d("sort", c);
|
|
325
325
|
}
|
|
326
326
|
async function lr(c) {
|
|
327
|
-
|
|
327
|
+
Et(c) || await c.onSelect?.({
|
|
328
328
|
columnKey: r.columnKey,
|
|
329
329
|
columnLabel: r.columnLabel,
|
|
330
330
|
closeMenu: mt
|
|
@@ -333,16 +333,16 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
333
333
|
function Xt(c) {
|
|
334
334
|
if (!c)
|
|
335
335
|
return;
|
|
336
|
-
const
|
|
337
|
-
if (!
|
|
336
|
+
const E = u.value?.controller;
|
|
337
|
+
if (!E)
|
|
338
338
|
return;
|
|
339
339
|
const g = c.getBoundingClientRect();
|
|
340
|
-
|
|
340
|
+
E.setAnchor({
|
|
341
341
|
x: g.left,
|
|
342
342
|
y: g.bottom,
|
|
343
343
|
width: g.width,
|
|
344
344
|
height: 0
|
|
345
|
-
}),
|
|
345
|
+
}), E.open("programmatic");
|
|
346
346
|
}
|
|
347
347
|
function Yt(c) {
|
|
348
348
|
if (C.value) {
|
|
@@ -355,7 +355,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
355
355
|
W.value = wi(s.value);
|
|
356
356
|
}
|
|
357
357
|
function y() {
|
|
358
|
-
if (w.value !== "" && (U = !0, w.value = ""),
|
|
358
|
+
if (w.value !== "" && (U = !0, w.value = ""), P.value = !1, kt(), it(), f(), !A.value) {
|
|
359
359
|
i.value = [], h.value = !1, l.value = null, v.value = [], p.value = !1;
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
@@ -372,15 +372,15 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
372
372
|
L = () => window.cancelAnimationFrame(g);
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const E = globalThis.setTimeout(() => {
|
|
376
376
|
L = null, c();
|
|
377
377
|
}, 0);
|
|
378
|
-
L = () => globalThis.clearTimeout(
|
|
378
|
+
L = () => globalThis.clearTimeout(E);
|
|
379
379
|
}
|
|
380
|
-
function T(c,
|
|
380
|
+
function T(c, E = {}) {
|
|
381
381
|
f();
|
|
382
382
|
const g = ee + 1;
|
|
383
|
-
if (ee = g, h.value = !0, l.value = null, !
|
|
383
|
+
if (ee = g, h.value = !0, l.value = null, !E.defer) {
|
|
384
384
|
oe(g, c);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
@@ -396,13 +396,13 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
396
396
|
};
|
|
397
397
|
a(Q);
|
|
398
398
|
}
|
|
399
|
-
async function oe(c,
|
|
399
|
+
async function oe(c, E) {
|
|
400
400
|
try {
|
|
401
401
|
const g = r.resolveValueEntries?.(w.value.trim()) ?? [], ie = Ue(g) ? await g : g;
|
|
402
402
|
if (c !== ee)
|
|
403
403
|
return;
|
|
404
404
|
const Q = Ne(ie);
|
|
405
|
-
i.value = Q, re(Q,
|
|
405
|
+
i.value = Q, re(Q, E);
|
|
406
406
|
} catch (g) {
|
|
407
407
|
if (c !== ee)
|
|
408
408
|
return;
|
|
@@ -411,11 +411,11 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
411
411
|
c === ee && (h.value = !1);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function re(c,
|
|
414
|
+
function re(c, E) {
|
|
415
415
|
const g = Array.from(new Set(
|
|
416
416
|
r.selectedFilterTokens.map((Q) => ht(String(Q ?? ""))).filter(Boolean)
|
|
417
417
|
));
|
|
418
|
-
if (
|
|
418
|
+
if (E) {
|
|
419
419
|
const Q = new Set(c.map((Ce) => Ce.token)), ze = g.filter((Ce) => Q.has(Ce));
|
|
420
420
|
p.value = g.length === 0, v.value = ze.length > 0 ? ze : c.map((Ce) => Ce.token);
|
|
421
421
|
return;
|
|
@@ -442,8 +442,8 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
442
442
|
function ir(c) {
|
|
443
443
|
if (ge.value || R.value >= We.value.length)
|
|
444
444
|
return;
|
|
445
|
-
const
|
|
446
|
-
!
|
|
445
|
+
const E = c.target;
|
|
446
|
+
!E || E.scrollHeight - (E.scrollTop + E.clientHeight) > 24 || (R.value = Math.min(
|
|
447
447
|
We.value.length,
|
|
448
448
|
R.value + x.value
|
|
449
449
|
));
|
|
@@ -452,8 +452,8 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
452
452
|
if (le.value)
|
|
453
453
|
return;
|
|
454
454
|
p.value = !1;
|
|
455
|
-
const
|
|
456
|
-
|
|
455
|
+
const E = new Set(v.value);
|
|
456
|
+
E.has(c) ? E.delete(c) : E.add(c), v.value = [...E];
|
|
457
457
|
}
|
|
458
458
|
function cr() {
|
|
459
459
|
le.value || (p.value = !0, v.value = i.value.map((c) => c.token));
|
|
@@ -462,7 +462,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
462
462
|
le.value || (p.value = !1, v.value = []);
|
|
463
463
|
}
|
|
464
464
|
function gr(c) {
|
|
465
|
-
le.value || (
|
|
465
|
+
le.value || (P.value = c.target.checked);
|
|
466
466
|
}
|
|
467
467
|
function vr() {
|
|
468
468
|
le.value || !et.value || (!ge.value && vt.value.length === i.value.length ? d("clear-filter") : d("apply-filter", [...vt.value]), mt());
|
|
@@ -503,9 +503,9 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function F(c,
|
|
506
|
+
function F(c, E) {
|
|
507
507
|
const g = [], ie = [], Q = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), Ce = new Set(c);
|
|
508
|
-
for (const je of
|
|
508
|
+
for (const je of E) {
|
|
509
509
|
if (je.hidden === !0)
|
|
510
510
|
continue;
|
|
511
511
|
const ot = {
|
|
@@ -534,7 +534,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
534
534
|
Le.push(...Q.get(je) ?? []), Le.push({ kind: "section", key: je }), Le.push(...ze.get(je) ?? []);
|
|
535
535
|
return Le.push(...ie), Object.freeze(Le);
|
|
536
536
|
}
|
|
537
|
-
return (c,
|
|
537
|
+
return (c, E) => (S(), Se(m(pi), {
|
|
538
538
|
ref_key: "menuRef",
|
|
539
539
|
ref: u,
|
|
540
540
|
callbacks: Lt,
|
|
@@ -586,7 +586,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
586
586
|
"data-disabled-reason": ue("sortAsc", q.value || !c.sortEnabled, "sort"),
|
|
587
587
|
disabled: ye("sortAsc", q.value || !c.sortEnabled),
|
|
588
588
|
title: ue("sortAsc", q.value || !c.sortEnabled, "sort"),
|
|
589
|
-
onSelect:
|
|
589
|
+
onSelect: E[0] || (E[0] = (Q) => Ve("asc"))
|
|
590
590
|
}, {
|
|
591
591
|
default: be(() => [
|
|
592
592
|
N("span", {
|
|
@@ -603,7 +603,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
603
603
|
"data-disabled-reason": ue("sortDesc", q.value || !c.sortEnabled, "sort"),
|
|
604
604
|
disabled: ye("sortDesc", q.value || !c.sortEnabled),
|
|
605
605
|
title: ue("sortDesc", q.value || !c.sortEnabled, "sort"),
|
|
606
|
-
onSelect:
|
|
606
|
+
onSelect: E[1] || (E[1] = (Q) => Ve("desc"))
|
|
607
607
|
}, {
|
|
608
608
|
default: be(() => [
|
|
609
609
|
N("span", {
|
|
@@ -620,12 +620,12 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
620
620
|
"data-disabled-reason": ue("clearSort", q.value || !c.sortEnabled || c.sortDirection === null, "sort"),
|
|
621
621
|
disabled: ye("clearSort", q.value || !c.sortEnabled || c.sortDirection === null),
|
|
622
622
|
title: ue("clearSort", q.value || !c.sortEnabled || c.sortDirection === null, "sort"),
|
|
623
|
-
onSelect:
|
|
623
|
+
onSelect: E[2] || (E[2] = (Q) => Ve(null))
|
|
624
624
|
}, {
|
|
625
625
|
default: be(() => [
|
|
626
626
|
N("span", {
|
|
627
627
|
title: ue("clearSort", q.value || !c.sortEnabled || c.sortDirection === null, "sort")
|
|
628
|
-
}, de(
|
|
628
|
+
}, de(Ee.value), 9, zi)
|
|
629
629
|
]),
|
|
630
630
|
_: 1
|
|
631
631
|
}, 8, ["data-disabled-reason", "disabled", "title"])) : te("", !0)
|
|
@@ -647,7 +647,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
647
647
|
_: 1
|
|
648
648
|
}, 8, ["data-disabled-reason", "disabled", "title"])) : g.kind === "section" && g.key === "pin" && rt.value ? (S(), Se(m(An), {
|
|
649
649
|
key: 3,
|
|
650
|
-
options:
|
|
650
|
+
options: Pt
|
|
651
651
|
}, {
|
|
652
652
|
default: be(() => [
|
|
653
653
|
Ye(m(Tn), {
|
|
@@ -675,7 +675,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
675
675
|
"data-disabled-reason": ue("pinLeft", J.value, "pin"),
|
|
676
676
|
disabled: ye("pinLeft", J.value),
|
|
677
677
|
title: ue("pinLeft", J.value, "pin"),
|
|
678
|
-
onSelect:
|
|
678
|
+
onSelect: E[3] || (E[3] = (Q) => c.$emit("pin", "left"))
|
|
679
679
|
}, {
|
|
680
680
|
default: be(() => [
|
|
681
681
|
N("span", {
|
|
@@ -692,7 +692,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
692
692
|
"data-disabled-reason": ue("pinRight", J.value, "pin"),
|
|
693
693
|
disabled: ye("pinRight", J.value),
|
|
694
694
|
title: ue("pinRight", J.value, "pin"),
|
|
695
|
-
onSelect:
|
|
695
|
+
onSelect: E[4] || (E[4] = (Q) => c.$emit("pin", "right"))
|
|
696
696
|
}, {
|
|
697
697
|
default: be(() => [
|
|
698
698
|
N("span", {
|
|
@@ -709,7 +709,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
709
709
|
"data-disabled-reason": ue("unpin", J.value || c.pin === "none", "pin"),
|
|
710
710
|
disabled: ye("unpin", J.value || c.pin === "none"),
|
|
711
711
|
title: ue("unpin", J.value || c.pin === "none", "pin"),
|
|
712
|
-
onSelect:
|
|
712
|
+
onSelect: E[5] || (E[5] = (Q) => c.$emit("pin", "none"))
|
|
713
713
|
}, {
|
|
714
714
|
default: be(() => [
|
|
715
715
|
N("span", {
|
|
@@ -732,9 +732,9 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
732
732
|
"datagrid-column-menu__section--with-values": A.value
|
|
733
733
|
}
|
|
734
734
|
]),
|
|
735
|
-
onMousedown:
|
|
735
|
+
onMousedown: E[13] || (E[13] = H(() => {
|
|
736
736
|
}, ["stop"])),
|
|
737
|
-
onClick:
|
|
737
|
+
onClick: E[14] || (E[14] = H(() => {
|
|
738
738
|
}, ["stop"]))
|
|
739
739
|
}, [
|
|
740
740
|
N("div", Xi, [
|
|
@@ -750,7 +750,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
750
750
|
onClick: pr
|
|
751
751
|
}, de(Ie.value), 9, Zi)) : te("", !0)
|
|
752
752
|
]),
|
|
753
|
-
|
|
753
|
+
Pe.value ? (S(), D("input", {
|
|
754
754
|
key: 0,
|
|
755
755
|
name: `datagrid-column-menu-text-filter-${c.columnKey}`,
|
|
756
756
|
value: c.textFilterValue,
|
|
@@ -759,29 +759,29 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
759
759
|
placeholder: se.value,
|
|
760
760
|
disabled: le.value,
|
|
761
761
|
title: tt("filter", le.value),
|
|
762
|
-
onMousedown:
|
|
762
|
+
onMousedown: E[6] || (E[6] = H(() => {
|
|
763
763
|
}, ["stop"])),
|
|
764
|
-
onClick:
|
|
764
|
+
onClick: E[7] || (E[7] = H(() => {
|
|
765
765
|
}, ["stop"])),
|
|
766
|
-
onKeydown:
|
|
766
|
+
onKeydown: E[8] || (E[8] = H(() => {
|
|
767
767
|
}, ["stop"])),
|
|
768
768
|
onInput: mr
|
|
769
769
|
}, null, 40, Ji)) : te("", !0),
|
|
770
770
|
c.textFilterEnabled && !A.value ? (S(), D("div", Qi, de(O.value ? He.value : Qe.value), 1)) : te("", !0),
|
|
771
771
|
A.value ? di((S(), D("input", {
|
|
772
772
|
key: 2,
|
|
773
|
-
"onUpdate:modelValue":
|
|
773
|
+
"onUpdate:modelValue": E[9] || (E[9] = (Q) => w.value = Q),
|
|
774
774
|
name: `datagrid-column-menu-value-search-${c.columnKey}`,
|
|
775
775
|
class: "datagrid-column-menu__search",
|
|
776
776
|
type: "search",
|
|
777
777
|
placeholder: Je.value,
|
|
778
778
|
disabled: le.value,
|
|
779
779
|
title: tt("filter", le.value),
|
|
780
|
-
onMousedown:
|
|
780
|
+
onMousedown: E[10] || (E[10] = H(() => {
|
|
781
781
|
}, ["stop"])),
|
|
782
|
-
onClick:
|
|
782
|
+
onClick: E[11] || (E[11] = H(() => {
|
|
783
783
|
}, ["stop"])),
|
|
784
|
-
onKeydown:
|
|
784
|
+
onKeydown: E[12] || (E[12] = H(() => {
|
|
785
785
|
}, ["stop"]))
|
|
786
786
|
}, null, 40, eo)), [
|
|
787
787
|
[ui, w.value]
|
|
@@ -790,7 +790,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
790
790
|
N("input", {
|
|
791
791
|
name: `datagrid-column-menu-add-selection-${c.columnKey}`,
|
|
792
792
|
type: "checkbox",
|
|
793
|
-
checked:
|
|
793
|
+
checked: P.value,
|
|
794
794
|
disabled: ye("addCurrentSelectionToFilter", le.value),
|
|
795
795
|
title: ue("addCurrentSelectionToFilter", le.value, "filter"),
|
|
796
796
|
onChange: gr
|
|
@@ -884,7 +884,7 @@ const Vi = ["title"], Li = /* @__PURE__ */ At({
|
|
|
884
884
|
key: 5,
|
|
885
885
|
item: g.item,
|
|
886
886
|
"menu-theme-vars": W.value,
|
|
887
|
-
"submenu-options":
|
|
887
|
+
"submenu-options": Pt,
|
|
888
888
|
onSelect: lr
|
|
889
889
|
}, null, 8, ["item", "menu-theme-vars"])) : te("", !0)
|
|
890
890
|
], 64))), 128))
|
|
@@ -948,7 +948,7 @@ function _o(e) {
|
|
|
948
948
|
), e;
|
|
949
949
|
}
|
|
950
950
|
function na() {
|
|
951
|
-
const e =
|
|
951
|
+
const e = En(Ln);
|
|
952
952
|
if (!e)
|
|
953
953
|
throw new Error("DataGrid table stage context is not available outside of DataGridTableStage.");
|
|
954
954
|
return e;
|
|
@@ -989,10 +989,10 @@ function vs() {
|
|
|
989
989
|
function ms() {
|
|
990
990
|
return nr("interaction");
|
|
991
991
|
}
|
|
992
|
-
const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span", "data-datagrid-pivot-group-depth"],
|
|
992
|
+
const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span", "data-datagrid-pivot-group-depth"], Po = {
|
|
993
993
|
key: 0,
|
|
994
994
|
class: "col-head__pivot-group-label"
|
|
995
|
-
},
|
|
995
|
+
}, Eo = /* @__PURE__ */ N("div", { class: "col-head col-head--index" }, [
|
|
996
996
|
/* @__PURE__ */ N("span", null, "#")
|
|
997
997
|
], -1), Io = {
|
|
998
998
|
key: 0,
|
|
@@ -1052,10 +1052,10 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1052
1052
|
}, Md = {
|
|
1053
1053
|
key: 1,
|
|
1054
1054
|
d: "M9 11V6.75M9 6.75 7.25 8.5M9 6.75 10.75 8.5"
|
|
1055
|
-
},
|
|
1055
|
+
}, Pd = {
|
|
1056
1056
|
key: 2,
|
|
1057
1057
|
d: "M9 5v4.25M9 9.25 7.25 7.5M9 9.25 10.75 7.5"
|
|
1058
|
-
},
|
|
1058
|
+
}, Ed = {
|
|
1059
1059
|
key: 3,
|
|
1060
1060
|
d: "M5.5 6.5 8 9l2.5-2.5"
|
|
1061
1061
|
}, Id = ["onMousedown", "onDblclick"], Dd = ["data-column-key", "draggable", "onClick", "onDragstart", "onDragover", "onDrop"], Ad = { class: "col-head" }, Td = {
|
|
@@ -1098,10 +1098,10 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1098
1098
|
}
|
|
1099
1099
|
},
|
|
1100
1100
|
setup(e) {
|
|
1101
|
-
const t = Ha(), r = Fn(), d = Wa(), u = Hn(), s = za(), C = Wn(), w = o(() => s.value.sourceRows ?? []),
|
|
1101
|
+
const t = Ha(), r = Fn(), d = Wa(), u = Hn(), s = za(), C = Wn(), w = o(() => s.value.sourceRows ?? []), P = o(() => u.value.visibleColumns), b = o(() => u.value.renderedColumns), i = o(() => P.value.filter((y) => y.pin === "left")), h = o(() => P.value.filter((y) => y.pin === "right")), l = o(() => t.value !== "pivot" ? 0 : P.value.reduce((y, f) => {
|
|
1102
1102
|
const a = Fe(f);
|
|
1103
1103
|
return Math.max(y, a?.groupLabels?.length ?? 0);
|
|
1104
|
-
}, 0)), v = o(() => l.value > 0), R = o(() => $e(i.value)), W = o(() => $e(b.value)), p = o(() => $e(h.value)), ee = o(() => r.value.mainTrackStyle), U = o(() => d.value.leftColumnSpacerWidth), L = o(() => d.value.rightColumnSpacerWidth), $ = o(() => u.value.columnFilterTextByKey),
|
|
1104
|
+
}, 0)), v = o(() => l.value > 0), R = o(() => $e(i.value)), W = o(() => $e(b.value)), p = o(() => $e(h.value)), ee = o(() => r.value.mainTrackStyle), U = o(() => d.value.leftColumnSpacerWidth), L = o(() => d.value.rightColumnSpacerWidth), $ = o(() => u.value.columnFilterTextByKey), _ = o(() => typeof u.value.columnMenuMaxFilterValues == "number" ? u.value.columnMenuMaxFilterValues : 250), z = o(() => typeof u.value.columnMenuValueFilterRowLimit == "number" ? u.value.columnMenuValueFilterRowLimit : Number.MAX_SAFE_INTEGER), G = Z(null), M = Z(null), x = Z(null);
|
|
1105
1105
|
let A = !1;
|
|
1106
1106
|
function I() {
|
|
1107
1107
|
return u.value.columnMenuEnabled === !0 ? !0 : typeof u.value.applyColumnMenuSort == "function" || typeof u.value.applyColumnMenuPin == "function" || typeof u.value.applyColumnMenuFilter == "function" || typeof u.value.clearColumnMenuFilter == "function";
|
|
@@ -1124,7 +1124,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1124
1124
|
});
|
|
1125
1125
|
}
|
|
1126
1126
|
function q(y = !1) {
|
|
1127
|
-
G.value = null,
|
|
1127
|
+
G.value = null, M.value = null, x.value = null, y && X();
|
|
1128
1128
|
}
|
|
1129
1129
|
function Y(y) {
|
|
1130
1130
|
return typeof u.value.reorderColumnsByHeader == "function" && t.value !== "pivot" && !Ie(y);
|
|
@@ -1143,18 +1143,18 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1143
1143
|
"grid-cell--header-menu-open": f.menuOpen === !0,
|
|
1144
1144
|
"grid-cell--header-reorderable": Y(y),
|
|
1145
1145
|
"grid-cell--header-reorder-source": G.value === y.key,
|
|
1146
|
-
"grid-cell--header-drop-before":
|
|
1147
|
-
"grid-cell--header-drop-after":
|
|
1146
|
+
"grid-cell--header-drop-before": M.value === y.key && x.value === "before",
|
|
1147
|
+
"grid-cell--header-drop-after": M.value === y.key && x.value === "after"
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
1150
|
function Re(y) {
|
|
1151
|
-
const f =
|
|
1151
|
+
const f = P.value.findIndex((oe) => oe.key === y.key), a = C.value.totalRowCount ?? 0;
|
|
1152
1152
|
return f < 0 || a <= 0 ? !1 : (C.value.selectionRanges ?? (C.value.selectionRange ? [C.value.selectionRange] : [])).some((oe) => {
|
|
1153
1153
|
const re = Math.min(oe.startRow, oe.endRow), kt = Math.max(oe.startRow, oe.endRow), it = Math.min(oe.startColumn, oe.endColumn), ir = Math.max(oe.startColumn, oe.endColumn);
|
|
1154
1154
|
return re === 0 && kt >= a - 1 && f >= it && f <= ir;
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function Pe(y) {
|
|
1158
1158
|
return r.value.columnStyle(y);
|
|
1159
1159
|
}
|
|
1160
1160
|
function ge(y) {
|
|
@@ -1215,7 +1215,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1215
1215
|
function ut(y, f) {
|
|
1216
1216
|
u.value.startResize(y, f);
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Ee(y, f) {
|
|
1219
1219
|
u.value.handleResizeDoubleClick(y, f);
|
|
1220
1220
|
}
|
|
1221
1221
|
function Ke(y, f) {
|
|
@@ -1262,18 +1262,18 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1262
1262
|
q();
|
|
1263
1263
|
return;
|
|
1264
1264
|
}
|
|
1265
|
-
A = !0, G.value = f.key,
|
|
1265
|
+
A = !0, G.value = f.key, M.value = null, x.value = null, y.dataTransfer && (y.dataTransfer.effectAllowed = "move", y.dataTransfer.dropEffect = "move", y.dataTransfer.setData("text/plain", f.key));
|
|
1266
1266
|
}
|
|
1267
1267
|
function Je(y, f) {
|
|
1268
1268
|
if (!G.value || !Y(f)) {
|
|
1269
|
-
|
|
1269
|
+
M.value = null, x.value = null;
|
|
1270
1270
|
return;
|
|
1271
1271
|
}
|
|
1272
1272
|
if (G.value === f.key) {
|
|
1273
|
-
|
|
1273
|
+
M.value = null, x.value = null;
|
|
1274
1274
|
return;
|
|
1275
1275
|
}
|
|
1276
|
-
y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move"),
|
|
1276
|
+
y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move"), M.value = f.key, x.value = le(y);
|
|
1277
1277
|
}
|
|
1278
1278
|
function He(y, f) {
|
|
1279
1279
|
const a = G.value;
|
|
@@ -1366,7 +1366,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1366
1366
|
function Gt() {
|
|
1367
1367
|
return u.value.columnMenuTrigger ?? "button+contextmenu";
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Pt() {
|
|
1370
1370
|
return Gt() !== "contextmenu";
|
|
1371
1371
|
}
|
|
1372
1372
|
function Lt(y) {
|
|
@@ -1409,7 +1409,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1409
1409
|
function ue(y, f) {
|
|
1410
1410
|
u.value.applyColumnMenuGroupBy?.(y, f);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Et(y, f) {
|
|
1413
1413
|
u.value.applyColumnMenuFilter?.(y, f);
|
|
1414
1414
|
}
|
|
1415
1415
|
function $t(y) {
|
|
@@ -1491,7 +1491,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1491
1491
|
"data-datagrid-pivot-group-span": oe.columns.length,
|
|
1492
1492
|
"data-datagrid-pivot-group-depth": T
|
|
1493
1493
|
}, [
|
|
1494
|
-
oe.label ? (S(), D("span",
|
|
1494
|
+
oe.label ? (S(), D("span", Po, de(oe.label), 1)) : te("", !0)
|
|
1495
1495
|
], 14, Mo))), 128))
|
|
1496
1496
|
], 4))), 128)),
|
|
1497
1497
|
N("div", {
|
|
@@ -1503,7 +1503,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1503
1503
|
class: "grid-cell grid-cell--header grid-cell--index grid-cell--index-header",
|
|
1504
1504
|
style: ae(e.rowIndexColumnStyle)
|
|
1505
1505
|
}, [
|
|
1506
|
-
|
|
1506
|
+
Eo,
|
|
1507
1507
|
I() ? te("", !0) : (S(), D("div", Io))
|
|
1508
1508
|
], 4)) : te("", !0),
|
|
1509
1509
|
O() ? (S(!0), D(fe, { key: 1 }, ke(i.value, (a) => (S(), D(fe, {
|
|
@@ -1512,7 +1512,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1512
1512
|
Ie(a) ? (S(), D("div", {
|
|
1513
1513
|
key: 0,
|
|
1514
1514
|
class: "grid-cell grid-cell--header grid-cell--pinned-left grid-cell--checkbox grid-cell--row-selection",
|
|
1515
|
-
style: ae([
|
|
1515
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1516
1516
|
"data-column-key": a.key
|
|
1517
1517
|
}, [
|
|
1518
1518
|
N("div", Ao, [
|
|
@@ -1566,10 +1566,10 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1566
1566
|
"text-filter-value": $.value[a.key] ?? "",
|
|
1567
1567
|
"filter-active": ne(a.key),
|
|
1568
1568
|
"selected-filter-tokens": Te(a.key),
|
|
1569
|
-
"max-filter-values":
|
|
1569
|
+
"max-filter-values": _.value,
|
|
1570
1570
|
onSort: (T) => St(a.key, T),
|
|
1571
1571
|
onPin: (T) => tt(a.key, T),
|
|
1572
|
-
onApplyFilter: (T) =>
|
|
1572
|
+
onApplyFilter: (T) => Et(a.key, T),
|
|
1573
1573
|
onGroup: (T) => ue(a.key, T),
|
|
1574
1574
|
onUpdateTextFilter: (T) => Ke(a.key, T),
|
|
1575
1575
|
onClearFilter: (T) => $t(a.key)
|
|
@@ -1577,7 +1577,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1577
1577
|
default: be(({ open: T, toggleMenuFromElement: oe }) => [
|
|
1578
1578
|
N("div", {
|
|
1579
1579
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable grid-cell--pinned-left", we(a, { menuEnabled: !0, menuOpen: T })]),
|
|
1580
|
-
style: ae([
|
|
1580
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1581
1581
|
"data-column-key": a.key,
|
|
1582
1582
|
draggable: Y(a),
|
|
1583
1583
|
onClick: (re) => Ae(a, { additive: re.ctrlKey || re.metaKey, extend: re.shiftKey }),
|
|
@@ -1588,7 +1588,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1588
1588
|
}, [
|
|
1589
1589
|
N("div", Vo, [
|
|
1590
1590
|
N("span", Lo, de(rt(a)), 1),
|
|
1591
|
-
|
|
1591
|
+
Pt() ? (S(), D("button", {
|
|
1592
1592
|
key: 0,
|
|
1593
1593
|
type: "button",
|
|
1594
1594
|
class: ce(["col-menu-trigger", Vt(a.key, T)]),
|
|
@@ -1611,7 +1611,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1611
1611
|
class: "col-resize",
|
|
1612
1612
|
"aria-label": "Resize column",
|
|
1613
1613
|
onMousedown: H((re) => ut(re, a.key), ["stop", "prevent"]),
|
|
1614
|
-
onDblclick: H((re) =>
|
|
1614
|
+
onDblclick: H((re) => Ee(re, a.key), ["stop"]),
|
|
1615
1615
|
onClick: f[4] || (f[4] = H(() => {
|
|
1616
1616
|
}, ["stop"]))
|
|
1617
1617
|
}, null, 40, $o)
|
|
@@ -1626,7 +1626,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1626
1626
|
Ie(a) ? (S(), D("div", {
|
|
1627
1627
|
key: 0,
|
|
1628
1628
|
class: "grid-cell grid-cell--header grid-cell--pinned-left grid-cell--checkbox grid-cell--row-selection",
|
|
1629
|
-
style: ae([
|
|
1629
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1630
1630
|
"data-column-key": a.key
|
|
1631
1631
|
}, [
|
|
1632
1632
|
N("div", No, [
|
|
@@ -1657,7 +1657,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1657
1657
|
], 12, Ko)) : (S(), D("div", {
|
|
1658
1658
|
key: 1,
|
|
1659
1659
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable grid-cell--pinned-left", we(a)]),
|
|
1660
|
-
style: ae([
|
|
1660
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1661
1661
|
"data-column-key": a.key,
|
|
1662
1662
|
draggable: Y(a),
|
|
1663
1663
|
onClick: (T) => Ae(a, { additive: T.ctrlKey || T.metaKey, extend: T.shiftKey }),
|
|
@@ -1679,7 +1679,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1679
1679
|
class: "col-resize",
|
|
1680
1680
|
"aria-label": "Resize column",
|
|
1681
1681
|
onMousedown: H((T) => ut(T, a.key), ["stop", "prevent"]),
|
|
1682
|
-
onDblclick: H((T) =>
|
|
1682
|
+
onDblclick: H((T) => Ee(T, a.key), ["stop"]),
|
|
1683
1683
|
onClick: f[8] || (f[8] = H(() => {
|
|
1684
1684
|
}, ["stop"]))
|
|
1685
1685
|
}, null, 40, Zo)
|
|
@@ -1777,18 +1777,18 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1777
1777
|
"text-filter-value": $.value[a.key] ?? "",
|
|
1778
1778
|
"filter-active": ne(a.key),
|
|
1779
1779
|
"selected-filter-tokens": Te(a.key),
|
|
1780
|
-
"max-filter-values":
|
|
1780
|
+
"max-filter-values": _.value,
|
|
1781
1781
|
onSort: (T) => St(a.key, T),
|
|
1782
1782
|
onPin: (T) => tt(a.key, T),
|
|
1783
1783
|
onGroup: (T) => ue(a.key, T),
|
|
1784
|
-
onApplyFilter: (T) =>
|
|
1784
|
+
onApplyFilter: (T) => Et(a.key, T),
|
|
1785
1785
|
onUpdateTextFilter: (T) => Ke(a.key, T),
|
|
1786
1786
|
onClearFilter: (T) => $t(a.key)
|
|
1787
1787
|
}, {
|
|
1788
1788
|
default: be(({ open: T, toggleMenuFromElement: oe }) => [
|
|
1789
1789
|
N("div", {
|
|
1790
1790
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable", we(a, { menuEnabled: !0, menuOpen: T })]),
|
|
1791
|
-
style: ae([
|
|
1791
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1792
1792
|
"data-column-key": a.key,
|
|
1793
1793
|
draggable: Y(a),
|
|
1794
1794
|
onClick: (re) => Ae(a, { additive: re.ctrlKey || re.metaKey, extend: re.shiftKey }),
|
|
@@ -1804,7 +1804,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1804
1804
|
class: "col-head__group-badge",
|
|
1805
1805
|
title: nt(a.key)
|
|
1806
1806
|
}, de(We(a.key)), 9, nd)) : te("", !0),
|
|
1807
|
-
|
|
1807
|
+
Pt() ? (S(), D("button", {
|
|
1808
1808
|
key: 1,
|
|
1809
1809
|
type: "button",
|
|
1810
1810
|
class: ce(["col-menu-trigger", Vt(a.key, T)]),
|
|
@@ -1827,7 +1827,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1827
1827
|
class: "col-resize",
|
|
1828
1828
|
"aria-label": "Resize column",
|
|
1829
1829
|
onMousedown: H((re) => ut(re, a.key), ["stop", "prevent"]),
|
|
1830
|
-
onDblclick: H((re) =>
|
|
1830
|
+
onDblclick: H((re) => Ee(re, a.key), ["stop"]),
|
|
1831
1831
|
onClick: f[14] || (f[14] = H(() => {
|
|
1832
1832
|
}, ["stop"]))
|
|
1833
1833
|
}, null, 40, cd)
|
|
@@ -1838,7 +1838,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1838
1838
|
}, 1032, ["row-count", "resolve-value-entries", "items", "disabled-items", "disabled-reasons", "labels", "action-options", "custom-items", "trigger-mode", "column-key", "column-label", "column-data-type", "sort-direction", "sort-enabled", "pin", "grouped", "group-order", "group-enabled", "filter-enabled", "value-filter-row-limit", "text-filter-enabled", "text-filter-value", "filter-active", "selected-filter-tokens", "max-filter-values", "onSort", "onPin", "onGroup", "onApplyFilter", "onUpdateTextFilter", "onClearFilter"]))), 128)) : (S(!0), D(fe, { key: 2 }, ke(b.value, (a) => (S(), D("div", {
|
|
1839
1839
|
key: `header-${a.key}`,
|
|
1840
1840
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable", we(a)]),
|
|
1841
|
-
style: ae([
|
|
1841
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1842
1842
|
"data-column-key": a.key,
|
|
1843
1843
|
draggable: Y(a),
|
|
1844
1844
|
onClick: (T) => Ae(a, { additive: T.ctrlKey || T.metaKey, extend: T.shiftKey }),
|
|
@@ -1860,7 +1860,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1860
1860
|
class: "col-resize",
|
|
1861
1861
|
"aria-label": "Resize column",
|
|
1862
1862
|
onMousedown: H((T) => ut(T, a.key), ["stop", "prevent"]),
|
|
1863
|
-
onDblclick: H((T) =>
|
|
1863
|
+
onDblclick: H((T) => Ee(T, a.key), ["stop"]),
|
|
1864
1864
|
onClick: f[15] || (f[15] = H(() => {
|
|
1865
1865
|
}, ["stop"]))
|
|
1866
1866
|
}, null, 40, hd)
|
|
@@ -1947,10 +1947,10 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1947
1947
|
"text-filter-value": $.value[a.key] ?? "",
|
|
1948
1948
|
"filter-active": ne(a.key),
|
|
1949
1949
|
"selected-filter-tokens": Te(a.key),
|
|
1950
|
-
"max-filter-values":
|
|
1950
|
+
"max-filter-values": _.value,
|
|
1951
1951
|
onSort: (T) => St(a.key, T),
|
|
1952
1952
|
onPin: (T) => tt(a.key, T),
|
|
1953
|
-
onApplyFilter: (T) =>
|
|
1953
|
+
onApplyFilter: (T) => Et(a.key, T),
|
|
1954
1954
|
onGroup: (T) => ue(a.key, T),
|
|
1955
1955
|
onUpdateTextFilter: (T) => Ke(a.key, T),
|
|
1956
1956
|
onClearFilter: (T) => $t(a.key)
|
|
@@ -1958,7 +1958,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1958
1958
|
default: be(({ open: T, toggleMenuFromElement: oe }) => [
|
|
1959
1959
|
N("div", {
|
|
1960
1960
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable grid-cell--pinned-right", we(a, { menuEnabled: !0, menuOpen: T })]),
|
|
1961
|
-
style: ae([
|
|
1961
|
+
style: ae([Pe(a.key), De(a)]),
|
|
1962
1962
|
"data-column-key": a.key,
|
|
1963
1963
|
draggable: Y(a),
|
|
1964
1964
|
onClick: (re) => Ae(a, { additive: re.ctrlKey || re.metaKey, extend: re.shiftKey }),
|
|
@@ -1974,7 +1974,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1974
1974
|
class: "col-head__group-badge",
|
|
1975
1975
|
title: nt(a.key)
|
|
1976
1976
|
}, de(We(a.key)), 9, Sd)) : te("", !0),
|
|
1977
|
-
|
|
1977
|
+
Pt() ? (S(), D("button", {
|
|
1978
1978
|
key: 1,
|
|
1979
1979
|
type: "button",
|
|
1980
1980
|
class: ce(["col-menu-trigger", Vt(a.key, T)]),
|
|
@@ -1989,7 +1989,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1989
1989
|
}, [
|
|
1990
1990
|
(S(), D("svg", Rd, [
|
|
1991
1991
|
Wt(a.key) ? (S(), D("path", _d)) : te("", !0),
|
|
1992
|
-
vt(a.key) ? (S(), D("path", Md)) : Bt(a.key) ? (S(), D("path",
|
|
1992
|
+
vt(a.key) ? (S(), D("path", Md)) : Bt(a.key) ? (S(), D("path", Pd)) : (S(), D("path", Ed))
|
|
1993
1993
|
]))
|
|
1994
1994
|
], 42, kd)) : te("", !0),
|
|
1995
1995
|
N("button", {
|
|
@@ -1997,7 +1997,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
1997
1997
|
class: "col-resize",
|
|
1998
1998
|
"aria-label": "Resize column",
|
|
1999
1999
|
onMousedown: H((re) => ut(re, a.key), ["stop", "prevent"]),
|
|
2000
|
-
onDblclick: H((re) =>
|
|
2000
|
+
onDblclick: H((re) => Ee(re, a.key), ["stop"]),
|
|
2001
2001
|
onClick: f[21] || (f[21] = H(() => {
|
|
2002
2002
|
}, ["stop"]))
|
|
2003
2003
|
}, null, 40, Id)
|
|
@@ -2008,7 +2008,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2008
2008
|
}, 1032, ["row-count", "resolve-value-entries", "items", "disabled-items", "disabled-reasons", "labels", "action-options", "custom-items", "trigger-mode", "column-key", "column-label", "column-data-type", "sort-direction", "sort-enabled", "pin", "grouped", "group-order", "group-enabled", "filter-enabled", "value-filter-row-limit", "text-filter-enabled", "text-filter-value", "filter-active", "selected-filter-tokens", "max-filter-values", "onSort", "onPin", "onApplyFilter", "onGroup", "onUpdateTextFilter", "onClearFilter"]))), 128)) : (S(!0), D(fe, { key: 1 }, ke(h.value, (a) => (S(), D("div", {
|
|
2009
2009
|
key: `header-right-${a.key}`,
|
|
2010
2010
|
class: ce(["grid-cell grid-cell--header grid-cell--header-sortable grid-cell--pinned-right", we(a)]),
|
|
2011
|
-
style: ae([
|
|
2011
|
+
style: ae([Pe(a.key), De(a)]),
|
|
2012
2012
|
"data-column-key": a.key,
|
|
2013
2013
|
draggable: Y(a),
|
|
2014
2014
|
onClick: (T) => Ae(a, { additive: T.ctrlKey || T.metaKey, extend: T.shiftKey }),
|
|
@@ -2025,7 +2025,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2025
2025
|
class: "col-resize",
|
|
2026
2026
|
"aria-label": "Resize column",
|
|
2027
2027
|
onMousedown: H((T) => ut(T, a.key), ["stop", "prevent"]),
|
|
2028
|
-
onDblclick: H((T) =>
|
|
2028
|
+
onDblclick: H((T) => Ee(T, a.key), ["stop"]),
|
|
2029
2029
|
onClick: f[22] || (f[22] = H(() => {
|
|
2030
2030
|
}, ["stop"]))
|
|
2031
2031
|
}, null, 40, Bd)
|
|
@@ -2237,7 +2237,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2237
2237
|
}
|
|
2238
2238
|
},
|
|
2239
2239
|
setup(e) {
|
|
2240
|
-
const t = e, r = Ha(), d = On(), u = Fn(), s = Wa(), C = Hn(), w = za(),
|
|
2240
|
+
const t = e, r = Ha(), d = On(), u = Fn(), s = Wa(), C = Hn(), w = za(), P = zn(), {
|
|
2241
2241
|
displayRows: b,
|
|
2242
2242
|
viewportClass: i,
|
|
2243
2243
|
viewportRef: h,
|
|
@@ -2246,10 +2246,10 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2246
2246
|
movePreviewOverlaySegments: R,
|
|
2247
2247
|
overlayLanes: W,
|
|
2248
2248
|
renderApi: p
|
|
2249
|
-
} = ci(t), ee = o(() => t.topSpacerHeight ?? s.value.topSpacerHeight), U = o(() => t.bottomSpacerHeight ?? s.value.bottomSpacerHeight), L = o(() => t.handleScroll ?? p.value.handleCenterViewportScroll), $ = o(() => t.handleWheel ?? p.value.handleBodyViewportWheel),
|
|
2249
|
+
} = ci(t), ee = o(() => t.topSpacerHeight ?? s.value.topSpacerHeight), U = o(() => t.bottomSpacerHeight ?? s.value.bottomSpacerHeight), L = o(() => t.handleScroll ?? p.value.handleCenterViewportScroll), $ = o(() => t.handleWheel ?? p.value.handleBodyViewportWheel), _ = o(() => t.handleKeydown ?? p.value.handleViewportKeydown), z = o(() => t.handleContextMenu), G = o(() => [
|
|
2250
2250
|
i.value,
|
|
2251
2251
|
d.value === "auto-height" ? "grid-body-viewport--layout-auto-height" : "grid-body-viewport--layout-fill"
|
|
2252
|
-
]),
|
|
2252
|
+
]), M = o(() => C.value.renderedColumns.map((I) => ({
|
|
2253
2253
|
column: I,
|
|
2254
2254
|
columnIndex: p.value.columnIndexByKey(I.key)
|
|
2255
2255
|
})));
|
|
@@ -2268,7 +2268,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2268
2268
|
};
|
|
2269
2269
|
}
|
|
2270
2270
|
function A() {
|
|
2271
|
-
const I = b.value, O = I[1] ?? null, B = I.slice(0, 5).map((
|
|
2271
|
+
const I = b.value, O = I[1] ?? null, B = I.slice(0, 5).map((Pe, ge) => x(Pe, ge)), X = O || null, q = X ? X.row : void 0, Y = C.value.renderedColumns.find((Pe) => Pe.key === "region") ?? C.value.renderedColumns[4] ?? null, J = O && O.kind !== "group" && Y ? p.value.readResolvedDisplayCell(O, Y) : null, le = O && O.kind !== "group" && Y ? p.value.renderResolvedCellContent(O, 1, Y, p.value.columnIndexByKey(Y.key)) : null, we = O ? {
|
|
2272
2272
|
exists: !0,
|
|
2273
2273
|
id: String(X?.rowId ?? X?.id ?? "none"),
|
|
2274
2274
|
keys: Object.keys(X ?? {}).slice(0, 16),
|
|
@@ -2341,7 +2341,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2341
2341
|
(...B) => z.value && z.value(...B)),
|
|
2342
2342
|
onKeydown: O[19] || (O[19] = H(
|
|
2343
2343
|
//@ts-ignore
|
|
2344
|
-
(...B) =>
|
|
2344
|
+
(...B) => _.value && _.value(...B),
|
|
2345
2345
|
["stop"]
|
|
2346
2346
|
))
|
|
2347
2347
|
}, [
|
|
@@ -2367,7 +2367,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2367
2367
|
class: "grid-column-spacer",
|
|
2368
2368
|
style: ae(m(p).spacerStyle(m(s).leftColumnSpacerWidth))
|
|
2369
2369
|
}, null, 4)) : te("", !0),
|
|
2370
|
-
(S(!0), D(fe, null, ke(
|
|
2370
|
+
(S(!0), D(fe, null, ke(M.value, ({ column: q, columnIndex: Y }) => (S(), D("div", {
|
|
2371
2371
|
key: `${String(B.rowId)}-${q.key}`,
|
|
2372
2372
|
class: ce(["grid-cell", [
|
|
2373
2373
|
"datagrid-stage__cell",
|
|
@@ -2413,8 +2413,8 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2413
2413
|
value: m(p).resolveSelectEditorValue(B, q),
|
|
2414
2414
|
options: m(p).resolveSelectEditorOptions(B, q),
|
|
2415
2415
|
"load-options": m(p).resolveSelectEditorOptionsLoader(B, q),
|
|
2416
|
-
"initial-filter": m(
|
|
2417
|
-
"open-on-mount": m(
|
|
2416
|
+
"initial-filter": m(P).editingCellInitialFilter,
|
|
2417
|
+
"open-on-mount": m(P).editingCellOpenOnMount,
|
|
2418
2418
|
onCommit: m(p).handleSelectEditorCommit,
|
|
2419
2419
|
onCancel: m(p).handleSelectEditorCancel,
|
|
2420
2420
|
onOptionsResolved: (J) => m(p).handleSelectEditorOptionsResolved(B, q, J)
|
|
@@ -2423,7 +2423,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2423
2423
|
class: "cell-editor-control cell-editor-input cell-editor-input--date",
|
|
2424
2424
|
name: `datagrid-cell-editor-${q.key}`,
|
|
2425
2425
|
type: m(p).resolveDateEditorInputType(B, q),
|
|
2426
|
-
value: m(
|
|
2426
|
+
value: m(P).editingCellValue,
|
|
2427
2427
|
autofocus: "",
|
|
2428
2428
|
onMousedown: O[2] || (O[2] = H(() => {
|
|
2429
2429
|
}, ["stop"])),
|
|
@@ -2444,7 +2444,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2444
2444
|
key: 3,
|
|
2445
2445
|
class: "cell-editor-control cell-editor-input",
|
|
2446
2446
|
name: `datagrid-cell-editor-${q.key}`,
|
|
2447
|
-
value: m(
|
|
2447
|
+
value: m(P).editingCellValue,
|
|
2448
2448
|
autofocus: "",
|
|
2449
2449
|
onMousedown: O[9] || (O[9] = H(() => {
|
|
2450
2450
|
}, ["stop"])),
|
|
@@ -2529,7 +2529,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2529
2529
|
tabindex: "-1",
|
|
2530
2530
|
onMousedown: w[0] || (w[0] = H(() => {
|
|
2531
2531
|
}, ["stop"])),
|
|
2532
|
-
onClick: w[1] || (w[1] = H((
|
|
2532
|
+
onClick: w[1] || (w[1] = H((P) => r("toggle", P), ["stop"]))
|
|
2533
2533
|
}, " v ", 40, Gd),
|
|
2534
2534
|
e.isOpen ? (S(), D("div", $d, [
|
|
2535
2535
|
N("button", {
|
|
@@ -2537,14 +2537,14 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2537
2537
|
class: ce(["grid-fill-action__item", { "grid-fill-action__item--active": u.value === "series" }]),
|
|
2538
2538
|
role: "menuitemradio",
|
|
2539
2539
|
"aria-checked": u.value === "series" ? "true" : "false",
|
|
2540
|
-
onClick: w[2] || (w[2] = H((
|
|
2540
|
+
onClick: w[2] || (w[2] = H((P) => s("series"), ["stop"]))
|
|
2541
2541
|
}, " Series ", 10, Kd),
|
|
2542
2542
|
N("button", {
|
|
2543
2543
|
type: "button",
|
|
2544
2544
|
class: ce(["grid-fill-action__item", { "grid-fill-action__item--active": u.value === "copy" }]),
|
|
2545
2545
|
role: "menuitemradio",
|
|
2546
2546
|
"aria-checked": u.value === "copy" ? "true" : "false",
|
|
2547
|
-
onClick: w[3] || (w[3] = H((
|
|
2547
|
+
onClick: w[3] || (w[3] = H((P) => s("copy"), ["stop"]))
|
|
2548
2548
|
}, " Copy ", 10, Nd)
|
|
2549
2549
|
])) : te("", !0)
|
|
2550
2550
|
], 4)) : te("", !0);
|
|
@@ -2567,7 +2567,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2567
2567
|
},
|
|
2568
2568
|
setup(e) {
|
|
2569
2569
|
const t = e, r = Ha(), d = On(), u = Wa(), s = za(), C = zn(), w = t.handleContextMenu;
|
|
2570
|
-
return (
|
|
2570
|
+
return (P, b) => (S(), D("div", {
|
|
2571
2571
|
class: ce(["grid-body-pane", [
|
|
2572
2572
|
e.pane.side === "left" ? "grid-body-pane--left" : "grid-body-pane--right",
|
|
2573
2573
|
m(d) === "auto-height" ? "grid-body-pane--layout-auto-height" : "grid-body-pane--layout-fill"
|
|
@@ -2576,7 +2576,7 @@ const Mo = ["data-datagrid-pivot-group-label", "data-datagrid-pivot-group-span",
|
|
|
2576
2576
|
onWheel: b[19] || (b[19] = //@ts-ignore
|
|
2577
2577
|
(...i) => e.renderApi.handleLinkedViewportWheel && e.renderApi.handleLinkedViewportWheel(...i))
|
|
2578
2578
|
}, [
|
|
2579
|
-
kr(
|
|
2579
|
+
kr(P.$slots, "chrome"),
|
|
2580
2580
|
Ye(Da, {
|
|
2581
2581
|
"layer-class": "grid-selection-overlay--pane-seam",
|
|
2582
2582
|
"selection-segments": e.pane.selectionSeamOverlaySegments,
|
|
@@ -4549,10 +4549,10 @@ body.datagrid-fill-drag-cursor * {
|
|
|
4549
4549
|
pointer-events: none;
|
|
4550
4550
|
z-index: 7;
|
|
4551
4551
|
background-image:
|
|
4552
|
-
repeating-linear-gradient(90deg, var(--
|
|
4553
|
-
repeating-linear-gradient(90deg, var(--
|
|
4554
|
-
repeating-linear-gradient(0deg, var(--datagrid-selection-copied-border) 0 6px, transparent 6px 12px),
|
|
4555
|
-
repeating-linear-gradient(0deg, var(--datagrid-selection-copied-border) 0 6px, transparent 6px 12px);
|
|
4552
|
+
repeating-linear-gradient(90deg, var(--clipboard-row-pending-top, transparent) 0 6px, transparent 6px 12px),
|
|
4553
|
+
repeating-linear-gradient(90deg, var(--clipboard-row-pending-bottom, transparent) 0 6px, transparent 6px 12px),
|
|
4554
|
+
repeating-linear-gradient(0deg, var(--clipboard-row-pending-left, var(--datagrid-selection-copied-border)) 0 6px, transparent 6px 12px),
|
|
4555
|
+
repeating-linear-gradient(0deg, var(--clipboard-row-pending-right, var(--datagrid-selection-copied-border)) 0 6px, transparent 6px 12px);
|
|
4556
4556
|
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
4557
4557
|
background-size:
|
|
4558
4558
|
calc(100% - 4px) 2px,
|
|
@@ -4564,13 +4564,27 @@ body.datagrid-fill-drag-cursor * {
|
|
|
4564
4564
|
2px calc(100% - 2px),
|
|
4565
4565
|
2px 2px,
|
|
4566
4566
|
calc(100% - 2px) 2px;
|
|
4567
|
-
box-shadow:
|
|
4568
|
-
0 0 0 1px var(--datagrid-selection-copied-contrast),
|
|
4569
|
-
0 0 0 2px var(--datagrid-selection-copied-glow);
|
|
4570
4567
|
border-radius: 2px;
|
|
4571
4568
|
animation: grid-clipboard-ants 0.7s linear infinite;
|
|
4572
4569
|
}
|
|
4573
4570
|
|
|
4571
|
+
.grid-row--clipboard-pending-top {
|
|
4572
|
+
--clipboard-row-pending-top: var(--datagrid-selection-copied-border);
|
|
4573
|
+
}
|
|
4574
|
+
|
|
4575
|
+
.grid-row--clipboard-pending-bottom {
|
|
4576
|
+
--clipboard-row-pending-bottom: var(--datagrid-selection-copied-border);
|
|
4577
|
+
}
|
|
4578
|
+
|
|
4579
|
+
.grid-body-pane--left .grid-row--clipboard-pending {
|
|
4580
|
+
--clipboard-row-pending-right: transparent;
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4583
|
+
.grid-body-viewport .grid-row--clipboard-pending,
|
|
4584
|
+
.grid-body-pane--right .grid-row--clipboard-pending {
|
|
4585
|
+
--clipboard-row-pending-left: transparent;
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4574
4588
|
.grid-spacer {
|
|
4575
4589
|
width: 1px;
|
|
4576
4590
|
}
|
|
@@ -6219,7 +6233,7 @@ function hs(e) {
|
|
|
6219
6233
|
}, w = (h, l) => {
|
|
6220
6234
|
const v = Ba(h, t.value);
|
|
6221
6235
|
return r.value = v, C(v, l), v;
|
|
6222
|
-
},
|
|
6236
|
+
}, P = o(() => uu(
|
|
6223
6237
|
e.runtime.virtualWindow.value,
|
|
6224
6238
|
r.value,
|
|
6225
6239
|
t.value
|
|
@@ -6255,7 +6269,7 @@ function hs(e) {
|
|
|
6255
6269
|
return e.runtime.getBodyRowAtIndex(v);
|
|
6256
6270
|
}, i = {
|
|
6257
6271
|
...e.runtime,
|
|
6258
|
-
virtualWindow:
|
|
6272
|
+
virtualWindow: P,
|
|
6259
6273
|
rowPartition: o(() => ({
|
|
6260
6274
|
...e.runtime.rowPartition.value,
|
|
6261
6275
|
bodyRowCount: t.value
|
|
@@ -6343,7 +6357,7 @@ function vu() {
|
|
|
6343
6357
|
d.push(r.totalMs), t.set(r.scope, d);
|
|
6344
6358
|
}
|
|
6345
6359
|
return Array.from(t.entries()).map(([r, d]) => {
|
|
6346
|
-
const u = [...d].sort((w,
|
|
6360
|
+
const u = [...d].sort((w, P) => w - P), s = u.reduce((w, P) => w + P, 0), C = Math.min(u.length - 1, Math.max(0, Math.ceil(u.length * 0.95) - 1));
|
|
6347
6361
|
return {
|
|
6348
6362
|
scope: r,
|
|
6349
6363
|
count: u.length,
|
|
@@ -6456,7 +6470,7 @@ function hu(e) {
|
|
|
6456
6470
|
const I = C(x, A);
|
|
6457
6471
|
return Array.isArray(I) ? I.map(Yr) : Ca(I) ? u(x, A.key) : [];
|
|
6458
6472
|
}
|
|
6459
|
-
function
|
|
6473
|
+
function P(x, A) {
|
|
6460
6474
|
if (x.kind === "group")
|
|
6461
6475
|
return;
|
|
6462
6476
|
const I = C(x, A);
|
|
@@ -6522,7 +6536,7 @@ function hu(e) {
|
|
|
6522
6536
|
const we = I.column.groupCellRenderer ?? I.column.cellRenderer;
|
|
6523
6537
|
if (typeof we != "function")
|
|
6524
6538
|
return B;
|
|
6525
|
-
const Re = x,
|
|
6539
|
+
const Re = x, Pe = Number.isFinite(x.groupMeta?.childrenCount) ? Math.max(0, Math.trunc(x.groupMeta?.childrenCount)) : 0, ge = Ci(Re);
|
|
6526
6540
|
return we({
|
|
6527
6541
|
row: void 0,
|
|
6528
6542
|
rowNode: Re,
|
|
@@ -6537,7 +6551,7 @@ function hu(e) {
|
|
|
6537
6551
|
key: x.groupMeta?.groupKey ?? String(x.rowId ?? ""),
|
|
6538
6552
|
field: String(x.groupMeta?.groupField ?? "group"),
|
|
6539
6553
|
value: String(x.groupMeta?.groupValue ?? x.rowId ?? ""),
|
|
6540
|
-
childrenCount:
|
|
6554
|
+
childrenCount: Pe,
|
|
6541
6555
|
isLabelColumn: e.mode.value === "tree" ? I.key === "name" : I.key === (e.visibleColumns.value[0]?.key ?? "name"),
|
|
6542
6556
|
renderMeta: {
|
|
6543
6557
|
...ge,
|
|
@@ -6593,7 +6607,7 @@ function hu(e) {
|
|
|
6593
6607
|
function $() {
|
|
6594
6608
|
e.editing.value.cancelInlineEdit();
|
|
6595
6609
|
}
|
|
6596
|
-
function
|
|
6610
|
+
function _(x, A = "stay") {
|
|
6597
6611
|
e.editing.value.updateEditingCellValue(x), e.editing.value.commitInlineEdit(A);
|
|
6598
6612
|
}
|
|
6599
6613
|
function z() {
|
|
@@ -6602,14 +6616,14 @@ function hu(e) {
|
|
|
6602
6616
|
function G(x) {
|
|
6603
6617
|
e.editing.value.updateEditingCellValue(x);
|
|
6604
6618
|
}
|
|
6605
|
-
function
|
|
6619
|
+
function M(x) {
|
|
6606
6620
|
e.editing.value.handleEditorKeydown(x);
|
|
6607
6621
|
}
|
|
6608
6622
|
return {
|
|
6609
6623
|
startInlineEditIfAllowed: U,
|
|
6610
6624
|
resolveCellEditorMode: r,
|
|
6611
6625
|
resolveSelectEditorOptions: w,
|
|
6612
|
-
resolveSelectEditorOptionsLoader:
|
|
6626
|
+
resolveSelectEditorOptionsLoader: P,
|
|
6613
6627
|
handleSelectEditorOptionsResolved: b,
|
|
6614
6628
|
readResolvedDisplayCell: i,
|
|
6615
6629
|
renderResolvedCellContent: l,
|
|
@@ -6620,10 +6634,10 @@ function hu(e) {
|
|
|
6620
6634
|
isTextEditorCell: ee,
|
|
6621
6635
|
handleSelectEditorCommit: L,
|
|
6622
6636
|
handleSelectEditorCancel: $,
|
|
6623
|
-
handleDateEditorChange:
|
|
6637
|
+
handleDateEditorChange: _,
|
|
6624
6638
|
handleTextEditorBlur: z,
|
|
6625
6639
|
updateEditingCellValue: G,
|
|
6626
|
-
handleEditorKeydown:
|
|
6640
|
+
handleEditorKeydown: M
|
|
6627
6641
|
};
|
|
6628
6642
|
}
|
|
6629
6643
|
function fu(e) {
|
|
@@ -6685,7 +6699,7 @@ function bu(e) {
|
|
|
6685
6699
|
function w(h, l, v, R) {
|
|
6686
6700
|
return xr(e, h, l, v, R)?.label;
|
|
6687
6701
|
}
|
|
6688
|
-
function
|
|
6702
|
+
function P(h, l, v, R) {
|
|
6689
6703
|
return xr(e, h, l, v, R)?.disabled ? "true" : void 0;
|
|
6690
6704
|
}
|
|
6691
6705
|
function b(h, l) {
|
|
@@ -6705,7 +6719,7 @@ function bu(e) {
|
|
|
6705
6719
|
cellAriaChecked: s,
|
|
6706
6720
|
cellAriaPressed: C,
|
|
6707
6721
|
cellAriaLabel: w,
|
|
6708
|
-
cellAriaDisabled:
|
|
6722
|
+
cellAriaDisabled: P,
|
|
6709
6723
|
isRowSelectionColumn: gn,
|
|
6710
6724
|
shouldRenderCheckboxCell: t,
|
|
6711
6725
|
checkboxIndicatorClass: b,
|
|
@@ -6722,10 +6736,10 @@ function wu(e) {
|
|
|
6722
6736
|
const b = e.selection.value?.fillActionAnchorCell;
|
|
6723
6737
|
if (!b)
|
|
6724
6738
|
return null;
|
|
6725
|
-
const i = e.resolveViewportRowStart(), h = e.resolveViewportRowStart() + Math.max(0, e.displayRows.value.length - 1), l = e.selectionRange.value, v = l ? Math.min(l.startRow, l.endRow) : b.rowIndex, R = l ? Math.max(l.startRow, l.endRow) : b.rowIndex, W = l ? Math.min(l.startColumn, l.endColumn) : b.columnIndex, p = l ? Math.max(l.startColumn, l.endColumn) : b.columnIndex, ee = Math.max(v, i), U = Math.min(R, h), L = ee <= U ? rr(b.rowIndex, ee, U) : b.rowIndex, $ = new Set((e.renderedColumns.value ?? []).map((G) => G.key)),
|
|
6739
|
+
const i = e.resolveViewportRowStart(), h = e.resolveViewportRowStart() + Math.max(0, e.displayRows.value.length - 1), l = e.selectionRange.value, v = l ? Math.min(l.startRow, l.endRow) : b.rowIndex, R = l ? Math.max(l.startRow, l.endRow) : b.rowIndex, W = l ? Math.min(l.startColumn, l.endColumn) : b.columnIndex, p = l ? Math.max(l.startColumn, l.endColumn) : b.columnIndex, ee = Math.max(v, i), U = Math.min(R, h), L = ee <= U ? rr(b.rowIndex, ee, U) : b.rowIndex, $ = new Set((e.renderedColumns.value ?? []).map((G) => G.key)), _ = e.visibleColumns.value.map((G, M) => ({ column: G, columnIndex: M })).filter(({ column: G, columnIndex: M }) => M < W || M > p ? !1 : G.pin === "left" || G.pin === "right" || $.has(G.key)).map(({ columnIndex: G }) => G), z = _.length > 0 ? rr(
|
|
6726
6740
|
b.columnIndex,
|
|
6727
|
-
|
|
6728
|
-
|
|
6741
|
+
_[0] ?? b.columnIndex,
|
|
6742
|
+
_[_.length - 1] ?? b.columnIndex
|
|
6729
6743
|
) : b.columnIndex;
|
|
6730
6744
|
return e.isVisibleCellEditableByAbsoluteCoord(L, z) ? {
|
|
6731
6745
|
rowIndex: L,
|
|
@@ -6826,7 +6840,7 @@ function wu(e) {
|
|
|
6826
6840
|
function w(b) {
|
|
6827
6841
|
s.value && (b.preventDefault(), b.stopPropagation(), C(), t.value = !t.value);
|
|
6828
6842
|
}
|
|
6829
|
-
function
|
|
6843
|
+
function P() {
|
|
6830
6844
|
t.value = !1, C();
|
|
6831
6845
|
}
|
|
6832
6846
|
return Ge(
|
|
@@ -6855,7 +6869,7 @@ function wu(e) {
|
|
|
6855
6869
|
floatingFillActionStyle: s,
|
|
6856
6870
|
focusFillActionAnchorCell: C,
|
|
6857
6871
|
toggleFloatingFillActionMenu: w,
|
|
6858
|
-
handleFillActionSelection:
|
|
6872
|
+
handleFillActionSelection: P
|
|
6859
6873
|
};
|
|
6860
6874
|
}
|
|
6861
6875
|
function xu(e, t, r, d) {
|
|
@@ -6869,8 +6883,8 @@ function xu(e, t, r, d) {
|
|
|
6869
6883
|
return null;
|
|
6870
6884
|
}
|
|
6871
6885
|
function Cu(e) {
|
|
6872
|
-
function t(w,
|
|
6873
|
-
const b = `.grid-cell[data-row-index="${w}"][data-column-index="${
|
|
6886
|
+
function t(w, P) {
|
|
6887
|
+
const b = `.grid-cell[data-row-index="${w}"][data-column-index="${P}"]`;
|
|
6874
6888
|
for (const i of [
|
|
6875
6889
|
e.leftPaneContentRef.value,
|
|
6876
6890
|
e.bodyViewportEl.value,
|
|
@@ -6885,7 +6899,7 @@ function Cu(e) {
|
|
|
6885
6899
|
return null;
|
|
6886
6900
|
}
|
|
6887
6901
|
function r(w) {
|
|
6888
|
-
const
|
|
6902
|
+
const P = `.grid-row[data-row-index="${w}"]`;
|
|
6889
6903
|
for (const b of [
|
|
6890
6904
|
e.leftPaneContentRef.value,
|
|
6891
6905
|
e.bodyViewportEl.value,
|
|
@@ -6893,7 +6907,7 @@ function Cu(e) {
|
|
|
6893
6907
|
e.leftBottomPaneContentRef.value,
|
|
6894
6908
|
e.rightBottomPaneContentRef.value
|
|
6895
6909
|
]) {
|
|
6896
|
-
const i = b?.querySelector(
|
|
6910
|
+
const i = b?.querySelector(P);
|
|
6897
6911
|
if (i)
|
|
6898
6912
|
return i;
|
|
6899
6913
|
}
|
|
@@ -6902,10 +6916,10 @@ function Cu(e) {
|
|
|
6902
6916
|
function d(w) {
|
|
6903
6917
|
if (!w)
|
|
6904
6918
|
return null;
|
|
6905
|
-
const
|
|
6906
|
-
if (!
|
|
6919
|
+
const P = t(w.rowIndex, w.columnIndex), b = e.bodyShellRef.value?.getBoundingClientRect();
|
|
6920
|
+
if (!P || !b)
|
|
6907
6921
|
return null;
|
|
6908
|
-
const i =
|
|
6922
|
+
const i = P.getBoundingClientRect();
|
|
6909
6923
|
return {
|
|
6910
6924
|
left: i.left - b.left,
|
|
6911
6925
|
right: i.right - b.left,
|
|
@@ -6913,9 +6927,9 @@ function Cu(e) {
|
|
|
6913
6927
|
bottom: i.bottom - b.top
|
|
6914
6928
|
};
|
|
6915
6929
|
}
|
|
6916
|
-
function u(w,
|
|
6917
|
-
const b = w - e.viewportRowStart.value, i = e.displayRows.value[b], h = e.visibleColumns.value[
|
|
6918
|
-
return b < 0 || !i || !h ? !1 : e.isCellEditableSafe(i, b, h,
|
|
6930
|
+
function u(w, P) {
|
|
6931
|
+
const b = w - e.viewportRowStart.value, i = e.displayRows.value[b], h = e.visibleColumns.value[P];
|
|
6932
|
+
return b < 0 || !i || !h ? !1 : e.isCellEditableSafe(i, b, h, P);
|
|
6919
6933
|
}
|
|
6920
6934
|
function s() {
|
|
6921
6935
|
const w = xu(
|
|
@@ -6928,9 +6942,9 @@ function Cu(e) {
|
|
|
6928
6942
|
e.bodyViewportEl.value?.focus({ preventScroll: !0 });
|
|
6929
6943
|
return;
|
|
6930
6944
|
}
|
|
6931
|
-
const
|
|
6932
|
-
if (
|
|
6933
|
-
|
|
6945
|
+
const P = t(w.rowIndex, w.columnIndex);
|
|
6946
|
+
if (P) {
|
|
6947
|
+
P.focus({ preventScroll: !0 });
|
|
6934
6948
|
return;
|
|
6935
6949
|
}
|
|
6936
6950
|
e.bodyViewportEl.value?.focus({ preventScroll: !0 });
|
|
@@ -6984,8 +6998,8 @@ function ku(e) {
|
|
|
6984
6998
|
Math.floor(U.width / 2),
|
|
6985
6999
|
Math.floor(U.height / 2)
|
|
6986
7000
|
)
|
|
6987
|
-
), $ = l.clientX - U.left,
|
|
6988
|
-
return
|
|
7001
|
+
), $ = l.clientX - U.left, _ = l.clientY - U.top;
|
|
7002
|
+
return _ <= L && e.isCellOnSelectionEdgeSafe(v, R, "top") || U.height - _ <= L && e.isCellOnSelectionEdgeSafe(v, R, "bottom") || $ <= L && e.isCellOnSelectionEdgeSafe(v, R, "left") || U.width - $ <= L && e.isCellOnSelectionEdgeSafe(v, R, "right");
|
|
6989
7003
|
}
|
|
6990
7004
|
function w(l, v, R) {
|
|
6991
7005
|
if (e.selection.value?.isFillDragging || e.selection.value?.rangeMoveEnabled !== !0) {
|
|
@@ -7001,7 +7015,7 @@ function ku(e) {
|
|
|
7001
7015
|
}
|
|
7002
7016
|
s();
|
|
7003
7017
|
}
|
|
7004
|
-
function
|
|
7018
|
+
function P(l) {
|
|
7005
7019
|
e.fillActionMenuOpen.value = !1, (l.currentTarget instanceof HTMLElement ? l.currentTarget : null)?.closest(".grid-cell")?.focus({ preventScroll: !0 }), e.selection.value?.startFillHandleDrag(l);
|
|
7006
7020
|
}
|
|
7007
7021
|
function b(l) {
|
|
@@ -7026,7 +7040,7 @@ function ku(e) {
|
|
|
7026
7040
|
clearRangeMoveHandleHover: s,
|
|
7027
7041
|
isRangeMoveHandleHoverCell: i,
|
|
7028
7042
|
handleCellMouseMove: w,
|
|
7029
|
-
handleFillHandleMouseDown:
|
|
7043
|
+
handleFillHandleMouseDown: P,
|
|
7030
7044
|
handleFillHandleDoubleClick: b,
|
|
7031
7045
|
resetGlobalFillDragCursor: h
|
|
7032
7046
|
};
|
|
@@ -7039,14 +7053,14 @@ function Ru(e, t) {
|
|
|
7039
7053
|
}
|
|
7040
7054
|
function _u(e) {
|
|
7041
7055
|
function t(L, $) {
|
|
7042
|
-
const
|
|
7043
|
-
return !!(
|
|
7056
|
+
const _ = Ru(e.selection, e.selectionRange);
|
|
7057
|
+
return !!(_ && e.viewportRowStart.value + L === _.rowIndex && $ === _.columnIndex);
|
|
7044
7058
|
}
|
|
7045
7059
|
function r(L, $) {
|
|
7046
7060
|
if (!e.isCellSelectedSafe(L, $) || t(L, $))
|
|
7047
7061
|
return !1;
|
|
7048
|
-
const
|
|
7049
|
-
return
|
|
7062
|
+
const _ = e.selectionRange.value;
|
|
7063
|
+
return _ ? e.selectionRanges.value.length > 1 || !(_.startRow === _.endRow && _.startColumn === _.endColumn) : !0;
|
|
7050
7064
|
}
|
|
7051
7065
|
function d(L) {
|
|
7052
7066
|
return L.column.meta?.rowSelection === !0;
|
|
@@ -7054,42 +7068,42 @@ function _u(e) {
|
|
|
7054
7068
|
function u(L, $) {
|
|
7055
7069
|
if (t(L, $))
|
|
7056
7070
|
return !0;
|
|
7057
|
-
const
|
|
7058
|
-
return typeof
|
|
7071
|
+
const _ = e.cells.value.isSelectionAnchorCell;
|
|
7072
|
+
return typeof _ == "function" ? _(L, $) : !1;
|
|
7059
7073
|
}
|
|
7060
7074
|
function s(L, $) {
|
|
7061
|
-
const
|
|
7062
|
-
return typeof
|
|
7075
|
+
const _ = e.cells.value.isCellInFillPreview;
|
|
7076
|
+
return typeof _ == "function" ? _(L, $) : !1;
|
|
7063
7077
|
}
|
|
7064
7078
|
function C(L, $) {
|
|
7065
|
-
const
|
|
7066
|
-
return typeof
|
|
7079
|
+
const _ = e.cells.value.isCellInPendingClipboardRange;
|
|
7080
|
+
return typeof _ == "function" ? _(L, $) : !1;
|
|
7067
7081
|
}
|
|
7068
|
-
function w(L, $,
|
|
7082
|
+
function w(L, $, _) {
|
|
7069
7083
|
const z = e.cells.value.isCellOnPendingClipboardEdge;
|
|
7070
|
-
return typeof z == "function" ? z(L, $,
|
|
7084
|
+
return typeof z == "function" ? z(L, $, _) : !1;
|
|
7071
7085
|
}
|
|
7072
|
-
function
|
|
7086
|
+
function P(L, $, _) {
|
|
7073
7087
|
const z = e.cells.value.isCellOnSelectionEdge;
|
|
7074
|
-
return typeof z == "function" ? z(L, $,
|
|
7088
|
+
return typeof z == "function" ? z(L, $, _) : !1;
|
|
7075
7089
|
}
|
|
7076
7090
|
function b(L, $) {
|
|
7077
|
-
const
|
|
7078
|
-
return typeof
|
|
7091
|
+
const _ = e.selection.value?.isFillHandleCell;
|
|
7092
|
+
return typeof _ == "function" ? _(L, $) : !1;
|
|
7079
7093
|
}
|
|
7080
7094
|
function i(L, $) {
|
|
7081
7095
|
return e.isEditingCellSafe(L, $);
|
|
7082
7096
|
}
|
|
7083
|
-
function h(L, $,
|
|
7084
|
-
return e.isCellEditableSafe(L, $,
|
|
7097
|
+
function h(L, $, _, z) {
|
|
7098
|
+
return e.isCellEditableSafe(L, $, _, z);
|
|
7085
7099
|
}
|
|
7086
7100
|
function l(L, $) {
|
|
7087
|
-
const
|
|
7088
|
-
return
|
|
7101
|
+
const _ = L - e.viewportRowStart.value, z = e.displayRows.value[_], G = e.visibleColumns.value[$];
|
|
7102
|
+
return _ < 0 || !z || !G ? !1 : h(z, _, G, $);
|
|
7089
7103
|
}
|
|
7090
|
-
function v(L, $,
|
|
7104
|
+
function v(L, $, _ = {}) {
|
|
7091
7105
|
let z = null;
|
|
7092
|
-
return e.isHoveredRow(L, $) ? z = "var(--datagrid-row-band-hover-bg)" : e.isStripedRow(L, $) && (z = "var(--datagrid-row-band-striped-bg)"), z ?
|
|
7106
|
+
return e.isHoveredRow(L, $) ? z = "var(--datagrid-row-band-hover-bg)" : e.isStripedRow(L, $) && (z = "var(--datagrid-row-band-striped-bg)"), z ? _.fullBleed === !0 ? {
|
|
7093
7107
|
backgroundImage: `linear-gradient(${z}, ${z})`,
|
|
7094
7108
|
backgroundSize: "100% calc(100% - var(--datagrid-row-divider-size))",
|
|
7095
7109
|
backgroundPosition: "top left",
|
|
@@ -7102,28 +7116,32 @@ function _u(e) {
|
|
|
7102
7116
|
} : null;
|
|
7103
7117
|
}
|
|
7104
7118
|
function R(L, $) {
|
|
7119
|
+
const _ = e.rows.value.isRowInPendingClipboardCut?.(L) === !0, z = e.displayRows.value[$ - 1], G = e.displayRows.value[$ + 1], M = z ? e.rows.value.isRowInPendingClipboardCut?.(z) === !0 : !1, x = G ? e.rows.value.isRowInPendingClipboardCut?.(G) === !0 : !1;
|
|
7105
7120
|
return {
|
|
7106
7121
|
"grid-row--hoverable": e.rows.value.rowHover === !0,
|
|
7107
7122
|
"grid-row--hovered": e.isHoveredRow(L, $),
|
|
7108
7123
|
"grid-row--striped": e.isStripedRow(L, $),
|
|
7109
7124
|
"grid-row--group-explicit-trigger": L.kind === "group" && e.hasExplicitGroupCellRenderer.value,
|
|
7110
|
-
"grid-row--clipboard-pending":
|
|
7125
|
+
"grid-row--clipboard-pending": _,
|
|
7126
|
+
"grid-row--clipboard-pending-top": _ && !M,
|
|
7127
|
+
"grid-row--clipboard-pending-middle": _ && M && x,
|
|
7128
|
+
"grid-row--clipboard-pending-bottom": _ && !x,
|
|
7111
7129
|
"grid-row--focused": typeof e.rows.value.isRowFocused == "function" ? e.rows.value.isRowFocused(L) : !1,
|
|
7112
7130
|
"grid-row--checkbox-selected": typeof e.rows.value.isRowCheckboxSelected == "function" ? e.rows.value.isRowCheckboxSelected(L) : !1
|
|
7113
7131
|
};
|
|
7114
7132
|
}
|
|
7115
|
-
function W(L, $,
|
|
7116
|
-
if (t(
|
|
7133
|
+
function W(L, $, _, z) {
|
|
7134
|
+
if (t(_, z))
|
|
7117
7135
|
return $.pin === "left" ? { background: "var(--datagrid-pinned-left-bg)" } : $.pin === "right" ? { background: "var(--datagrid-pinned-right-bg)" } : { background: "var(--datagrid-row-background-color)" };
|
|
7118
|
-
if (r(
|
|
7136
|
+
if (r(_, z))
|
|
7119
7137
|
return { background: "var(--datagrid-selection-range-bg)" };
|
|
7120
|
-
const G = v(L,
|
|
7138
|
+
const G = v(L, _, {
|
|
7121
7139
|
fullBleed: $.pin === "left" || $.pin === "right"
|
|
7122
7140
|
});
|
|
7123
7141
|
return G || {};
|
|
7124
7142
|
}
|
|
7125
|
-
function p(L, $,
|
|
7126
|
-
if ($.kind === "group" || e.resolveCellEditorMode($,
|
|
7143
|
+
function p(L, $, _) {
|
|
7144
|
+
if ($.kind === "group" || e.resolveCellEditorMode($, _) !== "select")
|
|
7127
7145
|
return !1;
|
|
7128
7146
|
const z = L.currentTarget instanceof HTMLElement ? L.currentTarget : null;
|
|
7129
7147
|
if (!z)
|
|
@@ -7131,27 +7149,27 @@ function _u(e) {
|
|
|
7131
7149
|
const G = z.getBoundingClientRect();
|
|
7132
7150
|
if (G.width <= 0)
|
|
7133
7151
|
return !1;
|
|
7134
|
-
const
|
|
7135
|
-
return
|
|
7152
|
+
const M = L.clientX - G.left, x = Math.min(24, Math.max(16, Math.floor(G.width * 0.22)));
|
|
7153
|
+
return M >= G.width - x;
|
|
7136
7154
|
}
|
|
7137
|
-
function ee(L, $,
|
|
7138
|
-
const z = $.kind === "group" ? "none" : e.resolveCellEditorMode($,
|
|
7155
|
+
function ee(L, $, _) {
|
|
7156
|
+
const z = $.kind === "group" ? "none" : e.resolveCellEditorMode($, _);
|
|
7139
7157
|
if (z !== "date" && z !== "datetime")
|
|
7140
7158
|
return !1;
|
|
7141
7159
|
const G = L.currentTarget instanceof HTMLElement ? L.currentTarget : null;
|
|
7142
7160
|
if (!G)
|
|
7143
7161
|
return !1;
|
|
7144
|
-
const
|
|
7145
|
-
if (
|
|
7162
|
+
const M = G.getBoundingClientRect();
|
|
7163
|
+
if (M.width <= 0)
|
|
7146
7164
|
return !1;
|
|
7147
|
-
const x = L.clientX -
|
|
7148
|
-
return x >=
|
|
7165
|
+
const x = L.clientX - M.left, A = Math.min(24, Math.max(16, Math.floor(M.width * 0.22)));
|
|
7166
|
+
return x >= M.width - A;
|
|
7149
7167
|
}
|
|
7150
|
-
function U(L, $,
|
|
7168
|
+
function U(L, $, _, z, G) {
|
|
7151
7169
|
if (d(z)) {
|
|
7152
7170
|
if ($.kind === "group")
|
|
7153
7171
|
return;
|
|
7154
|
-
e.handleCellClick($,
|
|
7172
|
+
e.handleCellClick($, _, z, G);
|
|
7155
7173
|
return;
|
|
7156
7174
|
}
|
|
7157
7175
|
if ($.kind === "group") {
|
|
@@ -7159,10 +7177,10 @@ function _u(e) {
|
|
|
7159
7177
|
return;
|
|
7160
7178
|
}
|
|
7161
7179
|
if (!i($, z.key) && (p(L, $, z) || ee(L, $, z))) {
|
|
7162
|
-
e.startInlineEditIfAllowed($, z,
|
|
7180
|
+
e.startInlineEditIfAllowed($, z, _);
|
|
7163
7181
|
return;
|
|
7164
7182
|
}
|
|
7165
|
-
e.handleCellClick($,
|
|
7183
|
+
e.handleCellClick($, _, z, G);
|
|
7166
7184
|
}
|
|
7167
7185
|
return {
|
|
7168
7186
|
rowStateClasses: R,
|
|
@@ -7175,7 +7193,7 @@ function _u(e) {
|
|
|
7175
7193
|
isCellInFillPreviewSafe: s,
|
|
7176
7194
|
isCellInPendingClipboardRangeSafe: C,
|
|
7177
7195
|
isCellOnPendingClipboardEdgeSafe: w,
|
|
7178
|
-
isCellOnSelectionEdgeSafe:
|
|
7196
|
+
isCellOnSelectionEdgeSafe: P,
|
|
7179
7197
|
isFillHandleCellSafe: b,
|
|
7180
7198
|
isVisibleCellEditableByAbsoluteCoord: l,
|
|
7181
7199
|
isCellEditableSafe: h,
|
|
@@ -7197,100 +7215,100 @@ function Mu(e, t, r, d, u = {}) {
|
|
|
7197
7215
|
backgroundRepeat: "no-repeat"
|
|
7198
7216
|
} : null;
|
|
7199
7217
|
}
|
|
7200
|
-
function
|
|
7218
|
+
function Pu(e, t) {
|
|
7201
7219
|
const r = Number.parseFloat(String(e ?? ""));
|
|
7202
7220
|
return Number.isFinite(r) ? r : t;
|
|
7203
7221
|
}
|
|
7204
|
-
function
|
|
7222
|
+
function Eu(e) {
|
|
7205
7223
|
const t = Z(null), r = Z(null), d = Z(null), u = o(() => e.rows.value.showRowIndex !== !1), s = o(() => {
|
|
7206
7224
|
if (!u.value)
|
|
7207
7225
|
return 0;
|
|
7208
|
-
const
|
|
7226
|
+
const _ = Pu(
|
|
7209
7227
|
e.layout.value.indexColumnStyle.width ?? e.layout.value.indexColumnStyle.minWidth,
|
|
7210
7228
|
vn
|
|
7211
7229
|
);
|
|
7212
|
-
return
|
|
7230
|
+
return _ > 0 ? _ : vn;
|
|
7213
7231
|
}), C = o(() => {
|
|
7214
|
-
const
|
|
7232
|
+
const _ = `${s.value}px`;
|
|
7215
7233
|
return {
|
|
7216
7234
|
...e.layout.value.indexColumnStyle,
|
|
7217
|
-
width:
|
|
7218
|
-
minWidth:
|
|
7219
|
-
maxWidth:
|
|
7235
|
+
width: _,
|
|
7236
|
+
minWidth: _,
|
|
7237
|
+
maxWidth: _
|
|
7220
7238
|
};
|
|
7221
7239
|
});
|
|
7222
|
-
function w(
|
|
7223
|
-
e.rows.value.handleRowClick?.(
|
|
7240
|
+
function w(_) {
|
|
7241
|
+
e.rows.value.handleRowClick?.(_);
|
|
7224
7242
|
}
|
|
7225
|
-
function
|
|
7243
|
+
function P(_, z, G) {
|
|
7226
7244
|
if (e.rows.value.consumeRecentRowResizeInteraction?.() === !0)
|
|
7227
7245
|
return;
|
|
7228
|
-
(G.currentTarget instanceof HTMLElement ? G.currentTarget : null)?.focus({ preventScroll: !0 }), e.rows.value.handleRowIndexClick?.(
|
|
7246
|
+
(G.currentTarget instanceof HTMLElement ? G.currentTarget : null)?.focus({ preventScroll: !0 }), e.rows.value.handleRowIndexClick?.(_, z, G.shiftKey);
|
|
7229
7247
|
}
|
|
7230
|
-
function b(
|
|
7231
|
-
e.rows.value.handleRowIndexKeydown?.(
|
|
7248
|
+
function b(_, z, G) {
|
|
7249
|
+
e.rows.value.handleRowIndexKeydown?.(_, z, G);
|
|
7232
7250
|
}
|
|
7233
|
-
function i(
|
|
7234
|
-
return typeof e.rows.value.isRowFocused == "function" && e.rows.value.isRowFocused(
|
|
7251
|
+
function i(_) {
|
|
7252
|
+
return typeof e.rows.value.isRowFocused == "function" && e.rows.value.isRowFocused(_) ? 0 : -1;
|
|
7235
7253
|
}
|
|
7236
|
-
function h(
|
|
7254
|
+
function h(_) {
|
|
7237
7255
|
const z = e.selectionRange.value, G = e.visibleColumns.value.length - 1;
|
|
7238
|
-
return !z || G < 0 ? !1 :
|
|
7256
|
+
return !z || G < 0 ? !1 : _ >= z.startRow && _ <= z.endRow && z.startColumn === 0 && z.endColumn >= G;
|
|
7239
7257
|
}
|
|
7240
|
-
function l(
|
|
7241
|
-
const G = z ? e.resolveAbsoluteRowIndex(z,
|
|
7258
|
+
function l(_, z) {
|
|
7259
|
+
const G = z ? e.resolveAbsoluteRowIndex(z, _) : e.viewportRowStart.value + _;
|
|
7242
7260
|
return h(G);
|
|
7243
7261
|
}
|
|
7244
|
-
function v(
|
|
7245
|
-
return typeof e.rows.value.reorderRowsByIndex == "function" &&
|
|
7262
|
+
function v(_) {
|
|
7263
|
+
return typeof e.rows.value.reorderRowsByIndex == "function" && _.kind !== "group" && _.rowId != null && _.state.pinned === "none" && !e.isDataGridPlaceholderSurfaceRow(_);
|
|
7246
7264
|
}
|
|
7247
|
-
function R(
|
|
7248
|
-
const G = (
|
|
7249
|
-
return !G || G.height <= 0 ? "after" :
|
|
7265
|
+
function R(_) {
|
|
7266
|
+
const G = (_.currentTarget instanceof HTMLElement ? _.currentTarget : null)?.getBoundingClientRect();
|
|
7267
|
+
return !G || G.height <= 0 ? "after" : _.clientY < G.top + G.height / 2 ? "before" : "after";
|
|
7250
7268
|
}
|
|
7251
7269
|
function W() {
|
|
7252
7270
|
t.value = null, r.value = null, d.value = null;
|
|
7253
7271
|
}
|
|
7254
|
-
function p(
|
|
7272
|
+
function p(_, z, G) {
|
|
7255
7273
|
if (!v(z)) {
|
|
7256
7274
|
W();
|
|
7257
7275
|
return;
|
|
7258
7276
|
}
|
|
7259
|
-
t.value = String(z.rowId), r.value = null, d.value = null,
|
|
7277
|
+
t.value = String(z.rowId), r.value = null, d.value = null, _.dataTransfer && (_.dataTransfer.effectAllowed = "move", _.dataTransfer.dropEffect = "move", _.dataTransfer.setData("text/plain", `${String(z.rowId)}:${e.resolveAbsoluteRowIndex(z, G)}`));
|
|
7260
7278
|
}
|
|
7261
|
-
function ee(
|
|
7279
|
+
function ee(_, z, G) {
|
|
7262
7280
|
if (!t.value || !v(z)) {
|
|
7263
7281
|
r.value = null, d.value = null;
|
|
7264
7282
|
return;
|
|
7265
7283
|
}
|
|
7266
|
-
const
|
|
7267
|
-
if (t.value ===
|
|
7284
|
+
const M = String(z.rowId);
|
|
7285
|
+
if (t.value === M) {
|
|
7268
7286
|
r.value = null, d.value = null;
|
|
7269
7287
|
return;
|
|
7270
7288
|
}
|
|
7271
|
-
|
|
7289
|
+
_.preventDefault(), _.dataTransfer && (_.dataTransfer.dropEffect = "move"), r.value = M, d.value = R(_);
|
|
7272
7290
|
}
|
|
7273
|
-
function U(
|
|
7291
|
+
function U(_, z, G) {
|
|
7274
7292
|
if (!t.value || !v(z)) {
|
|
7275
7293
|
W();
|
|
7276
7294
|
return;
|
|
7277
7295
|
}
|
|
7278
|
-
const
|
|
7279
|
-
if (t.value ===
|
|
7296
|
+
const M = String(z.rowId);
|
|
7297
|
+
if (t.value === M) {
|
|
7280
7298
|
W();
|
|
7281
7299
|
return;
|
|
7282
7300
|
}
|
|
7283
|
-
|
|
7301
|
+
_.preventDefault(), e.rows.value.reorderRowsByIndex?.({
|
|
7284
7302
|
sourceRowId: t.value,
|
|
7285
|
-
targetRowId:
|
|
7286
|
-
placement: R(
|
|
7303
|
+
targetRowId: M,
|
|
7304
|
+
placement: R(_)
|
|
7287
7305
|
}), W();
|
|
7288
7306
|
}
|
|
7289
|
-
function L(
|
|
7307
|
+
function L(_, z) {
|
|
7290
7308
|
const G = Mu(
|
|
7291
7309
|
e.isHoveredRow,
|
|
7292
7310
|
e.isStripedRow,
|
|
7293
|
-
|
|
7311
|
+
_,
|
|
7294
7312
|
z,
|
|
7295
7313
|
{ fullBleed: !0 }
|
|
7296
7314
|
);
|
|
@@ -7299,11 +7317,11 @@ function Pu(e) {
|
|
|
7299
7317
|
...G
|
|
7300
7318
|
} : C.value;
|
|
7301
7319
|
}
|
|
7302
|
-
function $(
|
|
7303
|
-
const G = e.resolveAbsoluteRowIndex(
|
|
7304
|
-
"grid-cell--index-reorder-source":
|
|
7305
|
-
"grid-cell--index-drop-before":
|
|
7306
|
-
"grid-cell--index-drop-after":
|
|
7320
|
+
function $(_, z) {
|
|
7321
|
+
const G = e.resolveAbsoluteRowIndex(_, z), M = _.rowId == null ? null : String(_.rowId), x = {
|
|
7322
|
+
"grid-cell--index-reorder-source": M != null && t.value === M,
|
|
7323
|
+
"grid-cell--index-drop-before": M != null && r.value === M && d.value === "before",
|
|
7324
|
+
"grid-cell--index-drop-after": M != null && r.value === M && d.value === "after"
|
|
7307
7325
|
};
|
|
7308
7326
|
if (!h(G))
|
|
7309
7327
|
return x;
|
|
@@ -7327,7 +7345,7 @@ function Pu(e) {
|
|
|
7327
7345
|
isFullRowSelectionSafe: l,
|
|
7328
7346
|
isRowIndexDraggable: v,
|
|
7329
7347
|
handleRowClickSafe: w,
|
|
7330
|
-
handleRowIndexClickSafe:
|
|
7348
|
+
handleRowIndexClickSafe: P,
|
|
7331
7349
|
handleRowIndexKeydownSafe: b,
|
|
7332
7350
|
handleRowIndexDragStart: p,
|
|
7333
7351
|
handleRowIndexDragOver: ee,
|
|
@@ -7351,9 +7369,9 @@ function jn(e) {
|
|
|
7351
7369
|
const r = () => e.resolveScrollContainers().filter((w) => w instanceof HTMLElement), d = (w) => {
|
|
7352
7370
|
if (!(w instanceof Node))
|
|
7353
7371
|
return r()[0] ?? null;
|
|
7354
|
-
for (const
|
|
7355
|
-
if (
|
|
7356
|
-
return
|
|
7372
|
+
for (const P of r())
|
|
7373
|
+
if (P.contains(w))
|
|
7374
|
+
return P;
|
|
7357
7375
|
return r()[0] ?? null;
|
|
7358
7376
|
}, u = () => {
|
|
7359
7377
|
t = null;
|
|
@@ -7362,15 +7380,15 @@ function jn(e) {
|
|
|
7362
7380
|
u();
|
|
7363
7381
|
return;
|
|
7364
7382
|
}
|
|
7365
|
-
const
|
|
7366
|
-
if (!
|
|
7383
|
+
const P = w.touches[0];
|
|
7384
|
+
if (!P) {
|
|
7367
7385
|
u();
|
|
7368
7386
|
return;
|
|
7369
7387
|
}
|
|
7370
7388
|
t = {
|
|
7371
|
-
identifier:
|
|
7372
|
-
startX:
|
|
7373
|
-
startY:
|
|
7389
|
+
identifier: P.identifier,
|
|
7390
|
+
startX: P.clientX,
|
|
7391
|
+
startY: P.clientY,
|
|
7374
7392
|
container: d(w.target),
|
|
7375
7393
|
startScrollLeft: 0,
|
|
7376
7394
|
startScrollTop: 0,
|
|
@@ -7379,13 +7397,13 @@ function jn(e) {
|
|
|
7379
7397
|
}, C = (w) => {
|
|
7380
7398
|
if (!t || !w.cancelable)
|
|
7381
7399
|
return;
|
|
7382
|
-
const
|
|
7383
|
-
if (!
|
|
7400
|
+
const P = Array.from(w.touches).find((R) => R.identifier === t?.identifier);
|
|
7401
|
+
if (!P)
|
|
7384
7402
|
return;
|
|
7385
7403
|
const b = t.container?.isConnected ? t.container : d(w.target);
|
|
7386
7404
|
if (!b)
|
|
7387
7405
|
return;
|
|
7388
|
-
const i =
|
|
7406
|
+
const i = P.clientX - t.startX, h = P.clientY - t.startY, l = Math.max(0, b.scrollHeight - b.clientHeight), v = Math.max(0, b.scrollWidth - b.clientWidth);
|
|
7389
7407
|
!t.lockedAxis && (t.lockedAxis = Du({
|
|
7390
7408
|
deltaX: i,
|
|
7391
7409
|
deltaY: h,
|
|
@@ -7410,7 +7428,7 @@ function hn(e) {
|
|
|
7410
7428
|
return { target: e };
|
|
7411
7429
|
}
|
|
7412
7430
|
function Au(e) {
|
|
7413
|
-
const t = Z(null), r = Z(null), d = Z(0), u = Z(0), s = Z(0), C = Z(0), w = Z(0),
|
|
7431
|
+
const t = Z(null), r = Z(null), d = Z(0), u = Z(0), s = Z(0), C = Z(0), w = Z(0), P = Z(0), b = Z(0), i = Z(0);
|
|
7414
7432
|
let h = null;
|
|
7415
7433
|
const l = Ri({
|
|
7416
7434
|
resolveSourceScrollTop: () => t.value?.scrollTop ?? 0,
|
|
@@ -7419,20 +7437,20 @@ function Au(e) {
|
|
|
7419
7437
|
}), v = _i({
|
|
7420
7438
|
resolveBodyViewport: () => t.value,
|
|
7421
7439
|
resolveMainViewport: () => t.value,
|
|
7422
|
-
setHandledScrollTop: (
|
|
7423
|
-
t.value && (t.value.scrollTop =
|
|
7440
|
+
setHandledScrollTop: (M) => {
|
|
7441
|
+
t.value && (t.value.scrollTop = M);
|
|
7424
7442
|
},
|
|
7425
|
-
setHandledScrollLeft: (
|
|
7426
|
-
t.value && (t.value.scrollLeft =
|
|
7443
|
+
setHandledScrollLeft: (M) => {
|
|
7444
|
+
t.value && (t.value.scrollLeft = M);
|
|
7427
7445
|
},
|
|
7428
|
-
syncLinkedScroll: (
|
|
7429
|
-
l.syncNow(
|
|
7446
|
+
syncLinkedScroll: (M) => {
|
|
7447
|
+
l.syncNow(M);
|
|
7430
7448
|
},
|
|
7431
7449
|
scheduleLinkedScrollSyncLoop: l.scheduleSyncLoop,
|
|
7432
7450
|
isLinkedScrollSyncLoopScheduled: l.isSyncLoopScheduled,
|
|
7433
7451
|
onWheelConsumed: () => {
|
|
7434
|
-
const
|
|
7435
|
-
|
|
7452
|
+
const M = t.value;
|
|
7453
|
+
M && e.viewport.value.handleViewportScroll(hn(M));
|
|
7436
7454
|
}
|
|
7437
7455
|
});
|
|
7438
7456
|
function R() {
|
|
@@ -7446,24 +7464,24 @@ function Au(e) {
|
|
|
7446
7464
|
t.value,
|
|
7447
7465
|
r.value,
|
|
7448
7466
|
W()
|
|
7449
|
-
].filter((
|
|
7467
|
+
].filter((M) => M instanceof HTMLElement);
|
|
7450
7468
|
}
|
|
7451
|
-
function ee(
|
|
7452
|
-
s.value =
|
|
7469
|
+
function ee(M) {
|
|
7470
|
+
s.value = M.scrollTop, C.value = M.scrollLeft, w.value = M.clientWidth, P.value = M.clientHeight;
|
|
7453
7471
|
}
|
|
7454
|
-
function U(
|
|
7455
|
-
t.value = pn(
|
|
7472
|
+
function U(M) {
|
|
7473
|
+
t.value = pn(M), e.viewport.value.bodyViewportRef(M);
|
|
7456
7474
|
const x = e.gridChromeSyncers.value;
|
|
7457
7475
|
x.syncBodyViewportMetrics(), x.connectGridChromeResizeObserver(), x.scheduleGridChromeRedraw();
|
|
7458
7476
|
}
|
|
7459
|
-
function L(
|
|
7460
|
-
r.value = pn(
|
|
7477
|
+
function L(M) {
|
|
7478
|
+
r.value = pn(M);
|
|
7461
7479
|
const x = e.gridChromeSyncers.value;
|
|
7462
7480
|
x.syncPinnedBottomViewportMetrics(), x.syncPinnedBottomViewportScrollLeft();
|
|
7463
7481
|
}
|
|
7464
|
-
function $(
|
|
7465
|
-
e.viewport.value.handleViewportScroll(
|
|
7466
|
-
const x =
|
|
7482
|
+
function $(M) {
|
|
7483
|
+
e.viewport.value.handleViewportScroll(M);
|
|
7484
|
+
const x = M.target;
|
|
7467
7485
|
if (!x)
|
|
7468
7486
|
return;
|
|
7469
7487
|
const A = s.value, I = C.value;
|
|
@@ -7473,15 +7491,15 @@ function Au(e) {
|
|
|
7473
7491
|
}
|
|
7474
7492
|
e.gridChromeSyncers.value.scheduleGridChromeRedraw("full");
|
|
7475
7493
|
}
|
|
7476
|
-
function M
|
|
7477
|
-
const x =
|
|
7494
|
+
function _(M) {
|
|
7495
|
+
const x = M.target, A = t.value;
|
|
7478
7496
|
!x || !A || A.scrollLeft === x.scrollLeft || (A.scrollLeft = x.scrollLeft, e.viewport.value.handleViewportScroll(hn(A)), ee(A), e.gridChromeSyncers.value.flushGridChromeRedraw("center-scroll"));
|
|
7479
7497
|
}
|
|
7480
|
-
function z(
|
|
7481
|
-
v.onLinkedViewportWheel(
|
|
7498
|
+
function z(M) {
|
|
7499
|
+
v.onLinkedViewportWheel(M);
|
|
7482
7500
|
}
|
|
7483
|
-
function G(
|
|
7484
|
-
v.onBodyViewportWheel(
|
|
7501
|
+
function G(M) {
|
|
7502
|
+
v.onBodyViewportWheel(M);
|
|
7485
7503
|
}
|
|
7486
7504
|
return Fa(() => {
|
|
7487
7505
|
e.gridChromeSyncers.value.syncBodyViewportMetrics(), e.gridChromeSyncers.value.connectGridChromeResizeObserver(), e.gridChromeSyncers.value.scheduleGridChromeRedraw(), e.stageRootEl.value && (h = jn({
|
|
@@ -7496,7 +7514,7 @@ function Au(e) {
|
|
|
7496
7514
|
bodyViewportScrollTop: s,
|
|
7497
7515
|
bodyViewportScrollLeft: C,
|
|
7498
7516
|
bodyViewportClientWidth: w,
|
|
7499
|
-
bodyViewportClientHeight:
|
|
7517
|
+
bodyViewportClientHeight: P,
|
|
7500
7518
|
pinnedBottomViewportClientHeight: b,
|
|
7501
7519
|
bodyViewportTopOffset: i,
|
|
7502
7520
|
headerShellHeight: d,
|
|
@@ -7504,7 +7522,7 @@ function Au(e) {
|
|
|
7504
7522
|
captureBodyViewportRef: U,
|
|
7505
7523
|
capturePinnedBottomViewportRef: L,
|
|
7506
7524
|
handleCenterViewportScroll: $,
|
|
7507
|
-
handlePinnedBottomViewportScroll:
|
|
7525
|
+
handlePinnedBottomViewportScroll: _,
|
|
7508
7526
|
handleLinkedViewportWheel: z,
|
|
7509
7527
|
handleBodyViewportWheel: G
|
|
7510
7528
|
};
|
|
@@ -7525,7 +7543,7 @@ function Jr(e) {
|
|
|
7525
7543
|
maxWidth: `${e.value}px`
|
|
7526
7544
|
}));
|
|
7527
7545
|
}
|
|
7528
|
-
function Qr(e, t, r, d, u, s, C, w,
|
|
7546
|
+
function Qr(e, t, r, d, u, s, C, w, P, b, i, h, l, v, R) {
|
|
7529
7547
|
return o(() => ({
|
|
7530
7548
|
side: e,
|
|
7531
7549
|
width: t.value,
|
|
@@ -7538,7 +7556,7 @@ function Qr(e, t, r, d, u, s, C, w, E, b, i, h, l, v, R) {
|
|
|
7538
7556
|
showIndexColumn: s.value,
|
|
7539
7557
|
displayRows: C.value,
|
|
7540
7558
|
selectionOverlaySegments: w.value,
|
|
7541
|
-
fillPreviewOverlaySegments:
|
|
7559
|
+
fillPreviewOverlaySegments: P.value,
|
|
7542
7560
|
movePreviewOverlaySegments: b.value,
|
|
7543
7561
|
overlayLanes: i.value,
|
|
7544
7562
|
selectionSeamOverlaySegments: h.value,
|
|
@@ -7550,7 +7568,7 @@ function Qr(e, t, r, d, u, s, C, w, E, b, i, h, l, v, R) {
|
|
|
7550
7568
|
function Bu(e) {
|
|
7551
7569
|
const t = o(() => e.layoutRuntime.value.leftPaneWidth), r = o(() => e.layoutRuntime.value.rightPaneWidth), d = o(() => ({
|
|
7552
7570
|
gridTemplateColumns: `${t.value}px minmax(0, 1fr) ${r.value}px`
|
|
7553
|
-
})), u = Jr(t), s = Jr(r), C = Jr(t), w = Jr(r),
|
|
7571
|
+
})), u = Jr(t), s = Jr(r), C = Jr(t), w = Jr(r), P = o(() => ({
|
|
7554
7572
|
left: `${t.value}px`,
|
|
7555
7573
|
width: `${Math.max(0, e.layoutRuntime.value.headerViewportClientWidth)}px`,
|
|
7556
7574
|
height: `${Math.max(0, e.layoutRuntime.value.headerShellHeight)}px`
|
|
@@ -7633,7 +7651,7 @@ function Bu(e) {
|
|
|
7633
7651
|
rightPaneStyle: s,
|
|
7634
7652
|
leftTrackStyle: C,
|
|
7635
7653
|
rightTrackStyle: w,
|
|
7636
|
-
centerHeaderChromeCanvasStyle:
|
|
7654
|
+
centerHeaderChromeCanvasStyle: P,
|
|
7637
7655
|
centerChromeCanvasStyle: b,
|
|
7638
7656
|
centerBottomChromeCanvasStyle: i,
|
|
7639
7657
|
leftPinnedPane: h,
|
|
@@ -7804,15 +7822,15 @@ function Ou(e) {
|
|
|
7804
7822
|
Math.max(d, Ra(e.rowEnd, d)),
|
|
7805
7823
|
r
|
|
7806
7824
|
), s = Math.max(1, Math.trunc(Number.isFinite(e.baseRowHeight) ? e.baseRowHeight : 1)), C = Number.isFinite(e.topSpacerHeight) ? Math.max(0, e.topSpacerHeight) : 0, w = [];
|
|
7807
|
-
let
|
|
7825
|
+
let P = C;
|
|
7808
7826
|
for (let b = d; b <= u; b += 1) {
|
|
7809
|
-
const i = e.resolveRowOffset?.(b), h = Number.isFinite(i) ? Math.max(0, i) :
|
|
7827
|
+
const i = e.resolveRowOffset?.(b), h = Number.isFinite(i) ? Math.max(0, i) : P, l = e.resolveRowHeight?.(b), v = e.resolveRowOffset?.(b + 1), R = Number.isFinite(v) && Number.isFinite(i) ? Math.max(1, v - i) : null, W = Math.max(
|
|
7810
7828
|
1,
|
|
7811
7829
|
Math.trunc(
|
|
7812
7830
|
Number.isFinite(l) ? l : R ?? s
|
|
7813
7831
|
)
|
|
7814
7832
|
);
|
|
7815
|
-
w.push({ rowIndex: b, top: h, height: W }),
|
|
7833
|
+
w.push({ rowIndex: b, top: h, height: W }), P = h + W;
|
|
7816
7834
|
}
|
|
7817
7835
|
return w;
|
|
7818
7836
|
}
|
|
@@ -7851,12 +7869,12 @@ function bn(e, t, r, d, u) {
|
|
|
7851
7869
|
return s.includes("row--group") && s.includes("row--pivot") ? "pivot-group" : s.includes("row--group") ? "group" : s.includes("row--tree") ? "tree" : s.includes("row--pivot") ? "pivot" : r(d, u) ? "striped" : "base";
|
|
7852
7870
|
}
|
|
7853
7871
|
function Fu(e) {
|
|
7854
|
-
const t = o(() => e.mode.value !== "pivot" ? !1 : e.visibleColumns.value.some((
|
|
7872
|
+
const t = o(() => e.mode.value !== "pivot" ? !1 : e.visibleColumns.value.some((M) => (e.readPivotHeaderMeta(M)?.groupLabels?.length ?? 0) > 0)), r = Z(0), d = Z(0), u = () => Ou({
|
|
7855
7873
|
rowStart: s(),
|
|
7856
7874
|
rowEnd: C(),
|
|
7857
7875
|
rowTotal: w(),
|
|
7858
7876
|
topSpacerHeight: e.viewport.value?.topSpacerHeight ?? 0,
|
|
7859
|
-
baseRowHeight:
|
|
7877
|
+
baseRowHeight: P(),
|
|
7860
7878
|
resolveRowHeight: e.viewport.value?.resolveRowHeight,
|
|
7861
7879
|
resolveRowOffset: e.viewport.value?.resolveRowOffset
|
|
7862
7880
|
}).map((x) => ({
|
|
@@ -7867,24 +7885,24 @@ function Fu(e) {
|
|
|
7867
7885
|
return e.viewport.value?.viewportRowStart ?? 0;
|
|
7868
7886
|
}
|
|
7869
7887
|
function C() {
|
|
7870
|
-
const
|
|
7871
|
-
if (Number.isFinite(
|
|
7872
|
-
return Math.max(s(), Math.trunc(
|
|
7888
|
+
const M = e.viewport.value?.viewportRowEnd;
|
|
7889
|
+
if (Number.isFinite(M))
|
|
7890
|
+
return Math.max(s(), Math.trunc(M));
|
|
7873
7891
|
const x = e.displayRows.value.length;
|
|
7874
7892
|
return x > 0 ? s() + x - 1 : s() - 1;
|
|
7875
7893
|
}
|
|
7876
7894
|
function w() {
|
|
7877
|
-
const
|
|
7878
|
-
return Number.isFinite(
|
|
7895
|
+
const M = e.viewport.value?.virtualRowTotal;
|
|
7896
|
+
return Number.isFinite(M) ? Math.max(0, Math.trunc(M)) : Math.max(
|
|
7879
7897
|
C() + 1,
|
|
7880
7898
|
e.displayRows.value.length,
|
|
7881
7899
|
e.selectionTotalRowCount.value ?? 0
|
|
7882
7900
|
);
|
|
7883
7901
|
}
|
|
7884
|
-
function
|
|
7885
|
-
const
|
|
7886
|
-
if (Number.isFinite(
|
|
7887
|
-
return Math.max(1, Math.trunc(
|
|
7902
|
+
function P() {
|
|
7903
|
+
const M = e.viewport.value?.baseRowHeight;
|
|
7904
|
+
if (Number.isFinite(M) && M > 0)
|
|
7905
|
+
return Math.max(1, Math.trunc(M));
|
|
7888
7906
|
const x = e.displayRows.value[0];
|
|
7889
7907
|
if (x) {
|
|
7890
7908
|
const A = e.rows.value?.rowStyle(x, e.resolveViewportRowOffset(x, 0)) ?? {}, I = A.height ?? A.minHeight, O = Number.parseFloat(String(I ?? ""));
|
|
@@ -7893,21 +7911,21 @@ function Fu(e) {
|
|
|
7893
7911
|
return 31;
|
|
7894
7912
|
}
|
|
7895
7913
|
const b = o(() => {
|
|
7896
|
-
const
|
|
7897
|
-
return e.mode.value === "base" && e.rowHeightMode.value === "auto" ? (e.bodyViewportScrollTop.value, fn(e.bodyViewportEl, e.displayRows,
|
|
7914
|
+
const M = u();
|
|
7915
|
+
return e.mode.value === "base" && e.rowHeightMode.value === "auto" ? (e.bodyViewportScrollTop.value, fn(e.bodyViewportEl, e.displayRows, M)) : M;
|
|
7898
7916
|
}), i = o(() => {
|
|
7899
|
-
const
|
|
7917
|
+
const M = [];
|
|
7900
7918
|
let x = 0;
|
|
7901
7919
|
return e.pinnedBottomRows.value.forEach((A, I) => {
|
|
7902
7920
|
const O = e.rows.value?.rowStyle(A, e.resolveViewportRowOffset(A, I)) ?? {}, B = Number.parseFloat(String(O.height ?? O.minHeight ?? "")), X = Number.isFinite(B) ? Math.max(1, Math.trunc(B)) : 31;
|
|
7903
|
-
|
|
7921
|
+
M.push({
|
|
7904
7922
|
top: x,
|
|
7905
7923
|
height: X
|
|
7906
7924
|
}), x += X;
|
|
7907
|
-
}),
|
|
7925
|
+
}), M;
|
|
7908
7926
|
}), h = o(() => {
|
|
7909
|
-
const
|
|
7910
|
-
const B =
|
|
7927
|
+
const M = s(), x = b.value.map((I, O) => {
|
|
7928
|
+
const B = M + O;
|
|
7911
7929
|
return {
|
|
7912
7930
|
rowIndex: O,
|
|
7913
7931
|
top: I.top,
|
|
@@ -7915,7 +7933,7 @@ function Fu(e) {
|
|
|
7915
7933
|
kind: e.rows.value.stripedRows === !0 && B % 2 === 1 ? "striped" : "base"
|
|
7916
7934
|
};
|
|
7917
7935
|
}), A = e.displayRows.value.flatMap((I, O) => {
|
|
7918
|
-
const B = e.resolveAbsoluteRowIndex(I, O) -
|
|
7936
|
+
const B = e.resolveAbsoluteRowIndex(I, O) - M, X = b.value[B], q = bn(e.rows, e.isHoveredRow, e.isStripedRow, I, e.resolveViewportRowOffset(I, O));
|
|
7919
7937
|
return !X || !q ? [] : [{
|
|
7920
7938
|
rowIndex: B,
|
|
7921
7939
|
top: X.top,
|
|
@@ -7927,13 +7945,13 @@ function Fu(e) {
|
|
|
7927
7945
|
...x,
|
|
7928
7946
|
...A
|
|
7929
7947
|
];
|
|
7930
|
-
}), l = o(() => e.pinnedBottomRows.value.flatMap((
|
|
7948
|
+
}), l = o(() => e.pinnedBottomRows.value.flatMap((M, x) => {
|
|
7931
7949
|
const A = i.value[x], I = bn(
|
|
7932
7950
|
e.rows,
|
|
7933
7951
|
e.isHoveredRow,
|
|
7934
7952
|
e.isStripedRow,
|
|
7935
|
-
|
|
7936
|
-
e.resolveViewportRowOffset(
|
|
7953
|
+
M,
|
|
7954
|
+
e.resolveViewportRowOffset(M, x)
|
|
7937
7955
|
);
|
|
7938
7956
|
return !A || !I ? [] : [{
|
|
7939
7957
|
rowIndex: x,
|
|
@@ -7952,12 +7970,12 @@ function Fu(e) {
|
|
|
7952
7970
|
leftColumnWidths: [
|
|
7953
7971
|
e.indexColumnWidthPx.value,
|
|
7954
7972
|
...(e.pinnedLeftColumns.value ?? []).map(e.resolveColumnWidth)
|
|
7955
|
-
].filter((
|
|
7973
|
+
].filter((M) => M > 0),
|
|
7956
7974
|
centerColumnWidths: [
|
|
7957
7975
|
e.resolveLeftColumnSpacerWidth(),
|
|
7958
7976
|
...(e.renderedColumns.value ?? []).map(e.resolveColumnWidth),
|
|
7959
7977
|
e.resolveRightColumnSpacerWidth()
|
|
7960
|
-
].filter((
|
|
7978
|
+
].filter((M) => M > 0),
|
|
7961
7979
|
rightColumnWidths: (e.pinnedRightColumns.value ?? []).map(e.resolveColumnWidth),
|
|
7962
7980
|
centerScrollLeft: e.bodyViewportScrollLeft.value
|
|
7963
7981
|
})), R = o(() => fa({
|
|
@@ -7971,12 +7989,12 @@ function Fu(e) {
|
|
|
7971
7989
|
leftColumnWidths: [
|
|
7972
7990
|
e.indexColumnWidthPx.value,
|
|
7973
7991
|
...(e.pinnedLeftColumns.value ?? []).map(e.resolveColumnWidth)
|
|
7974
|
-
].filter((
|
|
7992
|
+
].filter((M) => M > 0),
|
|
7975
7993
|
centerColumnWidths: [
|
|
7976
7994
|
e.resolveLeftColumnSpacerWidth(),
|
|
7977
7995
|
...(e.renderedColumns.value ?? []).map(e.resolveColumnWidth),
|
|
7978
7996
|
e.resolveRightColumnSpacerWidth()
|
|
7979
|
-
].filter((
|
|
7997
|
+
].filter((M) => M > 0),
|
|
7980
7998
|
rightColumnWidths: (e.pinnedRightColumns.value ?? []).map(e.resolveColumnWidth),
|
|
7981
7999
|
centerScrollLeft: e.bodyViewportScrollLeft.value
|
|
7982
8000
|
})), W = o(() => fa({
|
|
@@ -7990,12 +8008,12 @@ function Fu(e) {
|
|
|
7990
8008
|
leftColumnWidths: [
|
|
7991
8009
|
e.indexColumnWidthPx.value,
|
|
7992
8010
|
...(e.pinnedLeftColumns.value ?? []).map(e.resolveColumnWidth)
|
|
7993
|
-
].filter((
|
|
8011
|
+
].filter((M) => M > 0),
|
|
7994
8012
|
centerColumnWidths: [
|
|
7995
8013
|
e.resolveLeftColumnSpacerWidth(),
|
|
7996
8014
|
...(e.renderedColumns.value ?? []).map(e.resolveColumnWidth),
|
|
7997
8015
|
e.resolveRightColumnSpacerWidth()
|
|
7998
|
-
].filter((
|
|
8016
|
+
].filter((M) => M > 0),
|
|
7999
8017
|
rightColumnWidths: (e.pinnedRightColumns.value ?? []).map(e.resolveColumnWidth),
|
|
8000
8018
|
centerScrollLeft: e.bodyViewportScrollLeft.value
|
|
8001
8019
|
}));
|
|
@@ -8013,9 +8031,9 @@ function Fu(e) {
|
|
|
8013
8031
|
...e.renderedColumns.value.map(e.resolveColumnWidth),
|
|
8014
8032
|
...e.pinnedLeftColumns.value.map(e.resolveColumnWidth),
|
|
8015
8033
|
...e.pinnedRightColumns.value.map(e.resolveColumnWidth),
|
|
8016
|
-
...t.value ? e.visibleColumns.value.flatMap((
|
|
8017
|
-
const x = e.readPivotHeaderMeta(
|
|
8018
|
-
return [
|
|
8034
|
+
...t.value ? e.visibleColumns.value.flatMap((M) => {
|
|
8035
|
+
const x = e.readPivotHeaderMeta(M)?.groupLabels ?? [];
|
|
8036
|
+
return [M.key, ...x];
|
|
8019
8037
|
}) : []
|
|
8020
8038
|
],
|
|
8021
8039
|
() => {
|
|
@@ -8032,14 +8050,14 @@ function Fu(e) {
|
|
|
8032
8050
|
d.value += 1;
|
|
8033
8051
|
}
|
|
8034
8052
|
);
|
|
8035
|
-
const p = o(() => b.value.map((
|
|
8053
|
+
const p = o(() => b.value.map((M) => `${M.top}:${M.height}`).join("|")), ee = o(() => i.value.map((M) => `${M.top}:${M.height}`).join("|")), U = o(() => h.value.map((M) => `${M.kind}:${M.top}:${M.height}`).join("|")), L = o(() => l.value.map((M) => `${M.kind}:${M.top}:${M.height}`).join("|")), $ = o(() => [
|
|
8036
8054
|
e.indexColumnWidthPx.value,
|
|
8037
8055
|
...(e.pinnedLeftColumns.value ?? []).map(e.resolveColumnWidth)
|
|
8038
|
-
].join("|")),
|
|
8056
|
+
].join("|")), _ = o(() => [
|
|
8039
8057
|
e.resolveLeftColumnSpacerWidth(),
|
|
8040
8058
|
...(e.renderedColumns.value ?? []).map(e.resolveColumnWidth),
|
|
8041
8059
|
e.resolveRightColumnSpacerWidth()
|
|
8042
|
-
].join("|")), z = o(() => (e.pinnedRightColumns.value ?? []).map(e.resolveColumnWidth).join("|")), G = o(() => t.value ? e.visibleColumns.value.map((
|
|
8060
|
+
].join("|")), z = o(() => (e.pinnedRightColumns.value ?? []).map(e.resolveColumnWidth).join("|")), G = o(() => t.value ? e.visibleColumns.value.map((M) => `${M.key}:${e.readPivotHeaderMeta(M)?.groupLabels?.join(">") ?? ""}`).join("|") : "none");
|
|
8043
8061
|
return {
|
|
8044
8062
|
chromeRenderModel: v,
|
|
8045
8063
|
headerChromeRenderModel: R,
|
|
@@ -8054,10 +8072,10 @@ function Fu(e) {
|
|
|
8054
8072
|
rowBandsSignature: U,
|
|
8055
8073
|
pinnedBottomRowBandsSignature: L,
|
|
8056
8074
|
leftChromeColumnsSignature: $,
|
|
8057
|
-
centerChromeColumnsSignature:
|
|
8075
|
+
centerChromeColumnsSignature: _,
|
|
8058
8076
|
rightChromeColumnsSignature: z,
|
|
8059
8077
|
headerPivotGroupsSignature: G,
|
|
8060
|
-
resolveVisibleRowMetricsFromDom: (
|
|
8078
|
+
resolveVisibleRowMetricsFromDom: (M) => fn(e.bodyViewportEl, e.displayRows, M)
|
|
8061
8079
|
};
|
|
8062
8080
|
}
|
|
8063
8081
|
function yn(e, t) {
|
|
@@ -8180,14 +8198,14 @@ function Gu(e) {
|
|
|
8180
8198
|
}
|
|
8181
8199
|
function w(l = "full") {
|
|
8182
8200
|
t = 0, d = "full";
|
|
8183
|
-
const v = e.headerChromeRenderModel.value, R = e.chromeRenderModel.value, W = qt(e.stageRootEl, "--datagrid-row-divider-color", "rgba(0, 0, 0, 0.08)"), p = qt(e.stageRootEl, "--datagrid-column-divider-color", "rgba(0, 0, 0, 0.08)"), ee = qt(e.stageRootEl, "--datagrid-header-column-divider-color", p), U = _a(e.stageRootEl, "--datagrid-row-divider-size", 1), L = _a(e.stageRootEl, "--datagrid-column-divider-size", 1), $ = _a(e.stageRootEl, "--datagrid-header-column-divider-size", L),
|
|
8184
|
-
|
|
8201
|
+
const v = e.headerChromeRenderModel.value, R = e.chromeRenderModel.value, W = qt(e.stageRootEl, "--datagrid-row-divider-color", "rgba(0, 0, 0, 0.08)"), p = qt(e.stageRootEl, "--datagrid-column-divider-color", "rgba(0, 0, 0, 0.08)"), ee = qt(e.stageRootEl, "--datagrid-header-column-divider-color", p), U = _a(e.stageRootEl, "--datagrid-row-divider-size", 1), L = _a(e.stageRootEl, "--datagrid-column-divider-size", 1), $ = _a(e.stageRootEl, "--datagrid-header-column-divider-size", L), _ = l === "full" ? Jt(e.leftHeaderChromeCanvasEl.value, v.left.width, v.left.height) : null;
|
|
8202
|
+
_ && Ma(_, v.left, ee, $, e.hasPivotHeaderGroups);
|
|
8185
8203
|
const z = Jt(e.centerHeaderChromeCanvasEl.value, v.center.width, v.center.height);
|
|
8186
8204
|
Ma(z, v.center, ee, $, e.hasPivotHeaderGroups);
|
|
8187
8205
|
const G = l === "full" ? Jt(e.rightHeaderChromeCanvasEl.value, v.right.width, v.right.height) : null;
|
|
8188
8206
|
G && Ma(G, v.right, ee, $, e.hasPivotHeaderGroups);
|
|
8189
|
-
const
|
|
8190
|
-
|
|
8207
|
+
const M = l === "full" ? Jt(e.leftChromeCanvasEl.value, R.left.width, R.left.height) : null;
|
|
8208
|
+
M && Cr(e.stageRootEl, M, R.left, W, U, p, 0);
|
|
8191
8209
|
const x = Jt(e.centerChromeCanvasEl.value, R.center.width, R.center.height);
|
|
8192
8210
|
Cr(e.stageRootEl, x, R.center, W, U, p, L);
|
|
8193
8211
|
const A = l === "full" ? Jt(e.rightChromeCanvasEl.value, R.right.width, R.right.height) : null;
|
|
@@ -8199,7 +8217,7 @@ function Gu(e) {
|
|
|
8199
8217
|
const X = l === "full" ? Jt(e.rightBottomChromeCanvasEl.value, I.right.width, I.right.height) : null;
|
|
8200
8218
|
X && Cr(e.stageRootEl, X, I.right, W, U, p, 0);
|
|
8201
8219
|
}
|
|
8202
|
-
function
|
|
8220
|
+
function P(l = "full") {
|
|
8203
8221
|
if (d = t === 0 ? l : yn(d, l), typeof window > "u") {
|
|
8204
8222
|
w(d);
|
|
8205
8223
|
return;
|
|
@@ -8216,7 +8234,7 @@ function Gu(e) {
|
|
|
8216
8234
|
if (typeof ResizeObserver > "u")
|
|
8217
8235
|
return;
|
|
8218
8236
|
r || (r = new ResizeObserver(() => {
|
|
8219
|
-
C(),
|
|
8237
|
+
C(), P();
|
|
8220
8238
|
})), r.disconnect(), e.bodyViewportEl.value && r.observe(e.bodyViewportEl.value), e.bottomViewportEl.value && r.observe(e.bottomViewportEl.value), e.bodyShellRef.value && r.observe(e.bodyShellRef.value);
|
|
8221
8239
|
const l = e.stageRootEl.value?.querySelector(".grid-header-shell");
|
|
8222
8240
|
l && r.observe(l);
|
|
@@ -8230,7 +8248,7 @@ function Gu(e) {
|
|
|
8230
8248
|
syncBodyViewportMetrics: C,
|
|
8231
8249
|
syncPinnedBottomViewportMetrics: s,
|
|
8232
8250
|
syncPinnedBottomViewportScrollLeft: u,
|
|
8233
|
-
scheduleGridChromeRedraw:
|
|
8251
|
+
scheduleGridChromeRedraw: P,
|
|
8234
8252
|
flushGridChromeRedraw: b,
|
|
8235
8253
|
connectGridChromeResizeObserver: i,
|
|
8236
8254
|
disconnectGridChromeResizeObserver: h
|
|
@@ -8258,15 +8276,15 @@ function Ar(e, t = []) {
|
|
|
8258
8276
|
function ea(e, t, r = []) {
|
|
8259
8277
|
return e.map((d) => Ar(t(d), r)).filter((d) => d != null);
|
|
8260
8278
|
}
|
|
8261
|
-
function
|
|
8262
|
-
const C = Math.max(0, s?.topBleed ?? 1), w = Math.max(0, s?.bottomBleed ?? 1),
|
|
8279
|
+
function Pa(e, t, r, d, u, s) {
|
|
8280
|
+
const C = Math.max(0, s?.topBleed ?? 1), w = Math.max(0, s?.bottomBleed ?? 1), P = s?.omitLeftBorder ? 0 : Math.max(0, s?.leftBleed ?? 1), b = s?.omitRightBorder ? 0 : Math.max(0, s?.rightBleed ?? 1), i = s?.hideBorder ? "0px" : Rr;
|
|
8263
8281
|
return {
|
|
8264
8282
|
key: e,
|
|
8265
8283
|
style: {
|
|
8266
8284
|
position: "absolute",
|
|
8267
8285
|
top: `${t - C}px`,
|
|
8268
|
-
left: `${r -
|
|
8269
|
-
width: `${Math.max(1, d +
|
|
8286
|
+
left: `${r - P}px`,
|
|
8287
|
+
width: `${Math.max(1, d + P + b)}px`,
|
|
8270
8288
|
height: `${Math.max(1, u + C + w)}px`,
|
|
8271
8289
|
border: `${i} ${s?.borderStyle ?? "solid"} ${s?.borderColor ?? "var(--datagrid-selection-overlay-border)"}`,
|
|
8272
8290
|
borderLeftWidth: s?.hideBorder || s?.omitLeftBorder ? "0px" : Rr,
|
|
@@ -8285,7 +8303,7 @@ function Ea(e, t, r, d, u, s) {
|
|
|
8285
8303
|
};
|
|
8286
8304
|
}
|
|
8287
8305
|
function Cn(e, t, r, d, u) {
|
|
8288
|
-
const s = Math.max(0, u?.topBleed ?? 1), C = Math.max(0, u?.bottomBleed ?? 1), w = u?.hideBorder ? "0px" : Rr,
|
|
8306
|
+
const s = Math.max(0, u?.topBleed ?? 1), C = Math.max(0, u?.bottomBleed ?? 1), w = u?.hideBorder ? "0px" : Rr, P = u?.hideBorder ? "0px" : Rr;
|
|
8289
8307
|
return {
|
|
8290
8308
|
key: e,
|
|
8291
8309
|
style: {
|
|
@@ -8295,8 +8313,8 @@ function Cn(e, t, r, d, u) {
|
|
|
8295
8313
|
width: wn,
|
|
8296
8314
|
height: `${Math.max(1, r + s + C)}px`,
|
|
8297
8315
|
border: `${w} ${u?.borderStyle ?? "solid"} ${u?.borderColor ?? "var(--datagrid-selection-overlay-border)"}`,
|
|
8298
|
-
borderLeftWidth: u?.seamEdge === "left" ?
|
|
8299
|
-
borderRightWidth: u?.seamEdge === "right" ?
|
|
8316
|
+
borderLeftWidth: u?.seamEdge === "left" ? P : "0px",
|
|
8317
|
+
borderRightWidth: u?.seamEdge === "right" ? P : "0px",
|
|
8300
8318
|
borderTopWidth: w,
|
|
8301
8319
|
borderBottomWidth: w,
|
|
8302
8320
|
background: u?.backgroundColor ?? "transparent",
|
|
@@ -8311,7 +8329,7 @@ function Rt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8311
8329
|
return [];
|
|
8312
8330
|
if (u?.hideSingleCell === !0 && t.startRowOffset === t.endRowOffset && t.startColumnIndex === t.endColumnIndex)
|
|
8313
8331
|
return [];
|
|
8314
|
-
const w = t.top <= 0 ? 0 : 1,
|
|
8332
|
+
const w = t.top <= 0 ? 0 : 1, P = s > 0 && t.top + t.height >= s ? 0 : 1;
|
|
8315
8333
|
if (r === "left") {
|
|
8316
8334
|
const U = e.pinnedLeftColumns.filter((I) => {
|
|
8317
8335
|
const O = e.columnIndexByKey(I.key);
|
|
@@ -8325,18 +8343,18 @@ function Rt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8325
8343
|
break;
|
|
8326
8344
|
L += e.resolveColumnWidth(I);
|
|
8327
8345
|
}
|
|
8328
|
-
const $ = U.reduce((I, O) => I + e.resolveColumnWidth(O), 0),
|
|
8346
|
+
const $ = U.reduce((I, O) => I + e.resolveColumnWidth(O), 0), _ = e.columnIndexByKey(U[U.length - 1]?.key ?? ""), z = e.columnIndexByKey(e.pinnedLeftColumns[e.pinnedLeftColumns.length - 1]?.key ?? ""), G = e.leftPaneWidth, M = z >= 0 && _ === z, x = L <= 0 ? 0 : 1, A = G > 0 && L + $ >= G ? 0 : 1;
|
|
8329
8347
|
return [
|
|
8330
|
-
|
|
8348
|
+
Pa(
|
|
8331
8349
|
`${d}-left-${t.startRowOffset}-${t.endRowOffset}`,
|
|
8332
8350
|
t.top,
|
|
8333
8351
|
L,
|
|
8334
8352
|
$,
|
|
8335
8353
|
t.height,
|
|
8336
8354
|
{
|
|
8337
|
-
omitRightBorder:
|
|
8355
|
+
omitRightBorder: M || t.endColumnIndex > _,
|
|
8338
8356
|
topBleed: w,
|
|
8339
|
-
bottomBleed:
|
|
8357
|
+
bottomBleed: P,
|
|
8340
8358
|
leftBleed: x,
|
|
8341
8359
|
rightBleed: A,
|
|
8342
8360
|
borderColor: u?.borderColor,
|
|
@@ -8360,21 +8378,21 @@ function Rt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8360
8378
|
break;
|
|
8361
8379
|
L += e.resolveColumnWidth(x);
|
|
8362
8380
|
}
|
|
8363
|
-
const $ = U.reduce((x, A) => x + e.resolveColumnWidth(A), 0),
|
|
8381
|
+
const $ = U.reduce((x, A) => x + e.resolveColumnWidth(A), 0), _ = e.columnIndexByKey(U[0]?.key ?? ""), z = e.columnIndexByKey(U[U.length - 1]?.key ?? ""), G = L <= 0 ? 0 : 1, M = e.layoutGridContentWidth > 0 && L + $ >= e.layoutGridContentWidth ? 0 : 1;
|
|
8364
8382
|
return [
|
|
8365
|
-
|
|
8383
|
+
Pa(
|
|
8366
8384
|
`${d}-center-${t.startRowOffset}-${t.endRowOffset}`,
|
|
8367
8385
|
t.top,
|
|
8368
8386
|
L,
|
|
8369
8387
|
$,
|
|
8370
8388
|
t.height,
|
|
8371
8389
|
{
|
|
8372
|
-
omitLeftBorder: t.startColumnIndex <
|
|
8390
|
+
omitLeftBorder: t.startColumnIndex < _,
|
|
8373
8391
|
omitRightBorder: t.endColumnIndex > z,
|
|
8374
8392
|
topBleed: w,
|
|
8375
|
-
bottomBleed:
|
|
8393
|
+
bottomBleed: P,
|
|
8376
8394
|
leftBleed: G,
|
|
8377
|
-
rightBleed:
|
|
8395
|
+
rightBleed: M,
|
|
8378
8396
|
borderColor: u?.borderColor,
|
|
8379
8397
|
backgroundColor: u?.backgroundColor,
|
|
8380
8398
|
borderStyle: u?.borderStyle,
|
|
@@ -8397,7 +8415,7 @@ function Rt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8397
8415
|
}
|
|
8398
8416
|
const h = b.reduce((U, L) => U + e.resolveColumnWidth(L), 0), l = e.columnIndexByKey(b[0]?.key ?? ""), v = e.columnIndexByKey(e.pinnedRightColumns[0]?.key ?? ""), R = e.rightPaneWidth, W = v >= 0 && l === v, p = i <= 0 ? 0 : 1, ee = R > 0 && i + h >= R ? 0 : 1;
|
|
8399
8417
|
return [
|
|
8400
|
-
|
|
8418
|
+
Pa(
|
|
8401
8419
|
`${d}-right-${t.startRowOffset}-${t.endRowOffset}`,
|
|
8402
8420
|
t.top,
|
|
8403
8421
|
i,
|
|
@@ -8406,7 +8424,7 @@ function Rt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8406
8424
|
{
|
|
8407
8425
|
omitLeftBorder: W || t.startColumnIndex < l,
|
|
8408
8426
|
topBleed: w,
|
|
8409
|
-
bottomBleed:
|
|
8427
|
+
bottomBleed: P,
|
|
8410
8428
|
leftBleed: p,
|
|
8411
8429
|
rightBleed: ee,
|
|
8412
8430
|
borderColor: u?.borderColor,
|
|
@@ -8422,7 +8440,7 @@ function Qt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8422
8440
|
return [];
|
|
8423
8441
|
if (u?.hideSingleCell === !0 && t.startRowOffset === t.endRowOffset && t.startColumnIndex === t.endColumnIndex)
|
|
8424
8442
|
return [];
|
|
8425
|
-
const w = t.top <= 0 ? 0 : 1,
|
|
8443
|
+
const w = t.top <= 0 ? 0 : 1, P = s > 0 && t.top + t.height >= s ? 0 : 1;
|
|
8426
8444
|
if (r === "left") {
|
|
8427
8445
|
const v = e.pinnedLeftColumns.filter((ee) => {
|
|
8428
8446
|
const U = e.columnIndexByKey(ee.key);
|
|
@@ -8443,7 +8461,7 @@ function Qt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8443
8461
|
{
|
|
8444
8462
|
seamEdge: p ? void 0 : "right",
|
|
8445
8463
|
topBleed: w,
|
|
8446
|
-
bottomBleed:
|
|
8464
|
+
bottomBleed: P,
|
|
8447
8465
|
borderColor: u?.borderColor,
|
|
8448
8466
|
backgroundColor: u?.backgroundColor,
|
|
8449
8467
|
borderStyle: u?.borderStyle,
|
|
@@ -8471,7 +8489,7 @@ function Qt(e, t, r, d, u, s = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8471
8489
|
{
|
|
8472
8490
|
seamEdge: l ? void 0 : "left",
|
|
8473
8491
|
topBleed: w,
|
|
8474
|
-
bottomBleed:
|
|
8492
|
+
bottomBleed: P,
|
|
8475
8493
|
borderColor: u?.borderColor,
|
|
8476
8494
|
backgroundColor: u?.backgroundColor,
|
|
8477
8495
|
borderStyle: u?.borderStyle,
|
|
@@ -8547,8 +8565,8 @@ function ta(e, t, r, d, u = Math.max(0, e.bodyViewportClientHeight)) {
|
|
|
8547
8565
|
function Sn(e, t, r) {
|
|
8548
8566
|
let d = null, u = null, s = null, C = null;
|
|
8549
8567
|
for (let w = 0; w < e; w += 1)
|
|
8550
|
-
for (let
|
|
8551
|
-
r(w,
|
|
8568
|
+
for (let P = 0; P < t; P += 1)
|
|
8569
|
+
r(w, P) && (d ??= w, u = w, s = s == null ? P : Math.min(s, P), C = C == null ? P : Math.max(C, P));
|
|
8552
8570
|
return d == null || u == null || s == null || C == null ? null : {
|
|
8553
8571
|
startRowOffset: d,
|
|
8554
8572
|
endRowOffset: u,
|
|
@@ -8585,7 +8603,7 @@ function Ku(e) {
|
|
|
8585
8603
|
)), w = o(() => Ar(
|
|
8586
8604
|
u.value,
|
|
8587
8605
|
e.rowMetrics.value
|
|
8588
|
-
)),
|
|
8606
|
+
)), P = o(() => Ar(e.resolveVisibleRangeBounds(t.value), e.rowMetrics.value)), b = o(() => d.value ? [] : ea(
|
|
8589
8607
|
s.value,
|
|
8590
8608
|
e.resolvePinnedBottomVisibleRangeBounds,
|
|
8591
8609
|
e.pinnedBottomRowMetrics.value
|
|
@@ -8607,13 +8625,13 @@ function Ku(e) {
|
|
|
8607
8625
|
borderColor: "var(--datagrid-selection-overlay-move-border)",
|
|
8608
8626
|
backgroundColor: "var(--datagrid-selection-overlay-move-bg)",
|
|
8609
8627
|
borderStyle: "dashed"
|
|
8610
|
-
}, W = o(() => Math.max(0, e.bodyViewportClientHeight.value)), p = o(() => Math.max(0, e.bottomViewportClientHeight.value)), ee = o(() => Va(C.value, e.bodyViewportScrollTop.value)), U = o(() => kn(w.value, e.bodyViewportScrollTop.value)), L = o(() => kn(
|
|
8628
|
+
}, W = o(() => Math.max(0, e.bodyViewportClientHeight.value)), p = o(() => Math.max(0, e.bottomViewportClientHeight.value)), ee = o(() => Va(C.value, e.bodyViewportScrollTop.value)), U = o(() => kn(w.value, e.bodyViewportScrollTop.value)), L = o(() => kn(P.value, e.bodyViewportScrollTop.value)), $ = o(() => sr(
|
|
8611
8629
|
e.overlayGeometryContext.value,
|
|
8612
8630
|
C.value,
|
|
8613
8631
|
"left",
|
|
8614
8632
|
"selection",
|
|
8615
8633
|
l
|
|
8616
|
-
)),
|
|
8634
|
+
)), _ = o(() => Tr(
|
|
8617
8635
|
e.overlayGeometryContext.value,
|
|
8618
8636
|
ee.value,
|
|
8619
8637
|
"left",
|
|
@@ -8631,7 +8649,7 @@ function Ku(e) {
|
|
|
8631
8649
|
"right",
|
|
8632
8650
|
"selection",
|
|
8633
8651
|
l
|
|
8634
|
-
)),
|
|
8652
|
+
)), M = o(() => Tr(
|
|
8635
8653
|
e.overlayGeometryContext.value,
|
|
8636
8654
|
ee.value,
|
|
8637
8655
|
"right",
|
|
@@ -8721,7 +8739,7 @@ function Ku(e) {
|
|
|
8721
8739
|
"fill-preview",
|
|
8722
8740
|
v,
|
|
8723
8741
|
p.value
|
|
8724
|
-
)),
|
|
8742
|
+
)), Pe = o(() => Rt(
|
|
8725
8743
|
e.overlayGeometryContext.value,
|
|
8726
8744
|
i.value,
|
|
8727
8745
|
"center",
|
|
@@ -8744,7 +8762,7 @@ function Ku(e) {
|
|
|
8744
8762
|
p.value
|
|
8745
8763
|
)), rt = o(() => Rt(
|
|
8746
8764
|
e.overlayGeometryContext.value,
|
|
8747
|
-
|
|
8765
|
+
P.value,
|
|
8748
8766
|
"left",
|
|
8749
8767
|
"move-preview",
|
|
8750
8768
|
R,
|
|
@@ -8758,14 +8776,14 @@ function Ku(e) {
|
|
|
8758
8776
|
W.value
|
|
8759
8777
|
)), $e = o(() => Rt(
|
|
8760
8778
|
e.overlayGeometryContext.value,
|
|
8761
|
-
|
|
8779
|
+
P.value,
|
|
8762
8780
|
"center",
|
|
8763
8781
|
"move-preview",
|
|
8764
8782
|
R,
|
|
8765
8783
|
W.value
|
|
8766
8784
|
)), _t = o(() => Rt(
|
|
8767
8785
|
e.overlayGeometryContext.value,
|
|
8768
|
-
|
|
8786
|
+
P.value,
|
|
8769
8787
|
"right",
|
|
8770
8788
|
"move-preview",
|
|
8771
8789
|
R,
|
|
@@ -8784,7 +8802,7 @@ function Ku(e) {
|
|
|
8784
8802
|
"move-preview",
|
|
8785
8803
|
R,
|
|
8786
8804
|
p.value
|
|
8787
|
-
)),
|
|
8805
|
+
)), Ee = o(() => Qt(
|
|
8788
8806
|
e.overlayGeometryContext.value,
|
|
8789
8807
|
h.value,
|
|
8790
8808
|
"left",
|
|
@@ -8827,10 +8845,10 @@ function Ku(e) {
|
|
|
8827
8845
|
})), pe = o(() => Ie.value.map(({ overlay: ne, body: ve }) => Sr(e.overlayGeometryContext.value, ne, "left", ve)).filter((ne) => ne != null)), st = o(() => Ie.value.map(({ overlay: ne, body: ve }) => Sr(e.overlayGeometryContext.value, ne, "center", ve)).filter((ne) => ne != null)), wt = o(() => Ie.value.map(({ overlay: ne, body: ve }) => Sr(e.overlayGeometryContext.value, ne, "right", ve)).filter((ne) => ne != null)), ct = o(() => Ie.value.map(({ overlay: ne, bodyPinnedPaneSeam: ve }) => ta(e.overlayGeometryContext.value, ne, "left", ve)).filter((ne) => ne != null)), De = o(() => Ie.value.map(({ overlay: ne, bodyPinnedPaneSeam: ve }) => ta(e.overlayGeometryContext.value, ne, "right", ve)).filter((ne) => ne != null)), Ae = o(() => Ie.value.map(({ overlay: ne, pinnedBottom: ve }) => Sr(e.overlayGeometryContext.value, ne, "left", ve, p.value)).filter((ne) => ne != null)), se = o(() => Ie.value.map(({ overlay: ne, pinnedBottom: ve }) => Sr(e.overlayGeometryContext.value, ne, "center", ve, p.value)).filter((ne) => ne != null)), Je = o(() => Ie.value.map(({ overlay: ne, pinnedBottom: ve }) => Sr(e.overlayGeometryContext.value, ne, "right", ve, p.value)).filter((ne) => ne != null)), He = o(() => Ie.value.map(({ overlay: ne, pinnedBottom: ve }) => ta(e.overlayGeometryContext.value, ne, "left", ve, p.value)).filter((ne) => ne != null)), Qe = o(() => Ie.value.map(({ overlay: ne, pinnedBottom: ve }) => ta(e.overlayGeometryContext.value, ne, "right", ve, p.value)).filter((ne) => ne != null));
|
|
8828
8846
|
return {
|
|
8829
8847
|
leftSelectionOverlaySegments: $,
|
|
8830
|
-
leftSelectionSeamOverlaySegments:
|
|
8848
|
+
leftSelectionSeamOverlaySegments: _,
|
|
8831
8849
|
centerSelectionOverlaySegments: z,
|
|
8832
8850
|
rightSelectionOverlaySegments: G,
|
|
8833
|
-
rightSelectionSeamOverlaySegments:
|
|
8851
|
+
rightSelectionSeamOverlaySegments: M,
|
|
8834
8852
|
leftPinnedBottomSelectionOverlaySegments: x,
|
|
8835
8853
|
leftPinnedBottomSelectionSeamOverlaySegments: A,
|
|
8836
8854
|
centerPinnedBottomSelectionOverlaySegments: I,
|
|
@@ -8843,7 +8861,7 @@ function Ku(e) {
|
|
|
8843
8861
|
rightFillPreviewSeamOverlaySegments: le,
|
|
8844
8862
|
leftPinnedBottomFillPreviewOverlaySegments: we,
|
|
8845
8863
|
leftPinnedBottomFillPreviewSeamOverlaySegments: Re,
|
|
8846
|
-
centerPinnedBottomFillPreviewOverlaySegments:
|
|
8864
|
+
centerPinnedBottomFillPreviewOverlaySegments: Pe,
|
|
8847
8865
|
rightPinnedBottomFillPreviewOverlaySegments: ge,
|
|
8848
8866
|
rightPinnedBottomFillPreviewSeamOverlaySegments: Fe,
|
|
8849
8867
|
leftMovePreviewOverlaySegments: rt,
|
|
@@ -8852,7 +8870,7 @@ function Ku(e) {
|
|
|
8852
8870
|
rightMovePreviewOverlaySegments: _t,
|
|
8853
8871
|
rightMovePreviewSeamOverlaySegments: Mt,
|
|
8854
8872
|
leftPinnedBottomMovePreviewOverlaySegments: ut,
|
|
8855
|
-
leftPinnedBottomMovePreviewSeamOverlaySegments:
|
|
8873
|
+
leftPinnedBottomMovePreviewSeamOverlaySegments: Ee,
|
|
8856
8874
|
centerPinnedBottomMovePreviewOverlaySegments: Ke,
|
|
8857
8875
|
rightPinnedBottomMovePreviewOverlaySegments: at,
|
|
8858
8876
|
rightPinnedBottomMovePreviewSeamOverlaySegments: yt,
|
|
@@ -8950,14 +8968,14 @@ const Nu = /* @__PURE__ */ At({
|
|
|
8950
8968
|
r
|
|
8951
8969
|
);
|
|
8952
8970
|
_o(d);
|
|
8953
|
-
const u = d.mode, s = d.rowHeightMode, C = d.layoutMode, w = d.layout,
|
|
8971
|
+
const u = d.mode, s = d.rowHeightMode, C = d.layoutMode, w = d.layout, P = d.viewport, b = d.columns, i = d.rows, h = d.selection, l = d.editing, v = d.cells, R = d.interaction, W = o(() => b.value?.visibleColumns ?? []), p = o(() => b.value?.renderedColumns ?? []), ee = o(() => i.value?.displayRows ?? []), U = o(() => i.value?.pinnedBottomRows ?? []), L = o(() => h.value?.selectionRange ?? null), $ = o(() => {
|
|
8954
8972
|
const V = h.value?.selectionRanges;
|
|
8955
8973
|
return Array.isArray(V) && V.length > 0 ? V : L.value ? [L.value] : [];
|
|
8956
|
-
}),
|
|
8974
|
+
}), _ = o(() => h.value?.isFillDragging === !0), z = o(() => W.value.some((V) => au(V)));
|
|
8957
8975
|
function G(V) {
|
|
8958
8976
|
return w.value.columnStyle(V);
|
|
8959
8977
|
}
|
|
8960
|
-
function
|
|
8978
|
+
function M(V) {
|
|
8961
8979
|
return Qd(V, w.value.columnStyle);
|
|
8962
8980
|
}
|
|
8963
8981
|
function x(V, j, me, Oe) {
|
|
@@ -8987,26 +9005,26 @@ const Nu = /* @__PURE__ */ At({
|
|
|
8987
9005
|
return Xe?.isVisualSelectionAnchorCell(V, j) === !0 ? 0 : -1;
|
|
8988
9006
|
}
|
|
8989
9007
|
function Y() {
|
|
8990
|
-
return
|
|
9008
|
+
return P.value?.viewportRowStart ?? 0;
|
|
8991
9009
|
}
|
|
8992
9010
|
function J() {
|
|
8993
|
-
const V =
|
|
9011
|
+
const V = P.value?.viewportRowEnd;
|
|
8994
9012
|
if (Number.isFinite(V))
|
|
8995
9013
|
return Math.max(Y(), Math.trunc(V));
|
|
8996
9014
|
const j = ee.value.length;
|
|
8997
9015
|
return j > 0 ? Y() + j - 1 : Y() - 1;
|
|
8998
9016
|
}
|
|
8999
9017
|
function le() {
|
|
9000
|
-
return
|
|
9018
|
+
return P.value?.leftColumnSpacerWidth ?? 0;
|
|
9001
9019
|
}
|
|
9002
9020
|
function we() {
|
|
9003
|
-
return
|
|
9021
|
+
return P.value?.rightColumnSpacerWidth ?? 0;
|
|
9004
9022
|
}
|
|
9005
9023
|
function Re(V, j) {
|
|
9006
9024
|
const me = v.value.isCellSelected;
|
|
9007
9025
|
return typeof me == "function" ? me(V, j) : !1;
|
|
9008
9026
|
}
|
|
9009
|
-
function
|
|
9027
|
+
function Pe(V, j, me = {}) {
|
|
9010
9028
|
return Xe?.resolveInlineRowStateFill(V, j, me) ?? null;
|
|
9011
9029
|
}
|
|
9012
9030
|
function ge(V, j) {
|
|
@@ -9035,7 +9053,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9035
9053
|
function ut(V, j) {
|
|
9036
9054
|
return Xe?.isSelectionAnchorCellSafe(V, j) === !0;
|
|
9037
9055
|
}
|
|
9038
|
-
function
|
|
9056
|
+
function Ee(V, j) {
|
|
9039
9057
|
return Xe?.isCellInFillPreviewSafe(V, j) === !0;
|
|
9040
9058
|
}
|
|
9041
9059
|
function Ke(V, j) {
|
|
@@ -9079,39 +9097,39 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9079
9097
|
Vt.value = null;
|
|
9080
9098
|
}
|
|
9081
9099
|
function Te(V, j) {
|
|
9082
|
-
return Number.isFinite(V.displayIndex) ? Math.max(0, Math.trunc(V.displayIndex)) :
|
|
9100
|
+
return Number.isFinite(V.displayIndex) ? Math.max(0, Math.trunc(V.displayIndex)) : P.value.viewportRowStart + j;
|
|
9083
9101
|
}
|
|
9084
9102
|
function et(V, j) {
|
|
9085
|
-
return Te(V, j) -
|
|
9103
|
+
return Te(V, j) - P.value.viewportRowStart;
|
|
9086
9104
|
}
|
|
9087
9105
|
function Gt(V, j) {
|
|
9088
9106
|
i.value.rowHover && (Vt.value = Te(V, j));
|
|
9089
9107
|
}
|
|
9090
|
-
function
|
|
9108
|
+
function Pt(V, j) {
|
|
9091
9109
|
return i.value.rowHover === !0 && Vt.value === Te(V, j);
|
|
9092
9110
|
}
|
|
9093
9111
|
function Lt(V, j) {
|
|
9094
9112
|
return i.value.stripedRows === !0 && Te(V, j) % 2 === 1;
|
|
9095
9113
|
}
|
|
9096
|
-
const ht =
|
|
9114
|
+
const ht = Eu({
|
|
9097
9115
|
rows: i,
|
|
9098
9116
|
layout: w,
|
|
9099
|
-
viewportRowStart: o(() =>
|
|
9117
|
+
viewportRowStart: o(() => P.value.viewportRowStart),
|
|
9100
9118
|
selectionRange: L,
|
|
9101
9119
|
visibleColumns: W,
|
|
9102
|
-
isHoveredRow:
|
|
9120
|
+
isHoveredRow: Pt,
|
|
9103
9121
|
isStripedRow: Lt,
|
|
9104
9122
|
resolveAbsoluteRowIndex: Te,
|
|
9105
|
-
resolveInlineRowStateFill:
|
|
9123
|
+
resolveInlineRowStateFill: Pe,
|
|
9106
9124
|
isDataGridPlaceholderSurfaceRow: Ga
|
|
9107
|
-
}), he = o(() => ht.indexColumnWidthPx.value + (De.value ?? []).reduce((V, j) => V +
|
|
9125
|
+
}), he = o(() => ht.indexColumnWidthPx.value + (De.value ?? []).reduce((V, j) => V + M(j), 0)), ye = o(() => (Ae.value ?? []).reduce((V, j) => V + M(j), 0)), {
|
|
9108
9126
|
bodyViewportEl: xe,
|
|
9109
9127
|
bottomViewportEl: Be,
|
|
9110
9128
|
bodyViewportScrollTop: lt,
|
|
9111
9129
|
bodyViewportScrollLeft: St,
|
|
9112
9130
|
bodyViewportClientWidth: tt,
|
|
9113
9131
|
bodyViewportClientHeight: ue,
|
|
9114
|
-
pinnedBottomViewportClientHeight:
|
|
9132
|
+
pinnedBottomViewportClientHeight: Et,
|
|
9115
9133
|
bodyViewportTopOffset: $t,
|
|
9116
9134
|
headerShellHeight: Ne,
|
|
9117
9135
|
headerViewportClientWidth: Ue,
|
|
@@ -9123,13 +9141,13 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9123
9141
|
handleBodyViewportWheel: ft
|
|
9124
9142
|
} = Au({
|
|
9125
9143
|
stageRootEl: se,
|
|
9126
|
-
viewport:
|
|
9144
|
+
viewport: P,
|
|
9127
9145
|
leftPaneContentRef: He,
|
|
9128
9146
|
rightPaneContentRef: Qe,
|
|
9129
9147
|
gridChromeSyncers: Ct
|
|
9130
9148
|
});
|
|
9131
9149
|
mu({
|
|
9132
|
-
viewport:
|
|
9150
|
+
viewport: P,
|
|
9133
9151
|
displayRows: ee,
|
|
9134
9152
|
bodyViewportScrollTop: lt
|
|
9135
9153
|
});
|
|
@@ -9147,7 +9165,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9147
9165
|
mode: u,
|
|
9148
9166
|
rowHeightMode: s,
|
|
9149
9167
|
layout: w,
|
|
9150
|
-
viewport:
|
|
9168
|
+
viewport: P,
|
|
9151
9169
|
rows: i,
|
|
9152
9170
|
visibleColumns: W,
|
|
9153
9171
|
renderedColumns: p,
|
|
@@ -9160,19 +9178,19 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9160
9178
|
bodyViewportScrollLeft: St,
|
|
9161
9179
|
bodyViewportClientWidth: tt,
|
|
9162
9180
|
bodyViewportClientHeight: ue,
|
|
9163
|
-
pinnedBottomViewportClientHeight:
|
|
9181
|
+
pinnedBottomViewportClientHeight: Et,
|
|
9164
9182
|
headerShellHeight: Ne,
|
|
9165
9183
|
headerViewportClientWidth: Ue,
|
|
9166
9184
|
bodyViewportEl: xe,
|
|
9167
9185
|
indexColumnWidthPx: ht.indexColumnWidthPx,
|
|
9168
9186
|
pinnedLeftColumns: De,
|
|
9169
9187
|
pinnedRightColumns: Ae,
|
|
9170
|
-
resolveColumnWidth:
|
|
9188
|
+
resolveColumnWidth: M,
|
|
9171
9189
|
resolveLeftColumnSpacerWidth: le,
|
|
9172
9190
|
resolveRightColumnSpacerWidth: we,
|
|
9173
9191
|
resolveAbsoluteRowIndex: Te,
|
|
9174
9192
|
resolveViewportRowOffset: et,
|
|
9175
|
-
isHoveredRow:
|
|
9193
|
+
isHoveredRow: Pt,
|
|
9176
9194
|
isStripedRow: Lt,
|
|
9177
9195
|
readPivotHeaderMeta: eu
|
|
9178
9196
|
}), {
|
|
@@ -9187,7 +9205,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9187
9205
|
handleRowClickSafe: k,
|
|
9188
9206
|
handleRowIndexClickSafe: F,
|
|
9189
9207
|
handleRowIndexKeydownSafe: c,
|
|
9190
|
-
handleRowIndexDragStart:
|
|
9208
|
+
handleRowIndexDragStart: E,
|
|
9191
9209
|
handleRowIndexDragOver: g,
|
|
9192
9210
|
handleRowIndexDrop: ie,
|
|
9193
9211
|
clearRowIndexDragState: Q
|
|
@@ -9226,8 +9244,8 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9226
9244
|
selectionRanges: $,
|
|
9227
9245
|
displayRows: ee,
|
|
9228
9246
|
visibleColumns: W,
|
|
9229
|
-
viewportRowStart: o(() =>
|
|
9230
|
-
isHoveredRow:
|
|
9247
|
+
viewportRowStart: o(() => P.value.viewportRowStart),
|
|
9248
|
+
isHoveredRow: Pt,
|
|
9231
9249
|
isStripedRow: Lt,
|
|
9232
9250
|
resolveAbsoluteRowIndex: Te,
|
|
9233
9251
|
isCellSelectedSafe: Re,
|
|
@@ -9270,7 +9288,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9270
9288
|
isVisualSelectionAnchorCell: _t,
|
|
9271
9289
|
shouldHighlightSelectedCellVisual: Mt,
|
|
9272
9290
|
isRangeMoveHandleHoverCell: da,
|
|
9273
|
-
isCellInFillPreviewSafe:
|
|
9291
|
+
isCellInFillPreviewSafe: Ee,
|
|
9274
9292
|
isCellInPendingClipboardRangeSafe: Ke,
|
|
9275
9293
|
isCellOnPendingClipboardEdgeSafe: at
|
|
9276
9294
|
}), {
|
|
@@ -9299,7 +9317,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9299
9317
|
bodyViewportScrollLeft: St,
|
|
9300
9318
|
bodyViewportClientWidth: tt,
|
|
9301
9319
|
bodyViewportClientHeight: ue,
|
|
9302
|
-
pinnedBottomViewportClientHeight:
|
|
9320
|
+
pinnedBottomViewportClientHeight: Et,
|
|
9303
9321
|
bodyViewportTopOffset: $t,
|
|
9304
9322
|
headerShellHeight: Ne,
|
|
9305
9323
|
headerViewportClientWidth: Ue,
|
|
@@ -9343,14 +9361,14 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9343
9361
|
rightBottomPaneContentRef: ve,
|
|
9344
9362
|
displayRows: ee,
|
|
9345
9363
|
visibleColumns: W,
|
|
9346
|
-
viewportRowStart: o(() =>
|
|
9364
|
+
viewportRowStart: o(() => P.value.viewportRowStart),
|
|
9347
9365
|
resolveAbsoluteRowIndex: Te,
|
|
9348
9366
|
isSelectionAnchorCellSafe: ut,
|
|
9349
9367
|
isCellEditableSafe: $e
|
|
9350
9368
|
}), {
|
|
9351
|
-
fillActionMenuOpen:
|
|
9369
|
+
fillActionMenuOpen: Pr,
|
|
9352
9370
|
floatingFillActionStyle: $r,
|
|
9353
|
-
toggleFloatingFillActionMenu:
|
|
9371
|
+
toggleFloatingFillActionMenu: Er,
|
|
9354
9372
|
handleFillActionSelection: Kr
|
|
9355
9373
|
} = wu({
|
|
9356
9374
|
selection: h,
|
|
@@ -9369,7 +9387,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9369
9387
|
indexColumnWidthPx: cr,
|
|
9370
9388
|
pinnedLeftColumns: De,
|
|
9371
9389
|
pinnedRightColumns: Ae,
|
|
9372
|
-
resolveColumnWidth:
|
|
9390
|
+
resolveColumnWidth: M,
|
|
9373
9391
|
resolveViewportRowStart: Y,
|
|
9374
9392
|
resolveVisibleCellElement: ur.resolveVisibleCellElement,
|
|
9375
9393
|
resolveVisibleRowElement: ur.resolveVisibleRowElement,
|
|
@@ -9388,8 +9406,8 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9388
9406
|
selectionRange: L,
|
|
9389
9407
|
visibleColumns: W,
|
|
9390
9408
|
displayRows: ee,
|
|
9391
|
-
viewportRowStart: o(() =>
|
|
9392
|
-
fillActionMenuOpen:
|
|
9409
|
+
viewportRowStart: o(() => P.value.viewportRowStart),
|
|
9410
|
+
fillActionMenuOpen: Pr,
|
|
9393
9411
|
isCellSelectedSafe: Re,
|
|
9394
9412
|
isCellEditableSafe: Ie,
|
|
9395
9413
|
isCellOnSelectionEdgeSafe: pe
|
|
@@ -9410,7 +9428,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9410
9428
|
isRowIndexDraggable: n,
|
|
9411
9429
|
handleRowIndexClickSafe: F,
|
|
9412
9430
|
handleRowIndexKeydownSafe: c,
|
|
9413
|
-
handleRowIndexDragStart:
|
|
9431
|
+
handleRowIndexDragStart: E,
|
|
9414
9432
|
handleRowIndexDragOver: g,
|
|
9415
9433
|
handleRowIndexDrop: ie,
|
|
9416
9434
|
clearRowIndexDragState: Q,
|
|
@@ -9431,7 +9449,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9431
9449
|
isCellSelectedSafe: Re,
|
|
9432
9450
|
isSelectionAnchorCellSafe: ut,
|
|
9433
9451
|
shouldHighlightSelectedCellVisual: Mt,
|
|
9434
|
-
isCellInFillPreviewSafe:
|
|
9452
|
+
isCellInFillPreviewSafe: Ee,
|
|
9435
9453
|
isCellInPendingClipboardRangeSafe: Ke,
|
|
9436
9454
|
isCellOnPendingClipboardEdgeSafe: at,
|
|
9437
9455
|
isCellOnSelectionEdgeSafe: pe,
|
|
@@ -9487,11 +9505,11 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9487
9505
|
})), il = o(() => ({
|
|
9488
9506
|
handleCenterViewportScroll: lr,
|
|
9489
9507
|
handleBodyViewportWheel: ft,
|
|
9490
|
-
handleViewportKeydown: (V) =>
|
|
9508
|
+
handleViewportKeydown: (V) => P.value.handleViewportKeydown(V),
|
|
9491
9509
|
handleLinkedViewportWheel: Yt
|
|
9492
9510
|
}));
|
|
9493
9511
|
function ol(V) {
|
|
9494
|
-
|
|
9512
|
+
P.value.handleViewportKeydown(V);
|
|
9495
9513
|
}
|
|
9496
9514
|
const dl = o(() => ({
|
|
9497
9515
|
bodyViewportClientHeight: ue.value,
|
|
@@ -9503,7 +9521,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9503
9521
|
pinnedRightColumns: Ae.value,
|
|
9504
9522
|
layoutGridContentWidth: Aa(w.value.gridContentStyle.width ?? w.value.gridContentStyle.minWidth, 0),
|
|
9505
9523
|
columnIndexByKey: ma,
|
|
9506
|
-
resolveColumnWidth:
|
|
9524
|
+
resolveColumnWidth: M,
|
|
9507
9525
|
resolveLeftColumnSpacerWidth: le
|
|
9508
9526
|
})), ul = o(() => {
|
|
9509
9527
|
const V = /* @__PURE__ */ new Map();
|
|
@@ -9571,9 +9589,9 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9571
9589
|
rightFillPreviewOverlaySegments: Rl,
|
|
9572
9590
|
rightFillPreviewSeamOverlaySegments: _l,
|
|
9573
9591
|
leftPinnedBottomFillPreviewOverlaySegments: Ml,
|
|
9574
|
-
leftPinnedBottomFillPreviewSeamOverlaySegments:
|
|
9592
|
+
leftPinnedBottomFillPreviewSeamOverlaySegments: Pl,
|
|
9575
9593
|
centerPinnedBottomFillPreviewOverlaySegments: Xa,
|
|
9576
|
-
rightPinnedBottomFillPreviewOverlaySegments:
|
|
9594
|
+
rightPinnedBottomFillPreviewOverlaySegments: El,
|
|
9577
9595
|
rightPinnedBottomFillPreviewSeamOverlaySegments: Il,
|
|
9578
9596
|
leftMovePreviewOverlaySegments: Dl,
|
|
9579
9597
|
leftMovePreviewSeamOverlaySegments: Al,
|
|
@@ -9599,7 +9617,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9599
9617
|
overlayGeometryContext: dl,
|
|
9600
9618
|
bodyViewportClientHeight: ue,
|
|
9601
9619
|
bodyViewportScrollTop: lt,
|
|
9602
|
-
bottomViewportClientHeight:
|
|
9620
|
+
bottomViewportClientHeight: Et,
|
|
9603
9621
|
visibleColumns: W,
|
|
9604
9622
|
displayRows: ee,
|
|
9605
9623
|
selectionRanges: $,
|
|
@@ -9609,9 +9627,9 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9609
9627
|
rowMetrics: oe,
|
|
9610
9628
|
pinnedBottomRowMetrics: re,
|
|
9611
9629
|
isCellSelectedSafe: Re,
|
|
9612
|
-
isCellInFillPreviewSafe:
|
|
9630
|
+
isCellInFillPreviewSafe: Ee,
|
|
9613
9631
|
isAdditiveSelection: Na,
|
|
9614
|
-
isFillDragging:
|
|
9632
|
+
isFillDragging: _,
|
|
9615
9633
|
isRangeMoving: ct,
|
|
9616
9634
|
resolveVisibleRangeBounds: gl,
|
|
9617
9635
|
resolvePinnedBottomVisibleRangeBounds: vl,
|
|
@@ -9621,7 +9639,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9621
9639
|
rightPaneWidth: ye.value,
|
|
9622
9640
|
bodyViewportClientWidth: tt.value,
|
|
9623
9641
|
bodyViewportClientHeight: ue.value,
|
|
9624
|
-
pinnedBottomViewportClientHeight:
|
|
9642
|
+
pinnedBottomViewportClientHeight: Et.value,
|
|
9625
9643
|
headerShellHeight: Ne.value,
|
|
9626
9644
|
headerViewportClientWidth: Ue.value
|
|
9627
9645
|
})), Ul = o(() => ({
|
|
@@ -9651,9 +9669,9 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9651
9669
|
rightFillPreviewOverlaySegments: Rl,
|
|
9652
9670
|
rightFillPreviewSeamOverlaySegments: _l,
|
|
9653
9671
|
leftPinnedBottomFillPreviewOverlaySegments: Ml,
|
|
9654
|
-
leftPinnedBottomFillPreviewSeamOverlaySegments:
|
|
9672
|
+
leftPinnedBottomFillPreviewSeamOverlaySegments: Pl,
|
|
9655
9673
|
centerPinnedBottomFillPreviewOverlaySegments: Xa,
|
|
9656
|
-
rightPinnedBottomFillPreviewOverlaySegments:
|
|
9674
|
+
rightPinnedBottomFillPreviewOverlaySegments: El,
|
|
9657
9675
|
rightPinnedBottomFillPreviewSeamOverlaySegments: Il,
|
|
9658
9676
|
leftMovePreviewOverlaySegments: Dl,
|
|
9659
9677
|
leftMovePreviewSeamOverlaySegments: Al,
|
|
@@ -9714,7 +9732,7 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9714
9732
|
"grid-stage--auto-row-height": m(u) === "base" && m(s) === "auto",
|
|
9715
9733
|
"grid-stage--layout-fill": m(C) === "fill",
|
|
9716
9734
|
"grid-stage--layout-auto-height": m(C) === "auto-height",
|
|
9717
|
-
"grid-stage--fill-dragging":
|
|
9735
|
+
"grid-stage--fill-dragging": _.value,
|
|
9718
9736
|
"grid-stage--range-moving": ct.value,
|
|
9719
9737
|
"grid-stage--single-cell-selection": sl.value,
|
|
9720
9738
|
"grid-stage--additive-selection": Na.value
|
|
@@ -9791,8 +9809,8 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9791
9809
|
"display-rows": m(i).displayRows,
|
|
9792
9810
|
"runtime-revision": m(i).runtimeRevision,
|
|
9793
9811
|
"body-rows-revision": m(i).displayRowsRevision,
|
|
9794
|
-
"top-spacer-height": m(
|
|
9795
|
-
"bottom-spacer-height": m(
|
|
9812
|
+
"top-spacer-height": m(P).topSpacerHeight,
|
|
9813
|
+
"bottom-spacer-height": m(P).bottomSpacerHeight,
|
|
9796
9814
|
"viewport-ref": m(mt),
|
|
9797
9815
|
"report-center-pane-diagnostics": r.reportCenterPaneDiagnostics,
|
|
9798
9816
|
"report-fill-plumbing-state": r.reportFillPlumbingState,
|
|
@@ -9820,9 +9838,9 @@ const Nu = /* @__PURE__ */ At({
|
|
|
9820
9838
|
_: 1
|
|
9821
9839
|
}, 8, ["pane", "render-api", "handle-context-menu"]),
|
|
9822
9840
|
Ye(jd, {
|
|
9823
|
-
"is-open": m(
|
|
9841
|
+
"is-open": m(Pr),
|
|
9824
9842
|
style: ae(m($r)),
|
|
9825
|
-
onToggle: m(
|
|
9843
|
+
onToggle: m(Er),
|
|
9826
9844
|
onSelected: m(Kr)
|
|
9827
9845
|
}, null, 8, ["is-open", "style", "onToggle", "onSelected"])
|
|
9828
9846
|
], 36),
|
|
@@ -9910,17 +9928,17 @@ function qu(e) {
|
|
|
9910
9928
|
};
|
|
9911
9929
|
}
|
|
9912
9930
|
const Uu = 12, La = 280, Oa = 240;
|
|
9913
|
-
function
|
|
9931
|
+
function Ea(e, t) {
|
|
9914
9932
|
return Number.isFinite(e) ? Math.max(1, Math.round(Number(e))) : t;
|
|
9915
9933
|
}
|
|
9916
9934
|
function Zn(e) {
|
|
9917
|
-
const t =
|
|
9935
|
+
const t = Ea(
|
|
9918
9936
|
e.minTableWidth,
|
|
9919
9937
|
La
|
|
9920
|
-
), r =
|
|
9938
|
+
), r = Ea(
|
|
9921
9939
|
e.minTimelineWidth,
|
|
9922
9940
|
Oa
|
|
9923
|
-
), d =
|
|
9941
|
+
), d = Ea(e.requestedWidth, t), u = Number.isFinite(e.stageWidth) ? Math.max(0, Number(e.stageWidth)) : 0, s = Number.isFinite(e.maxTableWidth) ? Math.max(t, Math.round(Number(e.maxTableWidth))) : Number.POSITIVE_INFINITY, C = u > 0 ? Math.max(t, u - r) : Number.POSITIVE_INFINITY;
|
|
9924
9942
|
return Math.min(
|
|
9925
9943
|
Math.max(d, t),
|
|
9926
9944
|
Math.min(s, C)
|
|
@@ -9945,12 +9963,12 @@ function Zu(e, t, r) {
|
|
|
9945
9963
|
const u = "...";
|
|
9946
9964
|
if (r(u) > t)
|
|
9947
9965
|
return null;
|
|
9948
|
-
let C = 0, w = d.length,
|
|
9966
|
+
let C = 0, w = d.length, P = "";
|
|
9949
9967
|
for (; C <= w; ) {
|
|
9950
9968
|
const b = Math.floor((C + w) / 2), i = `${d.slice(0, b).trimEnd()}${u}`;
|
|
9951
|
-
r(i) <= t ? (
|
|
9969
|
+
r(i) <= t ? (P = i, C = b + 1) : w = b - 1;
|
|
9952
9970
|
}
|
|
9953
|
-
return
|
|
9971
|
+
return P.length > 0 ? P : null;
|
|
9954
9972
|
}
|
|
9955
9973
|
const Ju = 6;
|
|
9956
9974
|
function Dr(e) {
|
|
@@ -9967,7 +9985,7 @@ function Qu(e, t, r) {
|
|
|
9967
9985
|
const h = e.x - t.x, l = e.y - t.y;
|
|
9968
9986
|
return h * h + l * l;
|
|
9969
9987
|
}
|
|
9970
|
-
const s = ((e.x - t.x) * d + (e.y - t.y) * u) / (d * d + u * u), C = Math.max(0, Math.min(1, s)), w = t.x + d * C,
|
|
9988
|
+
const s = ((e.x - t.x) * d + (e.y - t.y) * u) / (d * d + u * u), C = Math.max(0, Math.min(1, s)), w = t.x + d * C, P = t.y + u * C, b = e.x - w, i = e.y - P;
|
|
9971
9989
|
return b * b + i * i;
|
|
9972
9990
|
}
|
|
9973
9991
|
function Rn(e, t, r = Ju) {
|
|
@@ -9975,10 +9993,10 @@ function Rn(e, t, r = Ju) {
|
|
|
9975
9993
|
let u = null, s = Number.POSITIVE_INFINITY;
|
|
9976
9994
|
for (const C of e)
|
|
9977
9995
|
for (let w = 1; w < C.points.length; w += 1) {
|
|
9978
|
-
const
|
|
9979
|
-
if (!
|
|
9996
|
+
const P = C.points[w - 1], b = C.points[w];
|
|
9997
|
+
if (!P || !b)
|
|
9980
9998
|
continue;
|
|
9981
|
-
const i = Qu(t,
|
|
9999
|
+
const i = Qu(t, P, b);
|
|
9982
10000
|
i > d || i >= s || (s = i, u = C);
|
|
9983
10001
|
}
|
|
9984
10002
|
return u;
|
|
@@ -9986,7 +10004,7 @@ function Rn(e, t, r = Ju) {
|
|
|
9986
10004
|
const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-gantt-stage__timeline-body" }, rs = {
|
|
9987
10005
|
key: 0,
|
|
9988
10006
|
class: "datagrid-gantt-stage__empty"
|
|
9989
|
-
}, _n = 48, Mn = 240, ra = 40,
|
|
10007
|
+
}, _n = 48, Mn = 240, ra = 40, Pn = 24, as = /* @__PURE__ */ At({
|
|
9990
10008
|
__name: "DataGridGanttStage",
|
|
9991
10009
|
props: {
|
|
9992
10010
|
stageContext: {},
|
|
@@ -9997,13 +10015,13 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
9997
10015
|
},
|
|
9998
10016
|
setup(e) {
|
|
9999
10017
|
Kn();
|
|
10000
|
-
const t = /* @__PURE__ */ new Set(), r = e, d = r.stageContext, u = o(() => Ro(d)), s = o(() => d.rows.value), C = o(() => d.viewport.value), w = o(() => d.selection.value),
|
|
10018
|
+
const t = /* @__PURE__ */ new Set(), r = e, d = r.stageContext, u = o(() => Ro(d)), s = o(() => d.rows.value), C = o(() => d.viewport.value), w = o(() => d.selection.value), P = o(() => d.columns.value), b = o(() => d.rowHeightMode.value), i = Z(null), h = Z(null), l = Z(null), v = Z(null), R = Z(null), W = Z(null), p = Z(null), ee = Z(_n), U = Z(0), L = Z(0), $ = Z(0), _ = Z(0), z = Z(0), G = Z(null), M = Z(null), x = Z(null), A = Z(null), I = Z(null), O = Z(!1), B = Z(null);
|
|
10001
10019
|
let X = !1, q = !1, Y = null, J = null, le = null, we = !1;
|
|
10002
10020
|
function Re(n) {
|
|
10003
10021
|
const k = new Date(n);
|
|
10004
10022
|
return Date.UTC(k.getUTCFullYear(), k.getUTCMonth(), k.getUTCDate());
|
|
10005
10023
|
}
|
|
10006
|
-
function
|
|
10024
|
+
function Pe(n) {
|
|
10007
10025
|
if (!n)
|
|
10008
10026
|
return null;
|
|
10009
10027
|
try {
|
|
@@ -10020,11 +10038,11 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10020
10038
|
return c.length > 0 ? c : k;
|
|
10021
10039
|
}
|
|
10022
10040
|
function Fe(n, k, F) {
|
|
10023
|
-
const c =
|
|
10041
|
+
const c = Pe(n);
|
|
10024
10042
|
if (!n || !c)
|
|
10025
10043
|
return null;
|
|
10026
|
-
const
|
|
10027
|
-
return (n.width !== Math.round(g *
|
|
10044
|
+
const E = typeof window > "u" ? 1 : Math.max(1, window.devicePixelRatio || 1), g = Math.max(1, Math.round(k)), ie = Math.max(1, Math.round(F));
|
|
10045
|
+
return (n.width !== Math.round(g * E) || n.height !== Math.round(ie * E)) && (n.width = Math.round(g * E), n.height = Math.round(ie * E)), c.setTransform(E, 0, 0, E, 0, 0), c.clearRect(0, 0, g, ie), c;
|
|
10028
10046
|
}
|
|
10029
10047
|
function rt(n) {
|
|
10030
10048
|
return n ? Math.max(
|
|
@@ -10032,24 +10050,24 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10032
10050
|
Math.round(n.getBoundingClientRect().width)
|
|
10033
10051
|
) : 0;
|
|
10034
10052
|
}
|
|
10035
|
-
function Ze(n, k, F, c,
|
|
10036
|
-
const ie = Math.max(0, Math.min(g, c / 2,
|
|
10037
|
-
n.beginPath(), n.moveTo(k + ie, F), n.lineTo(k + c - ie, F), n.quadraticCurveTo(k + c, F, k + c, F + ie), n.lineTo(k + c, F +
|
|
10053
|
+
function Ze(n, k, F, c, E, g) {
|
|
10054
|
+
const ie = Math.max(0, Math.min(g, c / 2, E / 2));
|
|
10055
|
+
n.beginPath(), n.moveTo(k + ie, F), n.lineTo(k + c - ie, F), n.quadraticCurveTo(k + c, F, k + c, F + ie), n.lineTo(k + c, F + E - ie), n.quadraticCurveTo(k + c, F + E, k + c - ie, F + E), n.lineTo(k + ie, F + E), n.quadraticCurveTo(k, F + E, k, F + E - ie), n.lineTo(k, F + ie), n.quadraticCurveTo(k, F, k + ie, F), n.closePath();
|
|
10038
10056
|
}
|
|
10039
10057
|
function $e(n, k, F, c) {
|
|
10040
|
-
const
|
|
10041
|
-
n.beginPath(), n.moveTo(k, F -
|
|
10058
|
+
const E = Math.max(1, c / 2);
|
|
10059
|
+
n.beginPath(), n.moveTo(k, F - E), n.lineTo(k + E, F), n.lineTo(k, F + E), n.lineTo(k - E, F), n.closePath();
|
|
10042
10060
|
}
|
|
10043
|
-
function _t(n, k, F, c,
|
|
10044
|
-
Math.abs(F - k) < 2 || (n.save(), n.strokeStyle =
|
|
10061
|
+
function _t(n, k, F, c, E) {
|
|
10062
|
+
Math.abs(F - k) < 2 || (n.save(), n.strokeStyle = E, n.lineWidth = 1.5, n.lineCap = "round", n.beginPath(), n.moveTo(k, c), n.lineTo(F, c), n.moveTo(k, c - 3), n.lineTo(k, c + 3), n.moveTo(F, c - 3), n.lineTo(F, c + 3), n.stroke(), n.restore());
|
|
10045
10063
|
}
|
|
10046
|
-
function Mt(n, k, F, c,
|
|
10064
|
+
function Mt(n, k, F, c, E) {
|
|
10047
10065
|
const g = k[0];
|
|
10048
10066
|
if (!g || k.length < 2)
|
|
10049
10067
|
return;
|
|
10050
10068
|
n.save();
|
|
10051
10069
|
const ie = F === "FS" ? [] : F === "SS" ? [5, 3] : F === "FF" ? [8, 3] : [2, 3];
|
|
10052
|
-
n.setLineDash(ie), n.strokeStyle =
|
|
10070
|
+
n.setLineDash(ie), n.strokeStyle = E, n.lineWidth = 4, n.lineJoin = "round", n.lineCap = "round", n.beginPath(), n.moveTo(g.x, g.y);
|
|
10053
10071
|
for (let Ce = 1; Ce < k.length; Ce += 1) {
|
|
10054
10072
|
const Le = k[Ce];
|
|
10055
10073
|
Le && n.lineTo(Le.x, Le.y);
|
|
@@ -10074,15 +10092,15 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10074
10092
|
}
|
|
10075
10093
|
n.restore();
|
|
10076
10094
|
}
|
|
10077
|
-
function ut(n, k, F, c,
|
|
10078
|
-
const Q = Math.max(0,
|
|
10095
|
+
function ut(n, k, F, c, E, g) {
|
|
10096
|
+
const Q = Math.max(0, E - 16), ze = Zu(
|
|
10079
10097
|
k,
|
|
10080
10098
|
Q,
|
|
10081
10099
|
(Ce) => n.measureText(Ce).width
|
|
10082
10100
|
);
|
|
10083
|
-
ze && (n.save(), n.beginPath(), n.rect(F, c,
|
|
10101
|
+
ze && (n.save(), n.beginPath(), n.rect(F, c, E, g), n.clip(), n.fillText(ze, F + 8, c + g / 2), n.restore());
|
|
10084
10102
|
}
|
|
10085
|
-
function
|
|
10103
|
+
function Ee() {
|
|
10086
10104
|
const n = p.value;
|
|
10087
10105
|
if (!n) {
|
|
10088
10106
|
U.value = 0, L.value = 0;
|
|
@@ -10117,7 +10135,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10117
10135
|
function pe(n = "both") {
|
|
10118
10136
|
X = X || n !== "body", q = q || n !== "header", !(B.value != null || typeof window > "u") && (B.value = window.requestAnimationFrame(() => {
|
|
10119
10137
|
const k = X, F = q;
|
|
10120
|
-
B.value = null, X = !1, q = !1, k && ue(), F &&
|
|
10138
|
+
B.value = null, X = !1, q = !1, k && ue(), F && Et();
|
|
10121
10139
|
}));
|
|
10122
10140
|
}
|
|
10123
10141
|
function st() {
|
|
@@ -10131,11 +10149,11 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10131
10149
|
const n = [];
|
|
10132
10150
|
let k = C.value.topSpacerHeight;
|
|
10133
10151
|
for (let F = 0; F < s.value.displayRows.length; F += 1) {
|
|
10134
|
-
const c = C.value.viewportRowStart + F,
|
|
10152
|
+
const c = C.value.viewportRowStart + F, E = Math.max(1, wt(c));
|
|
10135
10153
|
n.push({
|
|
10136
10154
|
top: k,
|
|
10137
|
-
height:
|
|
10138
|
-
}), k +=
|
|
10155
|
+
height: E
|
|
10156
|
+
}), k += E;
|
|
10139
10157
|
}
|
|
10140
10158
|
return n;
|
|
10141
10159
|
}
|
|
@@ -10143,7 +10161,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10143
10161
|
}), Ae = o(() => r.gantt ? (r.rowVersion, Mi({
|
|
10144
10162
|
getCount: () => r.runtime.api.rows.getCount(),
|
|
10145
10163
|
get: (n) => r.runtime.api.rows.get(n)
|
|
10146
|
-
}, r.gantt)) : null), se = o(() => Ae.value?.timeline ?? null), Je = o(() => Ae.value?.criticalTaskIds ?? t), He = o(() => !r.gantt || !se.value ? [] : (r.rowVersion, ct.value,
|
|
10164
|
+
}, r.gantt)) : null), se = o(() => Ae.value?.timeline ?? null), Je = o(() => Ae.value?.criticalTaskIds ?? t), He = o(() => !r.gantt || !se.value ? [] : (r.rowVersion, ct.value, Pi({
|
|
10147
10165
|
rows: s.value.displayRows,
|
|
10148
10166
|
rowMetrics: De.value,
|
|
10149
10167
|
viewportRowStart: C.value.viewportRowStart,
|
|
@@ -10167,7 +10185,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10167
10185
|
}), n;
|
|
10168
10186
|
}), ne = o(() => {
|
|
10169
10187
|
const n = se.value;
|
|
10170
|
-
return !n || !r.gantt ? [] :
|
|
10188
|
+
return !n || !r.gantt ? [] : Ei({
|
|
10171
10189
|
bars: He.value,
|
|
10172
10190
|
resolveFrame: (k) => {
|
|
10173
10191
|
const F = lt(k), c = ba(
|
|
@@ -10177,7 +10195,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10177
10195
|
k.milestone ? k.height : void 0
|
|
10178
10196
|
);
|
|
10179
10197
|
return {
|
|
10180
|
-
x: c.x -
|
|
10198
|
+
x: c.x - _.value,
|
|
10181
10199
|
width: c.width,
|
|
10182
10200
|
y: k.y,
|
|
10183
10201
|
height: k.height
|
|
@@ -10191,7 +10209,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10191
10209
|
n.targetBar.rowId
|
|
10192
10210
|
]) : /* @__PURE__ */ new Set();
|
|
10193
10211
|
}), Tt = o(() => {
|
|
10194
|
-
const n = w.value.selectionRange, k =
|
|
10212
|
+
const n = w.value.selectionRange, k = P.value.visibleColumns.length;
|
|
10195
10213
|
if (!n || k <= 0)
|
|
10196
10214
|
return null;
|
|
10197
10215
|
const F = Math.min(n.startColumn, n.endColumn), c = Math.max(n.startColumn, n.endColumn);
|
|
@@ -10210,8 +10228,8 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10210
10228
|
}
|
|
10211
10229
|
if (!k)
|
|
10212
10230
|
return;
|
|
10213
|
-
const
|
|
10214
|
-
|
|
10231
|
+
const E = C.value.viewportRowStart + c;
|
|
10232
|
+
E >= k.startRow && E <= k.endRow && n.add(String(F.rowId));
|
|
10215
10233
|
}), n;
|
|
10216
10234
|
}), xt = o(() => De.value.flatMap((n, k) => {
|
|
10217
10235
|
const F = s.value.displayRows[k];
|
|
@@ -10231,7 +10249,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10231
10249
|
};
|
|
10232
10250
|
}
|
|
10233
10251
|
function vt(n) {
|
|
10234
|
-
const k = Wt(n), F =
|
|
10252
|
+
const k = Wt(n), F = P.value.visibleColumns.length;
|
|
10235
10253
|
!k || F <= 0 || (r.runtime.api.selection.hasSupport() && r.runtime.api.selection.setSnapshot({
|
|
10236
10254
|
ranges: [{
|
|
10237
10255
|
startRow: k.rowIndex,
|
|
@@ -10319,7 +10337,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10319
10337
|
width: `${et.value}px`,
|
|
10320
10338
|
minWidth: `${et.value}px`,
|
|
10321
10339
|
maxWidth: `${et.value}px`
|
|
10322
|
-
})),
|
|
10340
|
+
})), Pt = o(() => ({
|
|
10323
10341
|
left: `${et.value}px`,
|
|
10324
10342
|
width: `${Uu}px`
|
|
10325
10343
|
})), Lt = o(() => ({
|
|
@@ -10334,7 +10352,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10334
10352
|
width: `${se.value?.totalWidth ?? 1}px`,
|
|
10335
10353
|
minWidth: `${se.value?.totalWidth ?? 1}px`,
|
|
10336
10354
|
height: `${Math.max(L.value, 1)}px`
|
|
10337
|
-
})), xe = o(() =>
|
|
10355
|
+
})), xe = o(() => M.value ? "col-resize" : G.value ? G.value.mode === "move" ? "grabbing" : "col-resize" : x.value ? x.value.mode === "move" ? "grab" : "col-resize" : A.value ? "pointer" : "default");
|
|
10338
10356
|
function Be() {
|
|
10339
10357
|
I.value == null && A.value == null || (I.value = null, A.value = null, pe("body"));
|
|
10340
10358
|
}
|
|
@@ -10351,11 +10369,11 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10351
10369
|
function St(n) {
|
|
10352
10370
|
typeof document > "u" || (document.body.style.cursor = n ? "col-resize" : "", document.body.style.userSelect = n ? "none" : "");
|
|
10353
10371
|
}
|
|
10354
|
-
function tt(n, k, F, c,
|
|
10372
|
+
function tt(n, k, F, c, E) {
|
|
10355
10373
|
for (const g of k) {
|
|
10356
10374
|
if (g.width < 18)
|
|
10357
10375
|
continue;
|
|
10358
|
-
const ie = Math.max(0, g.x), Q = Math.min(
|
|
10376
|
+
const ie = Math.max(0, g.x), Q = Math.min(E, g.x + g.width);
|
|
10359
10377
|
Q <= ie || (n.save(), n.beginPath(), n.rect(ie, F, Q - ie, c), n.clip(), n.fillText(
|
|
10360
10378
|
g.label,
|
|
10361
10379
|
Math.max(ie + 8, g.x + 8),
|
|
@@ -10367,9 +10385,9 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10367
10385
|
const n = se.value, k = l.value;
|
|
10368
10386
|
if (!n || !k)
|
|
10369
10387
|
return;
|
|
10370
|
-
const F = Math.max(1, ee.value), c = Math.max(1, z.value || k.clientWidth || 1),
|
|
10388
|
+
const F = Math.max(1, ee.value), c = Math.max(1, z.value || k.clientWidth || 1), E = rn({
|
|
10371
10389
|
timeline: n,
|
|
10372
|
-
scrollLeft:
|
|
10390
|
+
scrollLeft: _.value,
|
|
10373
10391
|
viewportWidth: c,
|
|
10374
10392
|
workingCalendar: r.gantt?.workingCalendar ?? null,
|
|
10375
10393
|
headerBufferPx: 0,
|
|
@@ -10383,31 +10401,31 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10383
10401
|
return;
|
|
10384
10402
|
const ie = ge("--datagrid-column-divider-color", "rgba(148, 163, 184, 0.24)"), Q = ge("--datagrid-header-divider-color", "rgba(148, 163, 184, 0.42)"), ze = ge("--datagrid-header-row-bg", "#f8fafc"), Ce = ge("--datagrid-weekend-bg", "rgba(148, 163, 184, 0.12)"), Le = ge("--datagrid-text-primary", "#0f172a"), je = ge("--datagrid-font-family", "ui-sans-serif, system-ui, sans-serif"), ot = ge("--datagrid-accent-strong", "#2563eb"), dt = Math.max(16, Math.round(F * 0.46)), Ot = dt, Kt = Math.max(1, F - dt);
|
|
10385
10403
|
g.fillStyle = ze, g.fillRect(0, 0, c, F), g.fillStyle = Ce;
|
|
10386
|
-
for (const pt of
|
|
10404
|
+
for (const pt of E.nonWorkingSpans) {
|
|
10387
10405
|
const bt = Math.max(0, pt.x), dr = Math.min(c, pt.x + pt.width);
|
|
10388
10406
|
dr <= bt || g.fillRect(bt, Ot, dr - bt, Kt);
|
|
10389
10407
|
}
|
|
10390
10408
|
g.strokeStyle = ie, g.lineWidth = 1;
|
|
10391
|
-
for (const pt of
|
|
10409
|
+
for (const pt of E.secondaryLines) {
|
|
10392
10410
|
const bt = Math.round(pt.x) + 0.5;
|
|
10393
10411
|
g.beginPath(), g.moveTo(bt, Ot), g.lineTo(bt, F), g.stroke();
|
|
10394
10412
|
}
|
|
10395
10413
|
g.strokeStyle = Q;
|
|
10396
|
-
for (const pt of
|
|
10414
|
+
for (const pt of E.primaryLines) {
|
|
10397
10415
|
const bt = Math.round(pt.x) + 0.5;
|
|
10398
10416
|
g.beginPath(), g.moveTo(bt, 0), g.lineTo(bt, F), g.stroke();
|
|
10399
10417
|
}
|
|
10400
|
-
g.beginPath(), g.moveTo(0, Ot - 0.5), g.lineTo(c, Ot - 0.5), g.stroke(), g.strokeStyle = Q, g.beginPath(), g.moveTo(0, F - 0.5), g.lineTo(c, F - 0.5), g.stroke(), g.fillStyle = Le, g.font = `12px ${je}`, g.textBaseline = "middle", tt(g,
|
|
10401
|
-
const It = an(Re(Date.now()), n) -
|
|
10418
|
+
g.beginPath(), g.moveTo(0, Ot - 0.5), g.lineTo(c, Ot - 0.5), g.stroke(), g.strokeStyle = Q, g.beginPath(), g.moveTo(0, F - 0.5), g.lineTo(c, F - 0.5), g.stroke(), g.fillStyle = Le, g.font = `12px ${je}`, g.textBaseline = "middle", tt(g, E.primarySegments, 0, dt, c), tt(g, E.secondarySegments, Ot, Kt, c);
|
|
10419
|
+
const It = an(Re(Date.now()), n) - _.value;
|
|
10402
10420
|
It >= -1 && It <= c + 1 && (g.strokeStyle = ot, g.lineWidth = 2, g.beginPath(), g.moveTo(Math.round(It) + 0.5, 0), g.lineTo(Math.round(It) + 0.5, F), g.stroke());
|
|
10403
10421
|
}
|
|
10404
|
-
function
|
|
10422
|
+
function Et() {
|
|
10405
10423
|
const n = se.value, k = v.value;
|
|
10406
10424
|
if (!n || !k)
|
|
10407
10425
|
return;
|
|
10408
|
-
const F = Math.max(1, L.value || k.clientHeight || He.value.length * r.baseRowHeight), c = Math.max(1, z.value || k.clientWidth || 1),
|
|
10426
|
+
const F = Math.max(1, L.value || k.clientHeight || He.value.length * r.baseRowHeight), c = Math.max(1, z.value || k.clientWidth || 1), E = rn({
|
|
10409
10427
|
timeline: n,
|
|
10410
|
-
scrollLeft:
|
|
10428
|
+
scrollLeft: _.value,
|
|
10411
10429
|
viewportWidth: c,
|
|
10412
10430
|
workingCalendar: r.gantt?.workingCalendar ?? null,
|
|
10413
10431
|
headerBufferPx: 0,
|
|
@@ -10423,7 +10441,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10423
10441
|
underlay: Wr
|
|
10424
10442
|
} : null;
|
|
10425
10443
|
g.fillStyle = ie, g.fillRect(0, 0, c, F), g.fillStyle = Ce;
|
|
10426
|
-
for (const K of
|
|
10444
|
+
for (const K of E.nonWorkingSpans) {
|
|
10427
10445
|
const qe = Math.max(0, K.x), Zt = Math.min(c, K.x + K.width);
|
|
10428
10446
|
Zt <= qe || g.fillRect(qe, 0, Zt - qe, F);
|
|
10429
10447
|
}
|
|
@@ -10433,19 +10451,19 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10433
10451
|
Me <= _e || g.fillRect(0, _e, c, Me - _e);
|
|
10434
10452
|
}
|
|
10435
10453
|
g.strokeStyle = Q, g.lineWidth = 1;
|
|
10436
|
-
for (const K of
|
|
10454
|
+
for (const K of E.secondaryLines) {
|
|
10437
10455
|
const qe = Math.round(K.x) + 0.5;
|
|
10438
10456
|
g.beginPath(), g.moveTo(qe, 0), g.lineTo(qe, F), g.stroke();
|
|
10439
10457
|
}
|
|
10440
10458
|
g.strokeStyle = da;
|
|
10441
|
-
for (const K of
|
|
10459
|
+
for (const K of E.primaryLines) {
|
|
10442
10460
|
const qe = Math.round(K.x) + 0.5;
|
|
10443
10461
|
g.beginPath(), g.moveTo(qe, 0), g.lineTo(qe, F), g.stroke();
|
|
10444
10462
|
}
|
|
10445
10463
|
g.strokeStyle = ze;
|
|
10446
10464
|
for (const K of Qe.value)
|
|
10447
10465
|
g.beginPath(), g.moveTo(0, K), g.lineTo(c, K), g.stroke();
|
|
10448
|
-
const hr = an(Re(Date.now()), n) -
|
|
10466
|
+
const hr = an(Re(Date.now()), n) - _.value;
|
|
10449
10467
|
hr >= -1 && hr <= c + 1 && (g.strokeStyle = ca, g.lineWidth = 2, g.beginPath(), g.moveTo(Math.round(hr) + 0.5, 0), g.lineTo(Math.round(hr) + 0.5, F), g.stroke());
|
|
10450
10468
|
for (const K of ne.value) {
|
|
10451
10469
|
const qe = Dr(K) === I.value;
|
|
@@ -10464,7 +10482,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10464
10482
|
n,
|
|
10465
10483
|
r.gantt?.minBarWidth ?? 6,
|
|
10466
10484
|
K.milestone ? K.height : void 0
|
|
10467
|
-
), _e = Zt.x -
|
|
10485
|
+
), _e = Zt.x - _.value, Me = Zt.width, Mr = gt.value.has(K.rowId), va = Ut.value.has(K.rowId), er = ga({
|
|
10468
10486
|
isTableRowSelected: Mr,
|
|
10469
10487
|
isDependencySelectedBar: va
|
|
10470
10488
|
}), fr = K.baselineStartMs != null && K.baselineEndMs != null && (K.baselineStartMs !== K.startMs || K.baselineEndMs !== K.endMs), zr = K.summary ? dt : G.value?.rowId === K.rowId ? ot : je;
|
|
@@ -10477,7 +10495,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10477
10495
|
n,
|
|
10478
10496
|
r.gantt?.minBarWidth ?? 6,
|
|
10479
10497
|
K.milestone ? K.height : void 0
|
|
10480
|
-
), tr = Nt.x -
|
|
10498
|
+
), tr = Nt.x - _.value, Gr = _e, ur = _e + Me, Pr = tr, $r = tr + Nt.width;
|
|
10481
10499
|
if (K.milestone)
|
|
10482
10500
|
$e(
|
|
10483
10501
|
g,
|
|
@@ -10491,15 +10509,15 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10491
10509
|
Math.max(Math.max(8, Nt.width - 2), K.height - 2)
|
|
10492
10510
|
), g.strokeStyle = pt, g.lineWidth = 1, g.stroke();
|
|
10493
10511
|
else {
|
|
10494
|
-
const
|
|
10495
|
-
Ze(g, tr, Kr, Nt.width,
|
|
10512
|
+
const Er = Math.max(4, Math.min(6, Math.round(K.height * 0.34))), Kr = K.y + K.height - Er;
|
|
10513
|
+
Ze(g, tr, Kr, Nt.width, Er, 3), g.fillStyle = It, g.fill(), Ze(g, tr, Kr, Nt.width, Er, 3), g.strokeStyle = pt, g.lineWidth = 1, g.stroke();
|
|
10496
10514
|
}
|
|
10497
10515
|
_t(
|
|
10498
10516
|
g,
|
|
10499
|
-
|
|
10517
|
+
Pr,
|
|
10500
10518
|
Gr,
|
|
10501
10519
|
K.y + 2.5,
|
|
10502
|
-
Gr >=
|
|
10520
|
+
Gr >= Pr ? bt : dr
|
|
10503
10521
|
), _t(
|
|
10504
10522
|
g,
|
|
10505
10523
|
$r,
|
|
@@ -10521,17 +10539,17 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10521
10539
|
return 0;
|
|
10522
10540
|
const F = k.getBoundingClientRect();
|
|
10523
10541
|
if (n <= F.left + ra) {
|
|
10524
|
-
const
|
|
10525
|
-
return -Math.max(1, Math.round(
|
|
10542
|
+
const E = 1 - Math.max(0, n - F.left) / ra;
|
|
10543
|
+
return -Math.max(1, Math.round(Pn * E));
|
|
10526
10544
|
}
|
|
10527
10545
|
if (n >= F.right - ra) {
|
|
10528
|
-
const
|
|
10529
|
-
return Math.max(1, Math.round(
|
|
10546
|
+
const E = 1 - Math.max(0, F.right - n) / ra;
|
|
10547
|
+
return Math.max(1, Math.round(Pn * E));
|
|
10530
10548
|
}
|
|
10531
10549
|
return 0;
|
|
10532
10550
|
}
|
|
10533
10551
|
function Ne(n, k) {
|
|
10534
|
-
if (
|
|
10552
|
+
if (_.value = Ai(
|
|
10535
10553
|
n,
|
|
10536
10554
|
se.value?.totalWidth ?? 0,
|
|
10537
10555
|
z.value
|
|
@@ -10539,14 +10557,14 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10539
10557
|
pe();
|
|
10540
10558
|
return;
|
|
10541
10559
|
}
|
|
10542
|
-
we = !0, k !== "header" && l.value && l.value.scrollLeft !==
|
|
10560
|
+
we = !0, k !== "header" && l.value && l.value.scrollLeft !== _.value && (l.value.scrollLeft = _.value), k !== "body" && v.value && v.value.scrollLeft !== _.value && (v.value.scrollLeft = _.value), we = !1, pe();
|
|
10543
10561
|
}
|
|
10544
10562
|
function Ue() {
|
|
10545
10563
|
if (!se.value) {
|
|
10546
10564
|
Ne(0, "body");
|
|
10547
10565
|
return;
|
|
10548
10566
|
}
|
|
10549
|
-
Ne(
|
|
10567
|
+
Ne(_.value, "body");
|
|
10550
10568
|
}
|
|
10551
10569
|
function mt() {
|
|
10552
10570
|
if (O.value || !se.value || z.value <= 0)
|
|
@@ -10571,21 +10589,21 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10571
10589
|
const k = p.value, F = v.value;
|
|
10572
10590
|
if (!k || !F)
|
|
10573
10591
|
return;
|
|
10574
|
-
const { horizontalDelta: c, verticalDelta:
|
|
10592
|
+
const { horizontalDelta: c, verticalDelta: E } = qu({
|
|
10575
10593
|
deltaX: n.deltaX,
|
|
10576
10594
|
deltaY: n.deltaY,
|
|
10577
10595
|
shiftKey: n.shiftKey
|
|
10578
10596
|
});
|
|
10579
|
-
if (!(c === 0 &&
|
|
10597
|
+
if (!(c === 0 && E === 0) && (n.preventDefault(), c !== 0 && (F.scrollLeft += c, Ne(F.scrollLeft, "body")), E !== 0)) {
|
|
10580
10598
|
const g = k.scrollTop;
|
|
10581
|
-
k.scrollTop = g +
|
|
10599
|
+
k.scrollTop = g + E, k.scrollTop !== g && (Ee(), pe("body"));
|
|
10582
10600
|
}
|
|
10583
10601
|
}
|
|
10584
10602
|
function Yt(n) {
|
|
10585
|
-
n != null &&
|
|
10603
|
+
n != null && M.value && M.value.pointerId !== n || (M.value = null, St(!1), typeof window < "u" && (window.removeEventListener("pointermove", ft), window.removeEventListener("pointerup", y)));
|
|
10586
10604
|
}
|
|
10587
10605
|
function ft(n) {
|
|
10588
|
-
const k =
|
|
10606
|
+
const k = M.value;
|
|
10589
10607
|
k && (Te.value = Xu({
|
|
10590
10608
|
originWidth: k.originWidth,
|
|
10591
10609
|
deltaX: n.clientX - k.originClientX,
|
|
@@ -10598,7 +10616,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10598
10616
|
Yt(n.pointerId);
|
|
10599
10617
|
}
|
|
10600
10618
|
function f(n) {
|
|
10601
|
-
n.button === 0 && (n.preventDefault(), at(),
|
|
10619
|
+
n.button === 0 && (n.preventDefault(), at(), M.value = {
|
|
10602
10620
|
pointerId: n.pointerId,
|
|
10603
10621
|
originClientX: n.clientX,
|
|
10604
10622
|
originWidth: et.value
|
|
@@ -10617,7 +10635,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10617
10635
|
function T(n) {
|
|
10618
10636
|
const k = a(n);
|
|
10619
10637
|
return k ? {
|
|
10620
|
-
x: k.x +
|
|
10638
|
+
x: k.x + _.value,
|
|
10621
10639
|
y: k.y
|
|
10622
10640
|
} : null;
|
|
10623
10641
|
}
|
|
@@ -10663,18 +10681,18 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10663
10681
|
if (!G.value || !se.value)
|
|
10664
10682
|
return;
|
|
10665
10683
|
const k = $t(n.clientX);
|
|
10666
|
-
k !== 0 && Ne(
|
|
10684
|
+
k !== 0 && Ne(_.value + k, "body");
|
|
10667
10685
|
const F = T(n);
|
|
10668
10686
|
if (!F)
|
|
10669
10687
|
return;
|
|
10670
|
-
const c = (F.x - G.value.originX) / se.value.pixelsPerDay,
|
|
10688
|
+
const c = (F.x - G.value.originX) / se.value.pixelsPerDay, E = Di({
|
|
10671
10689
|
startMs: G.value.initialStartMs,
|
|
10672
10690
|
endMs: G.value.initialEndMs
|
|
10673
10691
|
}, G.value.mode, c, se.value.zoomLevel, r.gantt?.workingCalendar);
|
|
10674
10692
|
G.value = {
|
|
10675
10693
|
...G.value,
|
|
10676
|
-
draftStartMs:
|
|
10677
|
-
draftEndMs:
|
|
10694
|
+
draftStartMs: E.startMs,
|
|
10695
|
+
draftEndMs: E.endMs
|
|
10678
10696
|
}, pe("body");
|
|
10679
10697
|
}
|
|
10680
10698
|
function it(n) {
|
|
@@ -10692,9 +10710,9 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10692
10710
|
r.gantt.resizeHandleWidth
|
|
10693
10711
|
);
|
|
10694
10712
|
if (c && (vt(c.bar.rowId), I.value = null, A.value = null), !c) {
|
|
10695
|
-
const
|
|
10696
|
-
if (
|
|
10697
|
-
n.preventDefault(), I.value = Dr(
|
|
10713
|
+
const E = Rn(ne.value, k);
|
|
10714
|
+
if (E) {
|
|
10715
|
+
n.preventDefault(), I.value = Dr(E), pe("body");
|
|
10698
10716
|
return;
|
|
10699
10717
|
}
|
|
10700
10718
|
Be();
|
|
@@ -10728,7 +10746,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10728
10746
|
if (le?.disconnect(), le = null, typeof window > "u" || typeof window.ResizeObserver != "function")
|
|
10729
10747
|
return;
|
|
10730
10748
|
le = new window.ResizeObserver(() => {
|
|
10731
|
-
at(), Ke(),
|
|
10749
|
+
at(), Ke(), Ee(), yt(), Ue(), pe();
|
|
10732
10750
|
});
|
|
10733
10751
|
const n = h.value?.getHeaderElement() ?? null;
|
|
10734
10752
|
n && le.observe(n), p.value && le.observe(p.value), i.value && le.observe(i.value), v.value && le.observe(v.value);
|
|
@@ -10736,7 +10754,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10736
10754
|
function mr() {
|
|
10737
10755
|
const n = h.value?.getBodyViewportElement() ?? null;
|
|
10738
10756
|
if (n === p.value) {
|
|
10739
|
-
at(), Ke(),
|
|
10757
|
+
at(), Ke(), Ee(), vr(), Ue(), pe();
|
|
10740
10758
|
return;
|
|
10741
10759
|
}
|
|
10742
10760
|
if (gr(), p.value = n, !n) {
|
|
@@ -10744,14 +10762,14 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10744
10762
|
return;
|
|
10745
10763
|
}
|
|
10746
10764
|
const k = () => {
|
|
10747
|
-
|
|
10765
|
+
Ee(), pe("body");
|
|
10748
10766
|
};
|
|
10749
|
-
n.addEventListener("scroll", k, { passive: !0 }), at(), Ke(),
|
|
10767
|
+
n.addEventListener("scroll", k, { passive: !0 }), at(), Ke(), Ee(), Y = () => {
|
|
10750
10768
|
n.removeEventListener("scroll", k);
|
|
10751
10769
|
}, vr(), Ue(), pe();
|
|
10752
10770
|
}
|
|
10753
10771
|
function pr() {
|
|
10754
|
-
at(), Ke(),
|
|
10772
|
+
at(), Ke(), Ee(), yt(), Ue(), pe();
|
|
10755
10773
|
}
|
|
10756
10774
|
return Ge(
|
|
10757
10775
|
() => r.gantt?.paneWidth,
|
|
@@ -10771,7 +10789,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10771
10789
|
],
|
|
10772
10790
|
() => {
|
|
10773
10791
|
Vr(() => {
|
|
10774
|
-
mr(),
|
|
10792
|
+
mr(), Ee(), yt(), Ue(), mt(), pe();
|
|
10775
10793
|
});
|
|
10776
10794
|
}
|
|
10777
10795
|
), Ge(
|
|
@@ -10834,7 +10852,7 @@ const es = { class: "datagrid-gantt-stage__timeline" }, ts = { class: "datagrid-
|
|
|
10834
10852
|
key: 0,
|
|
10835
10853
|
type: "button",
|
|
10836
10854
|
class: "datagrid-gantt-stage__splitter",
|
|
10837
|
-
style: ae(
|
|
10855
|
+
style: ae(Pt.value),
|
|
10838
10856
|
"aria-label": "Resize gantt split",
|
|
10839
10857
|
onPointerdown: f
|
|
10840
10858
|
}, null, 36)) : te("", !0),
|