@affino/datagrid-vue-app 0.1.4 → 0.1.6

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as Fn, h as k, computed as m, unref as c, ref as W, nextTick as Dn, onBeforeUnmount as En, watch as K, defineAsyncComponent as yt, shallowRef as _n } from "vue";
2
- import { resolveDataGridCellClickAction as Gn, toggleDataGridCellValue as Pn, buildDataGridCellRenderModel as Ln, useDataGridContextMenu as Wn, cloneDataGridFilterSnapshot as Kn, createClientRowModel as un } from "@affino/datagrid-vue";
3
- import { useDataGridAppIntentHistory as Nn, createDataGridAppRowHeightMetrics as $n, useDataGridAppViewport as Un, useDataGridAppRowSizing as qn, useDataGridAppCellSelection as Xn, useDataGridAppRowPresentation as Yn, useDataGridAppClipboard as Jn, useDataGridAppActiveCellViewport as Zn, useDataGridAppInlineEditing as Qn, useDataGridAppInteractionController as el, useDataGridAppHeaderResize as tl, useDataGridAppRuntimeSync as nl, useDataGridAppViewportLifecycle as ll, useDataGridAppColumnLayoutPanel as ol, useDataGridAppAdvancedFilterBuilder as rl } from "@affino/datagrid-vue/app";
1
+ import { defineComponent as Fn, h as k, computed as w, unref as c, ref as P, nextTick as Dn, onBeforeUnmount as En, watch as L, defineAsyncComponent as gt, shallowRef as _n } from "vue";
2
+ import { resolveDataGridCellClickAction as Gn, toggleDataGridCellValue as Pn, buildDataGridCellRenderModel as Ln, useDataGridContextMenu as Wn, cloneDataGridFilterSnapshot as Nn, createClientRowModel as un } from "@affino/datagrid-vue";
3
+ import { useDataGridAppIntentHistory as Kn, createDataGridAppRowHeightMetrics as $n, useDataGridAppViewport as Un, useDataGridAppRowSizing as qn, useDataGridAppCellSelection as Xn, useDataGridAppRowPresentation as Yn, useDataGridAppClipboard as Jn, useDataGridAppActiveCellViewport as Zn, useDataGridAppInlineEditing as Qn, useDataGridAppInteractionController as el, useDataGridAppHeaderResize as tl, useDataGridAppRuntimeSync as nl, useDataGridAppViewportLifecycle as ll, useDataGridAppColumnLayoutPanel as ol, useDataGridAppAdvancedFilterBuilder as rl } from "@affino/datagrid-vue/app";
4
4
  import { useDataGridViewportContextMenuRouter as il, useDataGridContextMenuAnchor as al, useDataGridContextMenuActionRouter as sl } from "@affino/datagrid-vue/advanced";
5
- import { c as ul, _ as cl } from "./DataGridTableStage.vue_vue_type_script_setup_true_lang-BKBL5xs3.js";
5
+ import { c as ul, _ as cl } from "./DataGridTableStage.vue_vue_type_script_setup_true_lang-DUqp_TKD.js";
6
6
  const dl = Fn({
7
7
  name: "DataGridModuleHost",
8
8
  props: {
@@ -19,7 +19,7 @@ const dl = Fn({
19
19
  })))
20
20
  ]);
21
21
  }
22
- }), Z = ["sort", "group", "pin", "filter"], kn = [
22
+ }), J = ["sort", "group", "pin", "filter"], kn = [
23
23
  "sortAsc",
24
24
  "sortDesc",
25
25
  "clearSort",
@@ -35,16 +35,16 @@ const dl = Fn({
35
35
  "applyFilter",
36
36
  "cancelFilter"
37
37
  ], cn = 120;
38
- function hn(e) {
39
- const o = new Set(Z), r = Array.isArray(e) ? e : Z, l = [];
38
+ function bn(e) {
39
+ const o = new Set(J), r = Array.isArray(e) ? e : J, l = [];
40
40
  for (const s of r)
41
41
  !o.has(s) || l.includes(s) || l.push(s);
42
- return l.length > 0 ? l : [...Z];
42
+ return l.length > 0 ? l : [...J];
43
43
  }
44
44
  function fn(e) {
45
45
  if (!Array.isArray(e))
46
46
  return [];
47
- const o = new Set(Z), r = [];
47
+ const o = new Set(J), r = [];
48
48
  for (const l of e)
49
49
  !o.has(l) || r.includes(l) || r.push(l);
50
50
  return r;
@@ -52,26 +52,26 @@ function fn(e) {
52
52
  function Hn(e) {
53
53
  if (!e)
54
54
  return Object.freeze({});
55
- const o = Object.entries(e).filter(([r, l]) => Z.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
55
+ const o = Object.entries(e).filter(([r, l]) => J.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
56
56
  return Object.freeze(Object.fromEntries(o));
57
57
  }
58
58
  function Vn(e) {
59
59
  if (!e)
60
60
  return Object.freeze({});
61
- const o = Object.entries(e).filter(([r, l]) => Z.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
61
+ const o = Object.entries(e).filter(([r, l]) => J.includes(r) && typeof l == "string").map(([r, l]) => [r, l.trim()]).filter(([, r]) => r.length > 0);
62
62
  return Object.freeze(Object.fromEntries(o));
63
63
  }
64
64
  function zn(e) {
65
65
  if (!e)
66
66
  return Object.freeze({});
67
67
  const o = Object.entries(e).filter(([r, l]) => kn.includes(r) && !!l).map(([r, l]) => {
68
- const s = l, i = {
68
+ const s = l, a = {
69
69
  ...s.hidden === !0 ? { hidden: !0 } : {},
70
70
  ...s.disabled === !0 ? { disabled: !0 } : {},
71
71
  ...typeof s.disabledReason == "string" && s.disabledReason.trim().length > 0 ? { disabledReason: s.disabledReason.trim() } : {},
72
72
  ...typeof s.label == "string" && s.label.trim().length > 0 ? { label: s.label.trim() } : {}
73
73
  };
74
- return [r, Object.freeze(i)];
74
+ return [r, Object.freeze(a)];
75
75
  }).filter(([, r]) => Object.keys(r).length > 0);
76
76
  return Object.freeze(Object.fromEntries(o));
77
77
  }
@@ -79,26 +79,26 @@ function ml(e) {
79
79
  if (!e)
80
80
  return {};
81
81
  const o = Object.entries(e).filter(([r]) => r.trim().length > 0).map(([r, l]) => {
82
- const s = l?.items ? hn(l.items) : void 0, i = fn(l?.hide), w = fn(l?.disabled), C = Vn(l?.disabledReasons), b = Hn(l?.labels), A = zn(l?.actions);
82
+ const s = l?.items ? bn(l.items) : void 0, a = fn(l?.hide), f = fn(l?.disabled), C = Vn(l?.disabledReasons), y = Hn(l?.labels), A = zn(l?.actions);
83
83
  return [
84
84
  r,
85
85
  {
86
86
  ...s ? { items: s } : {},
87
- ...i.length > 0 ? { hide: i } : {},
88
- ...w.length > 0 ? { disabled: w } : {},
87
+ ...a.length > 0 ? { hide: a } : {},
88
+ ...f.length > 0 ? { disabled: f } : {},
89
89
  ...Object.keys(C).length > 0 ? { disabledReasons: C } : {},
90
- ...Object.keys(b).length > 0 ? { labels: b } : {},
90
+ ...Object.keys(y).length > 0 ? { labels: y } : {},
91
91
  ...Object.keys(A).length > 0 ? { actions: A } : {}
92
92
  }
93
93
  ];
94
94
  });
95
95
  return Object.fromEntries(o);
96
96
  }
97
- function ho(e) {
97
+ function bo(e) {
98
98
  return typeof e == "boolean" ? {
99
99
  enabled: e,
100
100
  maxFilterValues: cn,
101
- items: [...Z],
101
+ items: [...J],
102
102
  disabled: [],
103
103
  disabledReasons: Object.freeze({}),
104
104
  labels: Object.freeze({}),
@@ -107,7 +107,7 @@ function ho(e) {
107
107
  } : e ? {
108
108
  enabled: e.enabled ?? !0,
109
109
  maxFilterValues: Number.isFinite(e.maxFilterValues) ? Math.max(20, Math.trunc(e.maxFilterValues)) : cn,
110
- items: hn(e.items),
110
+ items: bn(e.items),
111
111
  disabled: fn(e.disabled),
112
112
  disabledReasons: Vn(e.disabledReasons),
113
113
  labels: Hn(e.labels),
@@ -116,7 +116,7 @@ function ho(e) {
116
116
  } : {
117
117
  enabled: !1,
118
118
  maxFilterValues: cn,
119
- items: [...Z],
119
+ items: [...J],
120
120
  disabled: [],
121
121
  disabledReasons: Object.freeze({}),
122
122
  labels: Object.freeze({}),
@@ -125,12 +125,12 @@ function ho(e) {
125
125
  };
126
126
  }
127
127
  function Tn(e, o) {
128
- const r = e.columns[o], l = r?.items ? hn(r.items) : e.items, s = new Set(r?.hide ?? []), i = l.filter((w) => !s.has(w));
129
- return i.length > 0 ? i : [];
128
+ const r = e.columns[o], l = r?.items ? bn(r.items) : e.items, s = new Set(r?.hide ?? []), a = l.filter((f) => !s.has(f));
129
+ return a.length > 0 ? a : [];
130
130
  }
131
131
  function wl(e, o) {
132
132
  const r = Tn(e, o), l = new Set(e.columns[o]?.disabled ?? []), s = new Set(e.disabled);
133
- return r.filter((i) => s.has(i) || l.has(i));
133
+ return r.filter((a) => s.has(a) || l.has(a));
134
134
  }
135
135
  function fl(e, o) {
136
136
  return Object.freeze({
@@ -138,23 +138,23 @@ function fl(e, o) {
138
138
  ...e.columns[o]?.labels ?? {}
139
139
  });
140
140
  }
141
- function Cl(e, o) {
141
+ function gl(e, o) {
142
142
  return Object.freeze({
143
143
  ...e.disabledReasons,
144
144
  ...e.columns[o]?.disabledReasons ?? {}
145
145
  });
146
146
  }
147
- function gl(e, o) {
147
+ function Cl(e, o) {
148
148
  const r = e.columns[o]?.actions ?? {}, l = kn.map((s) => {
149
- const i = {
149
+ const a = {
150
150
  ...e.actions[s] ?? {},
151
151
  ...r[s] ?? {}
152
152
  };
153
- return [s, Object.freeze(i)];
153
+ return [s, Object.freeze(a)];
154
154
  }).filter(([, s]) => Object.keys(s).length > 0);
155
155
  return Object.freeze(Object.fromEntries(l));
156
156
  }
157
- const _ = ["clipboard", "edit"], Rn = ["cut", "copy", "paste", "clear"], ve = ["insert", "clipboard", "selection"], jn = [
157
+ const B = ["clipboard", "edit"], yn = ["cut", "copy", "paste", "clear"], Ce = ["insert", "clipboard", "selection"], jn = [
158
158
  "insertAbove",
159
159
  "insertBelow",
160
160
  "cut",
@@ -162,13 +162,13 @@ const _ = ["clipboard", "edit"], Rn = ["cut", "copy", "paste", "clear"], ve = ["
162
162
  "paste",
163
163
  "deleteSelected"
164
164
  ];
165
- function St(e, o) {
165
+ function Ct(e, o) {
166
166
  const r = new Set(o), l = Array.isArray(e) ? e : o, s = [];
167
- for (const i of l)
168
- !r.has(i) || s.includes(i) || s.push(i);
167
+ for (const a of l)
168
+ !r.has(a) || s.includes(a) || s.push(a);
169
169
  return s.length > 0 ? s : [...o];
170
170
  }
171
- function Rt(e, o) {
171
+ function ft(e, o) {
172
172
  if (!Array.isArray(e))
173
173
  return [];
174
174
  const r = new Set(o), l = [];
@@ -176,23 +176,23 @@ function Rt(e, o) {
176
176
  !r.has(s) || l.includes(s) || l.push(s);
177
177
  return l;
178
178
  }
179
- function be(e, o) {
179
+ function ve(e, o) {
180
180
  if (!e)
181
181
  return Object.freeze({});
182
182
  const r = Object.entries(e).filter((l) => o.includes(l[0]) && typeof l[1] == "string").map(([l, s]) => [l, s.trim()]).filter(([, l]) => l.length > 0);
183
183
  return Object.freeze(Object.fromEntries(r));
184
184
  }
185
- function yn(e, o) {
185
+ function Rn(e, o) {
186
186
  if (!e)
187
187
  return Object.freeze({});
188
188
  const r = Object.entries(e).filter(([l, s]) => o.includes(l) && !!s).map(([l, s]) => {
189
- const i = s, w = {
190
- ...i.hidden === !0 ? { hidden: !0 } : {},
191
- ...i.disabled === !0 ? { disabled: !0 } : {},
192
- ...typeof i.disabledReason == "string" && i.disabledReason.trim().length > 0 ? { disabledReason: i.disabledReason.trim() } : {},
193
- ...typeof i.label == "string" && i.label.trim().length > 0 ? { label: i.label.trim() } : {}
189
+ const a = s, f = {
190
+ ...a.hidden === !0 ? { hidden: !0 } : {},
191
+ ...a.disabled === !0 ? { disabled: !0 } : {},
192
+ ...typeof a.disabledReason == "string" && a.disabledReason.trim().length > 0 ? { disabledReason: a.disabledReason.trim() } : {},
193
+ ...typeof a.label == "string" && a.label.trim().length > 0 ? { label: a.label.trim() } : {}
194
194
  };
195
- return [l, Object.freeze(w)];
195
+ return [l, Object.freeze(f)];
196
196
  }).filter(([, l]) => Object.keys(l).length > 0);
197
197
  return Object.freeze(Object.fromEntries(r));
198
198
  }
@@ -200,25 +200,25 @@ function vl(e) {
200
200
  if (!e)
201
201
  return {};
202
202
  const o = Object.entries(e).filter(([r]) => r.trim().length > 0).map(([r, l]) => {
203
- const s = l?.items ? St(l.items, _) : void 0, i = Rt(l?.hide, _), w = Rt(l?.disabled, _), C = be(l?.disabledReasons, _), b = be(l?.labels, _), A = yn(l?.actions, Rn);
203
+ const s = l?.items ? Ct(l.items, B) : void 0, a = ft(l?.hide, B), f = ft(l?.disabled, B), C = ve(l?.disabledReasons, B), y = ve(l?.labels, B), A = Rn(l?.actions, yn);
204
204
  return [
205
205
  r,
206
206
  {
207
207
  ...s ? { items: s } : {},
208
- ...i.length > 0 ? { hide: i } : {},
209
- ...w.length > 0 ? { disabled: w } : {},
208
+ ...a.length > 0 ? { hide: a } : {},
209
+ ...f.length > 0 ? { disabled: f } : {},
210
210
  ...Object.keys(C).length > 0 ? { disabledReasons: C } : {},
211
- ...Object.keys(b).length > 0 ? { labels: b } : {},
211
+ ...Object.keys(y).length > 0 ? { labels: y } : {},
212
212
  ...Object.keys(A).length > 0 ? { actions: A } : {}
213
213
  }
214
214
  ];
215
215
  });
216
216
  return Object.freeze(Object.fromEntries(o));
217
217
  }
218
- function Ro(e) {
218
+ function yo(e) {
219
219
  return typeof e == "boolean" ? {
220
220
  enabled: e,
221
- items: [..._],
221
+ items: [...B],
222
222
  disabled: [],
223
223
  disabledReasons: Object.freeze({}),
224
224
  labels: Object.freeze({}),
@@ -226,15 +226,15 @@ function Ro(e) {
226
226
  columns: {}
227
227
  } : e ? {
228
228
  enabled: e.enabled ?? !0,
229
- items: St(e.items, _),
230
- disabled: Rt(e.disabled, _),
231
- disabledReasons: be(e.disabledReasons, _),
232
- labels: be(e.labels, _),
233
- actions: yn(e.actions, Rn),
229
+ items: Ct(e.items, B),
230
+ disabled: ft(e.disabled, B),
231
+ disabledReasons: ve(e.disabledReasons, B),
232
+ labels: ve(e.labels, B),
233
+ actions: Rn(e.actions, yn),
234
234
  columns: vl(e.columns)
235
235
  } : {
236
236
  enabled: !1,
237
- items: [..._],
237
+ items: [...B],
238
238
  disabled: [],
239
239
  disabledReasons: Object.freeze({}),
240
240
  labels: Object.freeze({}),
@@ -242,64 +242,64 @@ function Ro(e) {
242
242
  columns: {}
243
243
  };
244
244
  }
245
- function ht(e, o) {
246
- const r = e.columns[o], l = r?.items ? St(r.items, _) : e.items, s = new Set(r?.hide ?? []), i = l.filter((w) => !s.has(w));
247
- return i.length > 0 ? i : [];
248
- }
249
- function bl(e, o) {
250
- const r = ht(e, o), l = new Set(e.columns[o]?.disabled ?? []), s = new Set(e.disabled);
251
- return r.filter((i) => s.has(i) || l.has(i));
245
+ function wt(e, o) {
246
+ const r = e.columns[o], l = r?.items ? Ct(r.items, B) : e.items, s = new Set(r?.hide ?? []), a = l.filter((f) => !s.has(f));
247
+ return a.length > 0 ? a : [];
252
248
  }
253
249
  function hl(e, o) {
250
+ const r = wt(e, o), l = new Set(e.columns[o]?.disabled ?? []), s = new Set(e.disabled);
251
+ return r.filter((a) => s.has(a) || l.has(a));
252
+ }
253
+ function bl(e, o) {
254
254
  return Object.freeze({
255
255
  ...e.disabledReasons,
256
256
  ...e.columns[o]?.disabledReasons ?? {}
257
257
  });
258
258
  }
259
- function Rl(e, o) {
260
- const r = e.columns[o]?.actions ?? {}, l = Rn.map((s) => {
261
- const i = {
259
+ function yl(e, o) {
260
+ const r = e.columns[o]?.actions ?? {}, l = yn.map((s) => {
261
+ const a = {
262
262
  ...e.actions[s] ?? {},
263
263
  ...r[s] ?? {}
264
264
  };
265
- return [s, Object.freeze(i)];
265
+ return [s, Object.freeze(a)];
266
266
  }).filter(([, s]) => Object.keys(s).length > 0);
267
267
  return Object.freeze(Object.fromEntries(l));
268
268
  }
269
- function yo(e) {
269
+ function Ro(e) {
270
270
  return typeof e == "boolean" ? {
271
271
  enabled: e,
272
- items: [...ve],
272
+ items: [...Ce],
273
273
  disabled: [],
274
274
  disabledReasons: Object.freeze({}),
275
275
  labels: Object.freeze({}),
276
276
  actions: Object.freeze({})
277
277
  } : e ? {
278
278
  enabled: e.enabled ?? !0,
279
- items: St(e.items, ve),
280
- disabled: Rt(e.disabled, ve),
281
- disabledReasons: be(e.disabledReasons, ve),
282
- labels: be(e.labels, ve),
283
- actions: yn(e.actions, jn)
279
+ items: Ct(e.items, Ce),
280
+ disabled: ft(e.disabled, Ce),
281
+ disabledReasons: ve(e.disabledReasons, Ce),
282
+ labels: ve(e.labels, Ce),
283
+ actions: Rn(e.actions, jn)
284
284
  } : {
285
285
  enabled: !1,
286
- items: [...ve],
286
+ items: [...Ce],
287
287
  disabled: [],
288
288
  disabledReasons: Object.freeze({}),
289
289
  labels: Object.freeze({}),
290
290
  actions: Object.freeze({})
291
291
  };
292
292
  }
293
- function yl(e) {
293
+ function Rl(e) {
294
294
  return e.items;
295
295
  }
296
296
  function Sl(e) {
297
297
  return e.disabled;
298
298
  }
299
- function pl(e) {
299
+ function Ml(e) {
300
300
  return e.disabledReasons;
301
301
  }
302
- function Ml(e) {
302
+ function pl(e) {
303
303
  const o = jn.map((r) => [r, Object.freeze({ ...e.actions[r] ?? {} })]).filter(([, r]) => Object.keys(r).length > 0);
304
304
  return Object.freeze(Object.fromEntries(o));
305
305
  }
@@ -309,14 +309,16 @@ function Sn(e) {
309
309
  };
310
310
  }
311
311
  function Il(e) {
312
- const o = Sn(e.headerViewportRef), r = Sn(e.bodyViewportRef), l = (f) => {
313
- e.editingCellValueRef.value = f;
314
- }, s = m(() => ({
312
+ const o = Sn(e.headerViewportRef), r = Sn(e.bodyViewportRef), l = (g) => {
313
+ e.editingCellValueRef.value = g;
314
+ }, s = w(() => ({
315
315
  gridContentStyle: c(e.gridContentStyle),
316
316
  mainTrackStyle: c(e.mainTrackStyle),
317
317
  indexColumnStyle: c(e.indexColumnStyle),
318
+ stageStyle: c(e.stageStyle),
319
+ bodyShellStyle: c(e.bodyShellStyle),
318
320
  columnStyle: c(e.columnStyle)
319
- })), i = m(() => ({
321
+ })), a = w(() => ({
320
322
  topSpacerHeight: c(e.topSpacerHeight),
321
323
  bottomSpacerHeight: c(e.bottomSpacerHeight),
322
324
  viewportRowStart: c(e.viewportRowStart),
@@ -329,7 +331,7 @@ function Il(e) {
329
331
  handleHeaderScroll: c(e.handleHeaderScroll),
330
332
  handleViewportScroll: c(e.handleViewportScroll),
331
333
  handleViewportKeydown: c(e.handleViewportKeydown)
332
- })), w = m(() => ({
334
+ })), f = w(() => ({
333
335
  visibleColumns: c(e.visibleColumns),
334
336
  renderedColumns: c(e.renderedColumns),
335
337
  columnFilterTextByKey: c(e.columnFilterTextByKey),
@@ -357,7 +359,7 @@ function Il(e) {
357
359
  clearColumnMenuFilter: c(e.clearColumnMenuFilter),
358
360
  startResize: c(e.startResize),
359
361
  handleResizeDoubleClick: c(e.handleResizeDoubleClick)
360
- })), C = m(() => ({
362
+ })), C = w(() => ({
361
363
  displayRows: c(e.displayRows),
362
364
  pinnedBottomRows: c(e.pinnedBottomRows),
363
365
  sourceRows: c(e.sourceRows),
@@ -380,7 +382,7 @@ function Il(e) {
380
382
  rowIndexLabel: c(e.rowIndexLabel),
381
383
  startRowResize: c(e.startRowResize),
382
384
  autosizeRow: c(e.autosizeRow)
383
- })), b = m(() => ({
385
+ })), y = w(() => ({
384
386
  selectionRange: c(e.selectionRange),
385
387
  selectionAnchorCell: c(e.selectionAnchorCell),
386
388
  fillPreviewRange: c(e.fillPreviewRange),
@@ -393,7 +395,7 @@ function Il(e) {
393
395
  isFillHandleCell: c(e.isFillHandleCell),
394
396
  startFillHandleDrag: c(e.startFillHandleDrag),
395
397
  startFillHandleDoubleClick: c(e.startFillHandleDoubleClick)
396
- })), A = m(() => ({
398
+ })), A = w(() => ({
397
399
  editingCellValue: e.editingCellValueRef.value,
398
400
  editingCellInitialFilter: c(e.editingCellInitialFilter),
399
401
  editingCellOpenOnMount: c(e.editingCellOpenOnMount),
@@ -403,7 +405,7 @@ function Il(e) {
403
405
  handleEditorKeydown: c(e.handleEditorKeydown),
404
406
  commitInlineEdit: c(e.commitInlineEdit),
405
407
  cancelInlineEdit: c(e.cancelInlineEdit)
406
- })), v = m(() => ({
408
+ })), b = w(() => ({
407
409
  cellClass: c(e.cellClass),
408
410
  cellStyle: c(e.cellStyle),
409
411
  isCellSelected: c(e.isCellSelected),
@@ -416,36 +418,38 @@ function Il(e) {
416
418
  isCellEditable: c(e.isCellEditable),
417
419
  readCell: c(e.readCell),
418
420
  readDisplayCell: c(e.readDisplayCell)
419
- })), R = m(() => ({
421
+ })), R = w(() => ({
420
422
  handleCellMouseDown: c(e.handleCellMouseDown),
421
423
  handleCellClick: c(e.handleCellClick),
422
424
  handleCellKeydown: c(e.handleCellKeydown)
423
- })), y = m(() => ({
425
+ })), S = w(() => ({
424
426
  mode: c(e.mode),
425
427
  rowHeightMode: c(e.rowHeightMode),
428
+ layoutMode: c(e.layoutMode),
426
429
  layout: s.value,
427
- viewport: i.value,
428
- columns: w.value,
430
+ viewport: a.value,
431
+ columns: f.value,
429
432
  rows: C.value,
430
- selection: b.value,
433
+ selection: y.value,
431
434
  editing: A.value,
432
- cells: v.value,
435
+ cells: b.value,
433
436
  interaction: R.value
434
- })), g = ul({
435
- mode: m(() => c(e.mode)),
436
- rowHeightMode: m(() => c(e.rowHeightMode)),
437
+ })), h = ul({
438
+ mode: w(() => c(e.mode)),
439
+ rowHeightMode: w(() => c(e.rowHeightMode)),
440
+ layoutMode: w(() => c(e.layoutMode)),
437
441
  layout: s,
438
- viewport: i,
439
- columns: w,
442
+ viewport: a,
443
+ columns: f,
440
444
  rows: C,
441
- selection: b,
445
+ selection: y,
442
446
  editing: A,
443
- cells: v,
447
+ cells: b,
444
448
  interaction: R
445
449
  });
446
450
  return {
447
- tableStageProps: y,
448
- tableStageContext: g,
451
+ tableStageProps: S,
452
+ tableStageContext: h,
449
453
  captureHeaderViewportRef: o,
450
454
  captureBodyViewportRef: r,
451
455
  updateEditingCellValue: l
@@ -453,16 +457,16 @@ function Il(e) {
453
457
  }
454
458
  function xl(e) {
455
459
  return {
456
- readStageCell: (s, i) => e.isRowSelectionColumnKey(i) ? e.readRowSelectionCell(s) : e.readCell(s, i),
457
- readStageDisplayCell: (s, i) => e.isRowSelectionColumnKey(i) ? e.readRowSelectionDisplayCell(s) : e.readDisplayCell(s, i),
458
- handleCellClick: (s, i, w, C) => {
459
- if (e.isRowSelectionColumn(w)) {
460
+ readStageCell: (s, a) => e.isRowSelectionColumnKey(a) ? e.readRowSelectionCell(s) : e.readCell(s, a),
461
+ readStageDisplayCell: (s, a) => e.isRowSelectionColumnKey(a) ? e.readRowSelectionDisplayCell(s) : e.readDisplayCell(s, a),
462
+ handleCellClick: (s, a, f, C) => {
463
+ if (e.isRowSelectionColumn(f)) {
460
464
  e.toggleRowCheckboxSelected(s);
461
465
  return;
462
466
  }
463
- const b = e.viewportRowStart.value + i, A = e.isCellEditableByKey(s, b, w.key, C);
467
+ const y = e.viewportRowStart.value + a, A = e.isCellEditableByKey(s, y, f.key, C);
464
468
  if (Gn({
465
- column: w.column,
469
+ column: f.column,
466
470
  row: s.kind !== "group" ? s.data : void 0,
467
471
  editable: A
468
472
  }) !== "toggle" || s.kind === "group" || s.rowId == null)
@@ -472,18 +476,18 @@ function xl(e) {
472
476
  {
473
477
  rowId: s.rowId,
474
478
  data: {
475
- [w.key]: Pn({
476
- column: w.column,
479
+ [f.key]: Pn({
480
+ column: f.column,
477
481
  row: s.data
478
482
  })
479
483
  }
480
484
  }
481
485
  ]), e.recordHistoryIntentTransaction({
482
486
  intent: "edit",
483
- label: `Toggle ${w.key}`,
487
+ label: `Toggle ${f.key}`,
484
488
  affectedRange: {
485
- startRow: b,
486
- endRow: b,
489
+ startRow: y,
490
+ endRow: y,
487
491
  startColumn: C,
488
492
  endColumn: C
489
493
  }
@@ -491,24 +495,24 @@ function xl(e) {
491
495
  }
492
496
  };
493
497
  }
494
- const pn = 140, bt = 108, dn = "__datagrid_row_selection__";
498
+ const Mn = 140, mt = 108, dn = "__datagrid_row_selection__";
495
499
  function Al(e) {
496
- const o = m(() => (e.showRowSelection?.value ?? !0) && e.runtime.api.rowSelection.hasSupport()), r = m(() => o.value ? {
500
+ const o = w(() => (e.showRowSelection?.value ?? !0) && e.runtime.api.rowSelection.hasSupport()), r = w(() => o.value ? {
497
501
  key: dn,
498
502
  state: {
499
503
  visible: !0,
500
504
  pin: "left",
501
- width: bt
505
+ width: mt
502
506
  },
503
507
  visible: !0,
504
508
  pin: "left",
505
- width: bt,
509
+ width: mt,
506
510
  column: {
507
511
  key: dn,
508
512
  label: "",
509
513
  cellType: "checkbox",
510
- minWidth: bt,
511
- maxWidth: bt,
514
+ minWidth: mt,
515
+ maxWidth: mt,
512
516
  capabilities: {
513
517
  editable: !0,
514
518
  sortable: !1,
@@ -526,147 +530,147 @@ function Al(e) {
526
530
  rowSelection: !0
527
531
  }
528
532
  }
529
- } : null), l = (g) => g === dn, s = (g) => l(g.key), i = m(() => {
530
- const g = r.value, f = e.visibleColumns.value.filter((x) => x.pin === "left"), M = e.visibleColumns.value.filter((x) => x.pin !== "left" && x.pin !== "right"), I = e.visibleColumns.value.filter((x) => x.pin === "right");
531
- return g ? [g, ...f, ...M, ...I] : [...f, ...M, ...I];
532
- }), w = m(() => i.value.filter((g) => g.pin !== "left" && g.pin !== "right")), C = (g) => g.width ?? pn, b = (g) => {
533
- const f = i.value.find((x) => x.key === g), I = `${f ? C(f) : pn}px`;
533
+ } : null), l = (h) => h === dn, s = (h) => l(h.key), a = w(() => {
534
+ const h = r.value, g = e.visibleColumns.value.filter((x) => x.pin === "left"), I = e.visibleColumns.value.filter((x) => x.pin !== "left" && x.pin !== "right"), M = e.visibleColumns.value.filter((x) => x.pin === "right");
535
+ return h ? [h, ...g, ...I, ...M] : [...g, ...I, ...M];
536
+ }), f = w(() => a.value.filter((h) => h.pin !== "left" && h.pin !== "right")), C = (h) => h.width ?? Mn, y = (h) => {
537
+ const g = a.value.find((x) => x.key === h), M = `${g ? C(g) : Mn}px`;
534
538
  return {
535
- width: I,
536
- minWidth: I,
537
- maxWidth: I
539
+ width: M,
540
+ minWidth: M,
541
+ maxWidth: M
538
542
  };
539
- }, A = (g) => g.column.capabilities?.editable !== !1, v = (g, f, M) => s(M) ? g.kind !== "group" && g.rowId != null : g.kind === "group" || g.rowId == null || !A(M) ? !1 : e.isCellEditable ? e.isCellEditable({
540
- row: g.data,
541
- rowId: g.rowId,
542
- rowIndex: f,
543
- column: M.column,
544
- columnKey: M.key
545
- }) : !0, R = (g, f) => {
546
- const M = i.value[f];
547
- if (M?.key === g)
548
- return { column: M, columnIndex: f };
549
- const I = i.value.findIndex((x) => x.key === g);
550
- return I < 0 ? null : {
551
- column: i.value[I],
552
- columnIndex: I
543
+ }, A = (h) => h.column.capabilities?.editable !== !1, b = (h, g, I) => s(I) ? h.kind !== "group" && h.rowId != null : h.kind === "group" || h.rowId == null || !A(I) ? !1 : e.isCellEditable ? e.isCellEditable({
544
+ row: h.data,
545
+ rowId: h.rowId,
546
+ rowIndex: g,
547
+ column: I.column,
548
+ columnKey: I.key
549
+ }) : !0, R = (h, g) => {
550
+ const I = a.value[g];
551
+ if (I?.key === h)
552
+ return { column: I, columnIndex: g };
553
+ const M = a.value.findIndex((x) => x.key === h);
554
+ return M < 0 ? null : {
555
+ column: a.value[M],
556
+ columnIndex: M
553
557
  };
554
558
  };
555
559
  return {
556
- orderedVisibleColumns: i,
557
- centerColumns: w,
560
+ orderedVisibleColumns: a,
561
+ centerColumns: f,
558
562
  resolveColumnWidth: C,
559
- stageColumnStyle: b,
563
+ stageColumnStyle: y,
560
564
  isRowSelectionColumnKey: l,
561
565
  isRowSelectionColumn: s,
562
- isCellEditable: v,
563
- isCellEditableByKey: (g, f, M, I) => {
564
- const x = R(M, I);
565
- return x ? v(g, f, x.column) : !1;
566
+ isCellEditable: b,
567
+ isCellEditableByKey: (h, g, I, M) => {
568
+ const x = R(I, M);
569
+ return x ? b(h, g, x.column) : !1;
566
570
  },
567
571
  rowSelectionColumn: r
568
572
  };
569
573
  }
570
574
  function Ol(e) {
571
- const o = m(() => {
575
+ const o = w(() => {
572
576
  const l = e.lastAppliedFill.value, s = e.selectionRange.value;
573
577
  return !l || !s || e.isFillDragging.value || l.allowBehaviorToggle === !1 || l.previewRange.startRow !== s.startRow || l.previewRange.endRow !== s.endRow || l.previewRange.startColumn !== s.startColumn || l.previewRange.endColumn !== s.endColumn ? null : {
574
578
  rowIndex: l.previewRange.endRow,
575
579
  columnIndex: l.previewRange.endColumn
576
580
  };
577
- }), r = m(() => e.lastAppliedFill.value?.behavior ?? null);
581
+ }), r = w(() => e.lastAppliedFill.value?.behavior ?? null);
578
582
  return {
579
583
  fillActionAnchorCell: o,
580
584
  fillActionBehavior: r
581
585
  };
582
586
  }
583
587
  function Fl(e) {
584
- const o = e.history ? null : Nn({
588
+ const o = e.history ? null : Kn({
585
589
  runtime: e.runtime,
586
590
  cloneRowData: e.cloneRowData,
587
591
  syncViewport: e.syncViewport
588
592
  });
589
593
  return {
590
594
  captureHistorySnapshot: () => e.history ? e.history.captureSnapshot() : o?.captureRowsSnapshot() ?? null,
591
- recordHistoryIntentTransaction: (b, A) => {
595
+ recordHistoryIntentTransaction: (y, A) => {
592
596
  if (e.history) {
593
- e.history.recordIntentTransaction(b, A);
597
+ e.history.recordIntentTransaction(y, A);
594
598
  return;
595
599
  }
596
600
  o?.recordIntentTransaction(
597
- b,
601
+ y,
598
602
  A
599
603
  );
600
604
  },
601
605
  canUndoHistory: () => e.history ? e.history.canUndo() : o?.canUndo.value ?? !1,
602
606
  canRedoHistory: () => e.history ? e.history.canRedo() : o?.canRedo.value ?? !1,
603
- runHistoryAction: (b) => e.history ? e.history.runHistoryAction(b) : o?.runHistoryAction(b) ?? Promise.resolve(null),
607
+ runHistoryAction: (y) => e.history ? e.history.runHistoryAction(y) : o?.runHistoryAction(y) ?? Promise.resolve(null),
604
608
  disposeIntentHistory: () => {
605
609
  o?.dispose();
606
610
  }
607
611
  };
608
612
  }
609
613
  function Dl(e) {
610
- const o = m(() => new Set(e.rowSelectionSnapshot.value?.selectedRows ?? [])), r = (f) => f.rowId != null && e.rowSelectionSnapshot.value?.focusedRow === f.rowId, l = (f) => f.kind !== "group" && f.rowId != null && o.value.has(f.rowId), s = (f) => l(f), i = (f) => s(f) ? "true" : "false", w = (f) => {
611
- const M = e.rowSelectionColumn.value?.column;
612
- return !M || f.kind === "group" ? "" : Ln({
613
- column: M,
614
- value: s(f)
614
+ const o = w(() => new Set(e.rowSelectionSnapshot.value?.selectedRows ?? [])), r = (g) => g.rowId != null && e.rowSelectionSnapshot.value?.focusedRow === g.rowId, l = (g) => g.kind !== "group" && g.rowId != null && o.value.has(g.rowId), s = (g) => l(g), a = (g) => s(g) ? "true" : "false", f = (g) => {
615
+ const I = e.rowSelectionColumn.value?.column;
616
+ return !I || g.kind === "group" ? "" : Ln({
617
+ column: I,
618
+ value: s(g)
615
619
  }).displayValue;
616
- }, C = m(() => {
617
- const f = e.runtime.api.rows.getCount(), M = [];
618
- for (let I = 0; I < f; I += 1) {
619
- const x = e.runtime.api.rows.get(I);
620
- !x || x.kind === "group" || x.rowId == null || M.push(x.rowId);
620
+ }, C = w(() => {
621
+ const g = e.runtime.api.rows.getCount(), I = [];
622
+ for (let M = 0; M < g; M += 1) {
623
+ const x = e.runtime.api.rows.get(M);
624
+ !x || x.kind === "group" || x.rowId == null || I.push(x.rowId);
621
625
  }
622
- return M;
623
- }), b = m(() => {
624
- const f = C.value;
625
- return f.length > 0 && f.every((M) => o.value.has(M));
626
- }), A = m(() => C.value.some((M) => o.value.has(M))), v = (f) => {
627
- f.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setFocusedRow(f.rowId);
626
+ return I;
627
+ }), y = w(() => {
628
+ const g = C.value;
629
+ return g.length > 0 && g.every((I) => o.value.has(I));
630
+ }), A = w(() => C.value.some((I) => o.value.has(I))), b = (g) => {
631
+ g.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setFocusedRow(g.rowId);
628
632
  };
629
633
  return {
630
634
  rowSelectionSet: o,
631
635
  isRowFocused: r,
632
636
  isRowCheckboxSelected: l,
633
- readRowSelectionCell: i,
634
- readRowSelectionDisplayCell: w,
635
- areAllVisibleRowsSelected: b,
637
+ readRowSelectionCell: a,
638
+ readRowSelectionDisplayCell: f,
639
+ areAllVisibleRowsSelected: y,
636
640
  areSomeVisibleRowsSelected: A,
637
- focusRow: v,
638
- toggleRowCheckboxSelected: (f) => {
639
- f.kind === "group" || f.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setSelected(f.rowId, !o.value.has(f.rowId));
641
+ focusRow: b,
642
+ toggleRowCheckboxSelected: (g) => {
643
+ g.kind === "group" || g.rowId == null || !e.runtime.api.rowSelection.hasSupport() || e.runtime.api.rowSelection.setSelected(g.rowId, !o.value.has(g.rowId));
640
644
  },
641
645
  toggleVisibleRowsSelected: () => {
642
646
  if (!e.runtime.api.rowSelection.hasSupport())
643
647
  return;
644
- const f = C.value;
645
- if (!b.value) {
646
- e.runtime.api.rowSelection.selectRows(f);
648
+ const g = C.value;
649
+ if (!y.value) {
650
+ e.runtime.api.rowSelection.selectRows(g);
647
651
  return;
648
652
  }
649
- e.runtime.api.rowSelection.deselectRows(f);
653
+ e.runtime.api.rowSelection.deselectRows(g);
650
654
  },
651
- selectRowRange: (f, M, I) => {
652
- v(f);
655
+ selectRowRange: (g, I, M) => {
656
+ b(g);
653
657
  const x = e.orderedVisibleColumns.value.length - 1;
654
658
  if (x < 0)
655
659
  return;
656
- const N = e.viewportRowStart.value + M;
657
- if (!I) {
660
+ const W = e.viewportRowStart.value + I;
661
+ if (!M) {
658
662
  e.applySelectionRange({
659
- startRow: N,
660
- endRow: N,
663
+ startRow: W,
664
+ endRow: W,
661
665
  startColumn: 0,
662
666
  endColumn: x
663
667
  });
664
668
  return;
665
669
  }
666
- const j = e.selectionAnchorCell.value?.rowIndex ?? N;
670
+ const re = e.selectionAnchorCell.value?.rowIndex ?? W;
667
671
  e.applySelectionRange({
668
- startRow: Math.min(j, N),
669
- endRow: Math.max(j, N),
672
+ startRow: Math.min(re, W),
673
+ endRow: Math.max(re, W),
670
674
  startColumn: 0,
671
675
  endColumn: x
672
676
  });
@@ -675,23 +679,23 @@ function Dl(e) {
675
679
  }
676
680
  function El(e) {
677
681
  return {
678
- handleWindowMouseMove: (i) => {
682
+ handleWindowMouseMove: (a) => {
679
683
  if (e.isColumnResizing.value) {
680
- e.applyColumnResizeFromPointer(i.clientX);
684
+ e.applyColumnResizeFromPointer(a.clientX);
681
685
  return;
682
686
  }
683
- e.handleInteractionWindowMouseMove(i);
687
+ e.handleInteractionWindowMouseMove(a);
684
688
  },
685
- handleHeaderWheel: (i) => {
686
- const w = e.bodyViewportRef.value;
687
- if (!w)
689
+ handleHeaderWheel: (a) => {
690
+ const f = e.bodyViewportRef.value;
691
+ if (!f)
688
692
  return;
689
- const C = Math.abs(i.deltaX) > 0 ? i.deltaX : i.shiftKey ? i.deltaY : 0, b = C === 0 ? i.deltaY : 0;
690
- C === 0 && b === 0 || (i.preventDefault(), C !== 0 && (w.scrollLeft += C), b !== 0 && (w.scrollTop += b), e.syncViewport());
693
+ const C = Math.abs(a.deltaX) > 0 ? a.deltaX : a.shiftKey ? a.deltaY : 0, y = C === 0 ? a.deltaY : 0;
694
+ C === 0 && y === 0 || (a.preventDefault(), C !== 0 && (f.scrollLeft += C), y !== 0 && (f.scrollTop += y), e.syncViewport());
691
695
  },
692
- handleHeaderScroll: (i) => {
693
- const w = i.target, C = e.bodyViewportRef.value;
694
- !w || !C || (C.scrollLeft !== w.scrollLeft && (C.scrollLeft = w.scrollLeft), e.syncViewport());
696
+ handleHeaderScroll: (a) => {
697
+ const f = a.target, C = e.bodyViewportRef.value;
698
+ !f || !C || (C.scrollLeft !== f.scrollLeft && (C.scrollLeft = f.scrollLeft), e.syncViewport());
695
699
  },
696
700
  handleWindowMouseUp: () => {
697
701
  e.stopColumnResize(), e.handleInteractionWindowMouseUp();
@@ -699,78 +703,78 @@ function El(e) {
699
703
  };
700
704
  }
701
705
  function kl(e) {
702
- const o = (i) => i.ctrlKey || i.metaKey || i.altKey ? !1 : i.key.startsWith("Arrow") || i.key === "Home" || i.key === "End" || i.key === "PageUp" || i.key === "PageDown" || i.key === "Tab" || i.key === "Enter" || i.key === " " || i.key === "Spacebar" || i.key === "F2" || i.key === "Escape" || i.key.length === 1, r = (i) => (i.ctrlKey || i.metaKey) && !i.altKey && !i.shiftKey && i.key.toLowerCase() === "a", l = () => {
703
- const i = e.totalRows.value - 1, w = e.orderedVisibleColumns.value.length - 1;
704
- i < 0 || w < 0 || e.applySelectionRange({
706
+ const o = (a) => a.ctrlKey || a.metaKey || a.altKey ? !1 : a.key.startsWith("Arrow") || a.key === "Home" || a.key === "End" || a.key === "PageUp" || a.key === "PageDown" || a.key === "Tab" || a.key === "Enter" || a.key === " " || a.key === "Spacebar" || a.key === "F2" || a.key === "Escape" || a.key.length === 1, r = (a) => (a.ctrlKey || a.metaKey) && !a.altKey && !a.shiftKey && a.key.toLowerCase() === "a", l = () => {
707
+ const a = e.totalRows.value - 1, f = e.orderedVisibleColumns.value.length - 1;
708
+ a < 0 || f < 0 || e.applySelectionRange({
705
709
  startRow: 0,
706
- endRow: i,
710
+ endRow: a,
707
711
  startColumn: 0,
708
- endColumn: w
712
+ endColumn: f
709
713
  });
710
714
  };
711
715
  return {
712
- handleViewportKeydown: (i) => {
713
- (o(i) || r(i)) && i.preventDefault();
714
- const w = e.selectionSnapshot.value?.activeCell;
715
- if (!w) {
716
- r(i) && l();
716
+ handleViewportKeydown: (a) => {
717
+ (o(a) || r(a)) && a.preventDefault();
718
+ const f = e.selectionSnapshot.value?.activeCell;
719
+ if (!f) {
720
+ r(a) && l();
717
721
  return;
718
722
  }
719
- const C = e.runtime.getBodyRowAtIndex(w.rowIndex);
723
+ const C = e.runtime.getBodyRowAtIndex(f.rowIndex);
720
724
  C && e.handleCellKeydown(
721
- i,
725
+ a,
722
726
  C,
723
- w.rowIndex - e.viewportRowStart.value,
724
- w.colIndex
727
+ f.rowIndex - e.viewportRowStart.value,
728
+ f.colIndex
725
729
  );
726
730
  }
727
731
  };
728
732
  }
729
733
  function Hl(e) {
730
- const o = m(() => e.interactionSelectionRange.value ?? e.resolveCommittedSelectionRange()), r = () => {
731
- const v = o.value;
732
- return v && v.startRow === v.endRow && v.startColumn === v.endColumn ? {
733
- rowIndex: v.startRow,
734
- columnIndex: v.startColumn
734
+ const o = w(() => e.interactionSelectionRange.value ?? e.resolveCommittedSelectionRange()), r = () => {
735
+ const b = o.value;
736
+ return b && b.startRow === b.endRow && b.startColumn === b.endColumn ? {
737
+ rowIndex: b.startRow,
738
+ columnIndex: b.startColumn
735
739
  } : e.selectionAnchorCell.value;
736
- }, l = () => o.value, s = () => e.mode.value === "base" && e.isFillDragging.value && !!e.fillPreviewRange.value, i = (v, R, y) => {
737
- const g = e.viewportRowStart.value + R;
738
- return g >= v.startRow && g <= v.endRow && y >= v.startColumn && y <= v.endColumn;
739
- }, w = (v, R) => {
740
- const y = r();
741
- return y ? y.rowIndex === e.viewportRowStart.value + v && y.columnIndex === R : e.isCommittedSelectionAnchorCell(v, R);
740
+ }, l = () => o.value, s = () => e.mode.value === "base" && e.isFillDragging.value && !!e.fillPreviewRange.value, a = (b, R, S) => {
741
+ const h = e.viewportRowStart.value + R;
742
+ return h >= b.startRow && h <= b.endRow && S >= b.startColumn && S <= b.endColumn;
743
+ }, f = (b, R) => {
744
+ const S = r();
745
+ return S ? S.rowIndex === e.viewportRowStart.value + b && S.columnIndex === R : e.isCommittedSelectionAnchorCell(b, R);
742
746
  };
743
747
  return {
744
748
  selectionRange: o,
745
- isSelectionAnchorCell: w,
746
- isCellSelected: (v, R) => {
749
+ isSelectionAnchorCell: f,
750
+ isCellSelected: (b, R) => {
747
751
  if (!s())
748
- return e.isCommittedCellSelected(v, R);
749
- const y = l();
750
- return y ? i(y, v, R) : !1;
752
+ return e.isCommittedCellSelected(b, R);
753
+ const S = l();
754
+ return S ? a(S, b, R) : !1;
751
755
  },
752
- shouldHighlightSelectedCell: (v, R) => {
756
+ shouldHighlightSelectedCell: (b, R) => {
753
757
  if (!s())
754
- return e.shouldHighlightCommittedSelectedCell(v, R);
755
- const y = l();
756
- return !y || !i(y, v, R) || y.startRow === y.endRow && y.startColumn === y.endColumn ? !1 : !w(v, R);
758
+ return e.shouldHighlightCommittedSelectedCell(b, R);
759
+ const S = l();
760
+ return !S || !a(S, b, R) || S.startRow === S.endRow && S.startColumn === S.endColumn ? !1 : !f(b, R);
757
761
  },
758
- isCellOnSelectionEdge: (v, R, y) => {
762
+ isCellOnSelectionEdge: (b, R, S) => {
759
763
  if (!s())
760
- return e.isCommittedCellOnSelectionEdge(v, R, y);
761
- const g = l();
762
- if (!g || !i(g, v, R))
764
+ return e.isCommittedCellOnSelectionEdge(b, R, S);
765
+ const h = l();
766
+ if (!h || !a(h, b, R))
763
767
  return !1;
764
- const f = e.viewportRowStart.value + v;
765
- switch (y) {
768
+ const g = e.viewportRowStart.value + b;
769
+ switch (S) {
766
770
  case "top":
767
- return f === g.startRow;
771
+ return g === h.startRow;
768
772
  case "right":
769
- return R === g.endColumn;
773
+ return R === h.endColumn;
770
774
  case "bottom":
771
- return f === g.endRow;
775
+ return g === h.endRow;
772
776
  case "left":
773
- return R === g.startColumn;
777
+ return R === h.startColumn;
774
778
  }
775
779
  }
776
780
  };
@@ -778,358 +782,379 @@ function Hl(e) {
778
782
  const mn = 140, Vl = 72, zl = 80, Tl = 24, jl = 400;
779
783
  function Bl(e) {
780
784
  const o = e.syncRowSelectionSnapshotFromRuntime ?? (() => {
781
- }), r = e.rowSelectionSnapshot ?? W(null), l = m(() => e.showRowIndex?.value !== !1), s = m(() => e.runtime.rowPartition.value.bodyRowCount), i = m(() => Math.max(0, e.totalRuntimeRows.value)), w = m(() => l.value ? Vl : 0), C = Al({
785
+ }), r = e.rowSelectionSnapshot ?? P(null), l = w(() => e.showRowIndex?.value !== !1), s = w(() => e.runtime.rowPartition.value.bodyRowCount), a = w(() => Math.max(0, e.totalRuntimeRows.value)), f = w(() => l.value ? Vl : 0), C = Al({
782
786
  runtime: e.runtime,
783
787
  visibleColumns: e.visibleColumns,
784
788
  showRowSelection: e.showRowSelection,
785
789
  isCellEditable: e.isCellEditable
786
790
  }), {
787
- orderedVisibleColumns: b,
791
+ orderedVisibleColumns: y,
788
792
  centerColumns: A,
789
- resolveColumnWidth: v,
793
+ resolveColumnWidth: b,
790
794
  isRowSelectionColumnKey: R,
791
- isRowSelectionColumn: y,
792
- isCellEditable: g,
793
- isCellEditableByKey: f,
794
- rowSelectionColumn: M
795
- } = C, I = $n({
795
+ isRowSelectionColumn: S,
796
+ isCellEditable: h,
797
+ isCellEditableByKey: g,
798
+ rowSelectionColumn: I
799
+ } = C, M = $n({
796
800
  totalRows: () => s.value,
797
801
  resolveBaseRowHeight: () => e.normalizedBaseRowHeight.value,
798
- resolveRowHeightOverride: (t) => e.runtime.api.view.getRowHeightOverride(t),
802
+ resolveRowHeightOverride: (i) => e.runtime.api.view.getRowHeightOverride(i),
799
803
  resolveRowHeightVersion: () => e.runtime.api.view.getRowHeightVersion(),
800
804
  hasRowHeightOverrides: () => e.runtime.api.view.getRowHeightVersion() > 0
805
+ }), x = (i) => {
806
+ const m = Math.max(0, Math.trunc(i));
807
+ if (m <= 0)
808
+ return 0;
809
+ const v = M.resolveTotalHeight();
810
+ return m <= s.value ? M.resolveRowOffset(m) : v + (m - s.value) * e.normalizedBaseRowHeight.value;
811
+ }, W = w(() => {
812
+ if (e.layoutMode.value !== "auto-height")
813
+ return null;
814
+ let i = M.resolveTotalHeight();
815
+ return e.minRows.value !== null && (i = Math.max(i, x(e.minRows.value))), e.maxRows.value !== null && (i = Math.min(i, x(e.maxRows.value))), Math.max(0, Math.trunc(i));
816
+ }), re = w(() => e.layoutMode.value !== "auto-height" ? {} : {
817
+ height: "auto"
818
+ }), vt = w(() => {
819
+ if (e.layoutMode.value !== "auto-height")
820
+ return {};
821
+ const i = W.value ?? 0;
822
+ return {
823
+ height: `${i}px`,
824
+ maxHeight: `${i}px`
825
+ };
801
826
  });
802
- let x = () => !1;
827
+ let je = () => !1;
803
828
  const {
804
- headerViewportRef: N,
805
- bodyViewportRef: j,
806
- displayRows: ze,
807
- pinnedBottomRows: pt,
808
- renderedColumns: Mt,
829
+ headerViewportRef: ht,
830
+ bodyViewportRef: N,
831
+ displayRows: Be,
832
+ pinnedBottomRows: bt,
833
+ renderedColumns: yt,
809
834
  viewportRowStart: H,
810
- viewportColumnStart: It,
811
- topSpacerHeight: xt,
812
- bottomSpacerHeight: At,
813
- leftColumnSpacerWidth: Ot,
814
- rightColumnSpacerWidth: Ft,
815
- gridContentStyle: Dt,
816
- mainTrackStyle: he,
817
- indexColumnStyle: Et,
818
- columnStyle: kt,
819
- handleViewportScroll: Ht,
820
- syncViewportFromDom: V,
821
- scheduleViewportSync: Vt,
822
- cancelScheduledViewportSync: zt
835
+ viewportColumnStart: Rt,
836
+ topSpacerHeight: St,
837
+ bottomSpacerHeight: he,
838
+ leftColumnSpacerWidth: Mt,
839
+ rightColumnSpacerWidth: pt,
840
+ gridContentStyle: It,
841
+ mainTrackStyle: xt,
842
+ indexColumnStyle: At,
843
+ columnStyle: Ot,
844
+ handleViewportScroll: Ft,
845
+ syncViewportFromDom: D,
846
+ scheduleViewportSync: F,
847
+ cancelScheduledViewportSync: ie
823
848
  } = Un({
824
849
  runtime: e.runtime,
825
850
  mode: e.mode,
826
851
  rowRenderMode: e.rowRenderMode,
827
- rowVirtualizationEnabled: m(() => e.virtualization.value.rows),
828
- columnVirtualizationEnabled: m(() => e.virtualization.value.columns),
852
+ rowVirtualizationEnabled: w(() => e.virtualization.value.rows),
853
+ columnVirtualizationEnabled: w(() => e.virtualization.value.columns),
829
854
  totalRows: s,
830
855
  visibleColumns: A,
831
- sizingColumns: b,
856
+ sizingColumns: y,
832
857
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
833
- resolveColumnWidth: v,
858
+ resolveColumnWidth: b,
834
859
  defaultColumnWidth: mn,
835
860
  indexColumnWidth: 0,
836
- flexFillOffsetWidth: w.value,
837
- rowOverscan: m(() => e.virtualization.value.rowOverscan),
838
- columnOverscan: m(() => e.virtualization.value.columnOverscan),
839
- measureVisibleRowHeights: () => je(),
840
- resolveRowHeight: I.resolveRowHeight,
841
- resolveRowOffset: I.resolveRowOffset,
842
- resolveRowIndexAtOffset: I.resolveRowIndexAtOffset,
843
- resolveTotalRowHeight: I.resolveTotalHeight
844
- }), Tt = (t) => kt(t), q = (t) => {
845
- if (i.value <= 0)
861
+ flexFillOffsetWidth: f.value,
862
+ rowOverscan: w(() => e.virtualization.value.rowOverscan),
863
+ columnOverscan: w(() => e.virtualization.value.columnOverscan),
864
+ measureVisibleRowHeights: () => ye(),
865
+ resolveRowHeight: M.resolveRowHeight,
866
+ resolveRowOffset: M.resolveRowOffset,
867
+ resolveRowIndexAtOffset: M.resolveRowIndexAtOffset,
868
+ resolveTotalRowHeight: M.resolveTotalHeight
869
+ }), ae = (i) => Ot(i), _e = (i) => {
870
+ if (a.value <= 0)
846
871
  return null;
847
- const n = Math.max(0, Math.min(i.value - 1, Math.trunc(t)));
848
- return e.runtime.api.rows.get(n) ?? null;
849
- }, F = (t) => {
850
- for (let n = 0; n < i.value; n += 1)
851
- if (e.runtime.api.rows.get(n)?.rowId === t)
852
- return n;
853
- return e.runtime.resolveBodyRowIndexById(t);
854
- }, L = {
872
+ const m = Math.max(0, Math.min(a.value - 1, Math.trunc(i)));
873
+ return e.runtime.api.rows.get(m) ?? null;
874
+ }, be = (i) => {
875
+ for (let m = 0; m < a.value; m += 1)
876
+ if (e.runtime.api.rows.get(m)?.rowId === i)
877
+ return m;
878
+ return e.runtime.resolveBodyRowIndexById(i);
879
+ }, G = {
855
880
  ...e.runtime,
856
- getBodyRowAtIndex: q,
857
- resolveBodyRowIndexById: F
881
+ getBodyRowAtIndex: _e,
882
+ resolveBodyRowIndexById: be
858
883
  }, {
859
- rowStyle: re,
860
- isRowAutosizeProbe: Te,
861
- measureVisibleRowHeights: je,
862
- startRowResize: ie,
863
- autosizeRow: Be,
864
- dispose: _e
884
+ rowStyle: Ge,
885
+ isRowAutosizeProbe: Pe,
886
+ measureVisibleRowHeights: ye,
887
+ startRowResize: Le,
888
+ autosizeRow: We,
889
+ dispose: Ne
865
890
  } = qn({
866
891
  mode: e.mode,
867
892
  rowHeightMode: e.rowHeightMode,
868
893
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
869
894
  viewportRowStart: H,
870
- bodyViewportRef: j,
895
+ bodyViewportRef: N,
871
896
  runtime: e.runtime,
872
897
  minRowHeight: Tl,
873
- syncViewport: () => V()
874
- }), Q = Xn({
898
+ syncViewport: () => D()
899
+ }), Z = Xn({
875
900
  mode: e.mode,
876
- runtime: L,
877
- totalRows: i,
878
- visibleColumns: b,
901
+ runtime: G,
902
+ totalRows: a,
903
+ visibleColumns: y,
879
904
  viewportRowStart: H,
880
905
  selectionSnapshot: e.selectionSnapshot,
881
906
  selectionAnchor: e.selectionAnchor,
882
- isEditingCell: (t, n) => x(t, n)
907
+ isEditingCell: (i, m) => je(i, m)
883
908
  }), {
884
- normalizeRowId: Ge,
885
- normalizeCellCoord: Pe,
886
- resolveSelectionRange: ae,
887
- resolveCurrentCellCoord: Le,
888
- applySelectionRange: X,
889
- applyCellSelectionByCoord: Re,
890
- setCellSelection: G,
891
- clearCellSelection: ye,
892
- isCellSelected: Se
893
- } = Q, We = Q.isSelectionAnchorCell ?? (() => !1), jt = Q.shouldHighlightSelectedCell ?? ((t, n) => Se(t, n)), Bt = Q.isCellOnSelectionEdge ?? (() => !1), pe = m(() => {
894
- const t = e.selectionSnapshot.value;
895
- if (!t || t.ranges.length === 0)
909
+ normalizeRowId: Re,
910
+ normalizeCellCoord: Ke,
911
+ resolveSelectionRange: V,
912
+ resolveCurrentCellCoord: $e,
913
+ applySelectionRange: Q,
914
+ applyCellSelectionByCoord: Se,
915
+ setCellSelection: Dt,
916
+ clearCellSelection: Ue,
917
+ isCellSelected: qe
918
+ } = Z, Et = Z.isSelectionAnchorCell ?? (() => !1), kt = Z.shouldHighlightSelectedCell ?? ((i, m) => qe(i, m)), Ht = Z.isCellOnSelectionEdge ?? (() => !1), se = w(() => {
919
+ const i = e.selectionSnapshot.value;
920
+ if (!i || i.ranges.length === 0)
896
921
  return null;
897
- const n = t.activeRangeIndex ?? 0, a = t.ranges[n]?.anchor ?? t.ranges[0]?.anchor ?? null;
898
- return !a || typeof a.rowIndex != "number" || typeof a.colIndex != "number" || !Number.isFinite(a.rowIndex) || !Number.isFinite(a.colIndex) ? null : {
899
- rowIndex: Math.trunc(a.rowIndex),
900
- columnIndex: Math.trunc(a.colIndex)
922
+ const m = i.activeRangeIndex ?? 0, v = i.ranges[m]?.anchor ?? i.ranges[0]?.anchor ?? null;
923
+ return !v || typeof v.rowIndex != "number" || typeof v.colIndex != "number" || !Number.isFinite(v.rowIndex) || !Number.isFinite(v.colIndex) ? null : {
924
+ rowIndex: Math.trunc(v.rowIndex),
925
+ columnIndex: Math.trunc(v.colIndex)
901
926
  };
902
- }), Ke = Dl({
927
+ }), Xe = Dl({
903
928
  runtime: e.runtime,
904
- rowSelectionColumn: M,
905
- orderedVisibleColumns: b,
906
- displayRows: ze,
929
+ rowSelectionColumn: I,
930
+ orderedVisibleColumns: y,
931
+ displayRows: Be,
907
932
  rowSelectionSnapshot: r,
908
933
  viewportRowStart: H,
909
- selectionAnchorCell: pe,
910
- applySelectionRange: X
934
+ selectionAnchorCell: se,
935
+ applySelectionRange: Q
911
936
  }), {
912
- readRowSelectionCell: _t,
913
- readRowSelectionDisplayCell: Gt,
914
- toggleRowCheckboxSelected: Me
915
- } = Ke, Pt = m(() => {
916
- const t = `${w.value}px`;
937
+ readRowSelectionCell: Vt,
938
+ readRowSelectionDisplayCell: zt,
939
+ toggleRowCheckboxSelected: Ye
940
+ } = Xe, Tt = w(() => {
941
+ const i = `${f.value}px`;
917
942
  return {
918
- ...Et.value,
919
- width: t,
920
- minWidth: t,
921
- maxWidth: t
943
+ ...At.value,
944
+ width: i,
945
+ minWidth: i,
946
+ maxWidth: i
922
947
  };
923
- }), Ne = Fl({
948
+ }), Me = Fl({
924
949
  runtime: e.runtime,
925
950
  cloneRowData: e.cloneRowData,
926
- syncViewport: () => V(),
951
+ syncViewport: () => D(),
927
952
  history: e.history
928
953
  }), {
929
- captureHistorySnapshot: ee,
930
- recordHistoryIntentTransaction: te,
931
- canUndoHistory: Lt,
932
- canRedoHistory: $e,
933
- runHistoryAction: Ue
934
- } = Ne, {
935
- rowIndexLabel: qe,
936
- readCell: Xe,
937
- readDisplayCell: Ye,
954
+ captureHistorySnapshot: U,
955
+ recordHistoryIntentTransaction: q,
956
+ canUndoHistory: Je,
957
+ canRedoHistory: Ze,
958
+ runHistoryAction: pe
959
+ } = Me, {
960
+ rowIndexLabel: ee,
961
+ readCell: j,
962
+ readDisplayCell: Qe,
938
963
  rowClass: Ie,
939
- toggleGroupRow: ne
964
+ toggleGroupRow: et
940
965
  } = Yn({
941
966
  mode: e.mode,
942
967
  runtime: e.runtime,
943
968
  viewportRowStart: H,
944
969
  firstColumnKey: e.firstColumnKey
945
- }), z = xl({
970
+ }), xe = xl({
946
971
  runtime: e.runtime,
947
972
  viewportRowStart: H,
948
973
  isRowSelectionColumnKey: R,
949
- isRowSelectionColumn: y,
950
- isCellEditableByKey: f,
951
- readRowSelectionCell: _t,
952
- readRowSelectionDisplayCell: Gt,
953
- readCell: Xe,
954
- readDisplayCell: Ye,
955
- toggleRowCheckboxSelected: Me,
956
- captureHistorySnapshot: ee,
957
- recordHistoryIntentTransaction: te,
958
- syncViewport: () => V()
974
+ isRowSelectionColumn: S,
975
+ isCellEditableByKey: g,
976
+ readRowSelectionCell: Vt,
977
+ readRowSelectionDisplayCell: zt,
978
+ readCell: j,
979
+ readDisplayCell: Qe,
980
+ toggleRowCheckboxSelected: Ye,
981
+ captureHistorySnapshot: U,
982
+ recordHistoryIntentTransaction: q,
983
+ syncViewport: () => D()
959
984
  }), {
960
- readStageCell: se
961
- } = z, xe = Jn({
985
+ readStageCell: ue
986
+ } = xe, jt = Jn({
962
987
  mode: e.mode,
963
- runtime: L,
964
- totalRows: i,
965
- visibleColumns: b,
988
+ runtime: G,
989
+ totalRows: a,
990
+ visibleColumns: y,
966
991
  viewportRowStart: H,
967
- resolveSelectionRange: ae,
968
- resolveCurrentCellCoord: Le,
969
- applySelectionRange: X,
970
- clearCellSelection: ye,
971
- captureRowsSnapshot: ee,
972
- recordEditTransaction: (t) => {
973
- te({
992
+ resolveSelectionRange: V,
993
+ resolveCurrentCellCoord: $e,
994
+ applySelectionRange: Q,
995
+ clearCellSelection: Ue,
996
+ captureRowsSnapshot: U,
997
+ recordEditTransaction: (i) => {
998
+ q({
974
999
  intent: "edit",
975
1000
  label: "Cell edit"
976
- }, t);
1001
+ }, i);
977
1002
  },
978
- readCell: (t, n) => se(t, n),
979
- readClipboardCell: e.readClipboardCell ? (t, n) => e.readClipboardCell?.(t, n) ?? "" : void 0,
980
- isCellEditable: f,
981
- syncViewport: () => V(),
1003
+ readCell: (i, m) => ue(i, m),
1004
+ readClipboardCell: e.readClipboardCell ? (i, m) => e.readClipboardCell?.(i, m) ?? "" : void 0,
1005
+ isCellEditable: g,
1006
+ syncViewport: () => D(),
982
1007
  applyClipboardEdits: e.applyClipboardEdits,
983
1008
  buildFillMatrixFromRange: e.buildFillMatrixFromRange
984
1009
  }), {
985
- normalizeClipboardRange: Je,
986
- applyClipboardEdits: Ze,
987
- rangesEqual: Qe,
988
- buildFillMatrixFromRange: Wt,
989
- clearPendingClipboardOperation: et,
1010
+ normalizeClipboardRange: tt,
1011
+ applyClipboardEdits: nt,
1012
+ rangesEqual: Bt,
1013
+ buildFillMatrixFromRange: _t,
1014
+ clearPendingClipboardOperation: Gt,
990
1015
  copySelectedCells: Ae,
991
- pasteSelectedCells: tt,
992
- cutSelectedCells: nt,
993
- isCellInPendingClipboardRange: Kt,
994
- isCellOnPendingClipboardEdge: lt
995
- } = xe, {
996
- ensureKeyboardActiveCellVisible: le
1016
+ pasteSelectedCells: te,
1017
+ cutSelectedCells: ce,
1018
+ isCellInPendingClipboardRange: de,
1019
+ isCellOnPendingClipboardEdge: me
1020
+ } = jt, {
1021
+ ensureKeyboardActiveCellVisible: ne
997
1022
  } = Zn({
998
- bodyViewportRef: j,
999
- visibleColumns: b,
1000
- resolveColumnWidth: v,
1023
+ bodyViewportRef: N,
1024
+ visibleColumns: y,
1025
+ resolveColumnWidth: b,
1001
1026
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
1002
- resolveRowHeight: I.resolveRowHeight,
1003
- resolveRowOffset: I.resolveRowOffset,
1004
- indexColumnWidth: w.value,
1027
+ resolveRowHeight: M.resolveRowHeight,
1028
+ resolveRowOffset: M.resolveRowOffset,
1029
+ indexColumnWidth: f.value,
1005
1030
  defaultColumnWidth: mn,
1006
- syncViewport: () => V()
1031
+ syncViewport: () => D()
1007
1032
  }), {
1008
1033
  editingCell: Oe,
1009
- editingCellValue: ue,
1010
- editingCellInitialFilter: ce,
1011
- editingCellOpenOnMount: de,
1012
- isEditingCell: me,
1013
- startInlineEdit: ot,
1014
- commitInlineEdit: rt,
1015
- cancelInlineEdit: it,
1016
- handleEditorKeydown: Nt
1034
+ editingCellValue: Pt,
1035
+ editingCellInitialFilter: Lt,
1036
+ editingCellOpenOnMount: lt,
1037
+ isEditingCell: ot,
1038
+ startInlineEdit: Fe,
1039
+ commitInlineEdit: De,
1040
+ cancelInlineEdit: rt,
1041
+ handleEditorKeydown: Wt
1017
1042
  } = Qn({
1018
1043
  mode: e.mode,
1019
- bodyViewportRef: j,
1020
- visibleColumns: b,
1021
- totalRows: i,
1022
- runtime: L,
1023
- readCell: (t, n) => se(t, n),
1024
- resolveRowIndexById: F,
1025
- applyCellSelection: (t) => {
1026
- Re(t, !1);
1044
+ bodyViewportRef: N,
1045
+ visibleColumns: y,
1046
+ totalRows: a,
1047
+ runtime: G,
1048
+ readCell: (i, m) => ue(i, m),
1049
+ resolveRowIndexById: be,
1050
+ applyCellSelection: (i) => {
1051
+ Se(i, !1);
1027
1052
  },
1028
- ensureActiveCellVisible: (t, n) => {
1029
- le(t, n);
1053
+ ensureActiveCellVisible: (i, m) => {
1054
+ ne(i, m);
1030
1055
  },
1031
- isCellEditable: f,
1032
- captureRowsSnapshot: ee,
1033
- recordEditTransaction: (t) => {
1034
- te({
1056
+ isCellEditable: g,
1057
+ captureRowsSnapshot: U,
1058
+ recordEditTransaction: (i) => {
1059
+ q({
1035
1060
  intent: "edit",
1036
1061
  label: "Cell edit"
1037
- }, t);
1062
+ }, i);
1038
1063
  }
1039
1064
  });
1040
- x = me;
1041
- const at = m(() => Oe.value), st = {
1065
+ je = ot;
1066
+ const Nt = w(() => Oe.value), Kt = {
1042
1067
  mode: e.mode,
1043
- runtime: L,
1044
- totalRows: i,
1045
- visibleColumns: b,
1068
+ runtime: G,
1069
+ totalRows: a,
1070
+ visibleColumns: y,
1046
1071
  viewportRowStart: H,
1047
1072
  selectionSnapshot: e.selectionSnapshot,
1048
- bodyViewportRef: j,
1049
- indexColumnWidth: w.value,
1050
- resolveColumnWidth: v,
1051
- resolveRowHeight: I.resolveRowHeight,
1052
- resolveRowIndexAtOffset: I.resolveRowIndexAtOffset,
1053
- normalizeRowId: Ge,
1054
- normalizeCellCoord: Pe,
1055
- resolveSelectionRange: ae,
1056
- applySelectionRange: X,
1057
- applyCellSelectionByCoord: Re,
1058
- setCellSelection: G,
1059
- clearCellSelection: ye,
1060
- readCell: (t, n) => se(t, n),
1061
- isCellEditable: f,
1073
+ bodyViewportRef: N,
1074
+ indexColumnWidth: f.value,
1075
+ resolveColumnWidth: b,
1076
+ resolveRowHeight: M.resolveRowHeight,
1077
+ resolveRowIndexAtOffset: M.resolveRowIndexAtOffset,
1078
+ normalizeRowId: Re,
1079
+ normalizeCellCoord: Ke,
1080
+ resolveSelectionRange: V,
1081
+ applySelectionRange: Q,
1082
+ applyCellSelectionByCoord: Se,
1083
+ setCellSelection: Dt,
1084
+ clearCellSelection: Ue,
1085
+ readCell: (i, m) => ue(i, m),
1086
+ isCellEditable: g,
1062
1087
  cloneRowData: e.cloneRowData,
1063
- resolveRowIndexById: F,
1064
- captureRowsSnapshot: ee,
1065
- recordIntentTransaction: (t, n) => {
1066
- te(t, n);
1088
+ resolveRowIndexById: be,
1089
+ captureRowsSnapshot: U,
1090
+ recordIntentTransaction: (i, m) => {
1091
+ q(i, m);
1067
1092
  },
1068
- clearPendingClipboardOperation: et,
1093
+ clearPendingClipboardOperation: Gt,
1069
1094
  clearExternalPendingClipboardOperation: e.clearExternalPendingClipboardOperation,
1070
1095
  copySelectedCells: Ae,
1071
- pasteSelectedCells: tt,
1072
- cutSelectedCells: nt,
1073
- normalizeClipboardRange: Je,
1074
- applyClipboardEdits: Ze,
1075
- rangesEqual: Qe,
1076
- buildFillMatrixFromRange: Wt,
1096
+ pasteSelectedCells: te,
1097
+ cutSelectedCells: ce,
1098
+ normalizeClipboardRange: tt,
1099
+ applyClipboardEdits: nt,
1100
+ rangesEqual: Bt,
1101
+ buildFillMatrixFromRange: _t,
1077
1102
  applyRangeMove: e.applyRangeMove,
1078
- syncViewport: () => V(),
1079
- editingCell: at,
1080
- startInlineEdit: ot,
1081
- commitInlineEdit: rt,
1082
- canUndo: Lt,
1083
- canRedo: $e,
1084
- runHistoryAction: Ue,
1085
- ensureKeyboardActiveCellVisible: le,
1103
+ syncViewport: () => D(),
1104
+ editingCell: Nt,
1105
+ startInlineEdit: Fe,
1106
+ commitInlineEdit: De,
1107
+ canUndo: Je,
1108
+ canRedo: Ze,
1109
+ runHistoryAction: pe,
1110
+ ensureKeyboardActiveCellVisible: ne,
1086
1111
  isContextMenuVisible: e.isContextMenuVisible,
1087
1112
  closeContextMenu: e.closeContextMenu,
1088
1113
  openContextMenuFromCurrentCell: e.openContextMenuFromCurrentCell,
1089
1114
  runRowIndexKeyboardAction: e.runRowIndexKeyboardAction,
1090
- handleToggleCellAction: (t, n, a, u) => y(u) ? (Me(t), !0) : !1
1091
- }, ut = el(st), {
1092
- isPointerSelectingCells: $t,
1093
- isFillDragging: we,
1094
- fillPreviewRange: ct,
1095
- lastAppliedFill: Ut,
1096
- isRangeMoving: dt,
1097
- selectionRange: mt,
1098
- rangeMovePreviewRange: wt,
1099
- stopPointerSelection: Fe,
1100
- stopFillSelection: qt,
1101
- startFillHandleDrag: De,
1102
- startFillHandleDoubleClick: ft,
1103
- applyLastFillBehavior: Xt,
1104
- handleCellMouseDown: Yt,
1105
- handleCellKeydown: Ct,
1106
- handleRowIndexKeydown: Jt,
1107
- handleWindowMouseMove: fe,
1108
- handleWindowMouseUp: Zt,
1109
- isCellInFillPreview: B,
1110
- isFillHandleCell: gt,
1111
- clearSelectedCells: Qt,
1112
- dispose: Y
1113
- } = ut, Ee = kl({
1114
- runtime: L,
1115
+ handleToggleCellAction: (i, m, v, O) => S(O) ? (Ye(i), !0) : !1
1116
+ }, $t = el(Kt), {
1117
+ isPointerSelectingCells: it,
1118
+ isFillDragging: le,
1119
+ fillPreviewRange: Ee,
1120
+ lastAppliedFill: ke,
1121
+ isRangeMoving: Ut,
1122
+ selectionRange: He,
1123
+ rangeMovePreviewRange: at,
1124
+ stopPointerSelection: qt,
1125
+ stopFillSelection: Xt,
1126
+ startFillHandleDrag: Yt,
1127
+ startFillHandleDoubleClick: Jt,
1128
+ applyLastFillBehavior: we,
1129
+ handleCellMouseDown: Zt,
1130
+ handleCellKeydown: z,
1131
+ handleRowIndexKeydown: st,
1132
+ handleWindowMouseMove: Qt,
1133
+ handleWindowMouseUp: X,
1134
+ isCellInFillPreview: Ve,
1135
+ isFillHandleCell: en,
1136
+ clearSelectedCells: tn,
1137
+ dispose: nn
1138
+ } = $t, ln = kl({
1139
+ runtime: G,
1115
1140
  selectionSnapshot: e.selectionSnapshot,
1116
- totalRows: i,
1117
- orderedVisibleColumns: b,
1141
+ totalRows: a,
1142
+ orderedVisibleColumns: y,
1118
1143
  viewportRowStart: H,
1119
- applySelectionRange: X,
1120
- handleCellKeydown: Ct
1144
+ applySelectionRange: Q,
1145
+ handleCellKeydown: z
1121
1146
  }), {
1122
- isColumnResizing: en,
1123
- startResize: tn,
1124
- handleResizeDoubleClick: nn,
1125
- applyColumnResizeFromPointer: ln,
1126
- stopColumnResize: Ce,
1127
- dispose: on
1147
+ isColumnResizing: fe,
1148
+ startResize: on,
1149
+ handleResizeDoubleClick: ut,
1150
+ applyColumnResizeFromPointer: rn,
1151
+ stopColumnResize: ge,
1152
+ dispose: an
1128
1153
  } = tl({
1129
- visibleColumns: b,
1154
+ visibleColumns: y,
1130
1155
  rows: e.rows,
1131
- persistColumnWidth: (t, n) => {
1132
- e.runtime.api.columns.setWidth(t, n);
1156
+ persistColumnWidth: (i, m) => {
1157
+ e.runtime.api.columns.setWidth(i, m);
1133
1158
  },
1134
1159
  defaultColumnWidth: mn,
1135
1160
  minColumnWidth: zl,
@@ -1137,86 +1162,89 @@ function Bl(e) {
1137
1162
  autoSizeCharWidth: 7.2,
1138
1163
  autoSizeHorizontalPadding: 42,
1139
1164
  autoSizeMaxWidth: 640,
1140
- isFillDragging: () => we.value,
1165
+ isFillDragging: () => le.value,
1141
1166
  stopFillSelection: () => {
1142
- qt(!1);
1167
+ Xt(!1);
1143
1168
  },
1144
- isDragSelecting: () => $t.value,
1169
+ isDragSelecting: () => it.value,
1145
1170
  stopDragSelection: () => {
1146
- Fe();
1171
+ qt();
1147
1172
  },
1148
- readCellText: (t, n) => {
1149
- const a = t[n];
1150
- return a == null ? "" : String(a);
1173
+ readCellText: (i, m) => {
1174
+ const v = i[m];
1175
+ return v == null ? "" : String(v);
1151
1176
  }
1152
- }), ke = Hl({
1177
+ }), ct = Hl({
1153
1178
  mode: e.mode,
1154
1179
  viewportRowStart: H,
1155
- selectionAnchorCell: pe,
1156
- fillPreviewRange: ct,
1157
- isFillDragging: we,
1158
- interactionSelectionRange: mt,
1159
- resolveCommittedSelectionRange: ae,
1160
- isCommittedSelectionAnchorCell: We,
1161
- isCommittedCellSelected: Se,
1162
- shouldHighlightCommittedSelectedCell: jt,
1163
- isCommittedCellOnSelectionEdge: Bt
1164
- }), { selectionRange: vt } = ke, ge = Ol({
1165
- lastAppliedFill: Ut,
1166
- selectionRange: vt,
1167
- isFillDragging: we
1168
- }), rn = El({
1169
- bodyViewportRef: j,
1170
- isColumnResizing: en,
1171
- applyColumnResizeFromPointer: ln,
1172
- stopColumnResize: Ce,
1173
- handleInteractionWindowMouseMove: fe,
1174
- handleInteractionWindowMouseUp: Zt,
1175
- syncViewport: V
1176
- }), O = {
1177
- rowSelection: Ke,
1178
- history: Ne,
1179
- cellIo: z,
1180
- viewportKeyboard: Ee,
1181
- visualSelection: ke,
1182
- fillAction: ge,
1183
- scrollSync: rn
1180
+ selectionAnchorCell: se,
1181
+ fillPreviewRange: Ee,
1182
+ isFillDragging: le,
1183
+ interactionSelectionRange: He,
1184
+ resolveCommittedSelectionRange: V,
1185
+ isCommittedSelectionAnchorCell: Et,
1186
+ isCommittedCellSelected: qe,
1187
+ shouldHighlightCommittedSelectedCell: kt,
1188
+ isCommittedCellOnSelectionEdge: Ht
1189
+ }), { selectionRange: dt } = ct, sn = Ol({
1190
+ lastAppliedFill: ke,
1191
+ selectionRange: dt,
1192
+ isFillDragging: le
1193
+ }), t = El({
1194
+ bodyViewportRef: N,
1195
+ isColumnResizing: fe,
1196
+ applyColumnResizeFromPointer: rn,
1197
+ stopColumnResize: ge,
1198
+ handleInteractionWindowMouseMove: Qt,
1199
+ handleInteractionWindowMouseUp: X,
1200
+ syncViewport: D
1201
+ }), n = {
1202
+ rowSelection: Xe,
1203
+ history: Me,
1204
+ cellIo: xe,
1205
+ viewportKeyboard: ln,
1206
+ visualSelection: ct,
1207
+ fillAction: sn,
1208
+ scrollSync: t
1184
1209
  }, {
1185
- tableStageProps: an,
1186
- tableStageContext: sn
1210
+ tableStageProps: u,
1211
+ tableStageContext: d
1187
1212
  } = Il({
1188
1213
  mode: e.mode,
1189
1214
  rowHeightMode: e.rowHeightMode,
1190
- visibleColumns: b,
1191
- renderedColumns: Mt,
1192
- displayRows: ze,
1193
- pinnedBottomRows: pt,
1215
+ layoutMode: e.layoutMode,
1216
+ visibleColumns: y,
1217
+ renderedColumns: yt,
1218
+ displayRows: Be,
1219
+ pinnedBottomRows: bt,
1194
1220
  sourceRows: e.sourceRows ?? e.rows,
1195
1221
  showRowIndex: l,
1196
- rowHover: m(() => e.rowHover?.value === !0),
1197
- stripedRows: m(() => e.stripedRows?.value === !0),
1222
+ rowHover: w(() => e.rowHover?.value === !0),
1223
+ stripedRows: w(() => e.stripedRows?.value === !0),
1198
1224
  columnFilterTextByKey: e.columnFilterTextByKey,
1199
- gridContentStyle: Dt,
1200
- mainTrackStyle: he,
1201
- indexColumnStyle: Pt,
1202
- topSpacerHeight: xt,
1203
- bottomSpacerHeight: At,
1225
+ gridContentStyle: It,
1226
+ mainTrackStyle: xt,
1227
+ indexColumnStyle: Tt,
1228
+ stageStyle: re,
1229
+ bodyShellStyle: vt,
1230
+ topSpacerHeight: St,
1231
+ bottomSpacerHeight: he,
1204
1232
  viewportRowStart: H,
1205
- columnWindowStart: It,
1206
- leftColumnSpacerWidth: Ot,
1207
- rightColumnSpacerWidth: Ft,
1208
- editingCellValueRef: ue,
1209
- editingCellInitialFilter: ce,
1210
- editingCellOpenOnMount: de,
1211
- selectionRange: vt,
1212
- selectionAnchorCell: pe,
1213
- fillPreviewRange: ct,
1214
- rangeMovePreviewRange: wt,
1215
- isFillDragging: we,
1216
- isRangeMoving: dt,
1217
- headerViewportRef: N,
1218
- bodyViewportRef: j,
1219
- columnStyle: Tt,
1233
+ columnWindowStart: Rt,
1234
+ leftColumnSpacerWidth: Mt,
1235
+ rightColumnSpacerWidth: pt,
1236
+ editingCellValueRef: Pt,
1237
+ editingCellInitialFilter: Lt,
1238
+ editingCellOpenOnMount: lt,
1239
+ selectionRange: dt,
1240
+ selectionAnchorCell: se,
1241
+ fillPreviewRange: Ee,
1242
+ rangeMovePreviewRange: at,
1243
+ isFillDragging: le,
1244
+ isRangeMoving: Ut,
1245
+ headerViewportRef: ht,
1246
+ bodyViewportRef: N,
1247
+ columnStyle: ae,
1220
1248
  toggleSortForColumn: e.toggleSortForColumn,
1221
1249
  sortIndicator: e.sortIndicator,
1222
1250
  setColumnFilterText: e.setColumnFilterText,
@@ -1239,52 +1267,52 @@ function Bl(e) {
1239
1267
  applyColumnMenuGroupBy: e.applyColumnMenuGroupBy,
1240
1268
  applyColumnMenuFilter: e.applyColumnMenuFilter,
1241
1269
  clearColumnMenuFilter: e.clearColumnMenuFilter,
1242
- handleHeaderWheel: O.scrollSync.handleHeaderWheel,
1243
- handleHeaderScroll: O.scrollSync.handleHeaderScroll,
1244
- handleViewportScroll: Ht,
1245
- handleViewportKeydown: O.viewportKeyboard.handleViewportKeydown,
1270
+ handleHeaderWheel: n.scrollSync.handleHeaderWheel,
1271
+ handleHeaderScroll: n.scrollSync.handleHeaderScroll,
1272
+ handleViewportScroll: Ft,
1273
+ handleViewportKeydown: n.viewportKeyboard.handleViewportKeydown,
1246
1274
  rowClass: Ie,
1247
- isRowAutosizeProbe: Te,
1248
- rowStyle: re,
1275
+ isRowAutosizeProbe: Pe,
1276
+ rowStyle: Ge,
1249
1277
  isRowInPendingClipboardCut: e.isRowInPendingClipboardCut,
1250
- isRowFocused: O.rowSelection.isRowFocused,
1251
- isRowCheckboxSelected: O.rowSelection.isRowCheckboxSelected,
1252
- allVisibleRowsSelected: O.rowSelection.areAllVisibleRowsSelected,
1253
- someVisibleRowsSelected: O.rowSelection.areSomeVisibleRowsSelected,
1254
- handleRowClick: O.rowSelection.focusRow,
1255
- handleRowIndexClick: O.rowSelection.selectRowRange,
1256
- handleRowIndexKeydown: Jt,
1257
- handleToggleAllVisibleRows: O.rowSelection.toggleVisibleRowsSelected,
1258
- toggleGroupRow: ne,
1259
- rowIndexLabel: qe,
1260
- startResize: tn,
1261
- handleResizeDoubleClick: nn,
1262
- startRowResize: ie,
1263
- autosizeRow: Be,
1264
- isCellSelected: O.visualSelection.isCellSelected,
1265
- isSelectionAnchorCell: O.visualSelection.isSelectionAnchorCell,
1266
- shouldHighlightSelectedCell: O.visualSelection.shouldHighlightSelectedCell,
1267
- isCellOnSelectionEdge: O.visualSelection.isCellOnSelectionEdge,
1268
- isCellInFillPreview: B,
1269
- isCellInPendingClipboardRange: Kt,
1270
- isCellOnPendingClipboardEdge: lt,
1271
- isEditingCell: me,
1272
- isCellEditable: (t, n, a, u) => g(t, H.value + n, a),
1273
- handleCellMouseDown: Yt,
1274
- handleCellClick: O.cellIo.handleCellClick,
1275
- handleCellKeydown: Ct,
1276
- startInlineEdit: ot,
1277
- isFillHandleCell: gt,
1278
- startFillHandleDrag: De,
1279
- startFillHandleDoubleClick: ft,
1280
- fillActionAnchorCell: O.fillAction.fillActionAnchorCell,
1281
- fillActionBehavior: O.fillAction.fillActionBehavior,
1282
- applyFillActionBehavior: Xt,
1283
- handleEditorKeydown: Nt,
1284
- commitInlineEdit: rt,
1285
- cancelInlineEdit: it,
1286
- readCell: O.cellIo.readStageCell,
1287
- readDisplayCell: O.cellIo.readStageDisplayCell
1278
+ isRowFocused: n.rowSelection.isRowFocused,
1279
+ isRowCheckboxSelected: n.rowSelection.isRowCheckboxSelected,
1280
+ allVisibleRowsSelected: n.rowSelection.areAllVisibleRowsSelected,
1281
+ someVisibleRowsSelected: n.rowSelection.areSomeVisibleRowsSelected,
1282
+ handleRowClick: n.rowSelection.focusRow,
1283
+ handleRowIndexClick: n.rowSelection.selectRowRange,
1284
+ handleRowIndexKeydown: st,
1285
+ handleToggleAllVisibleRows: n.rowSelection.toggleVisibleRowsSelected,
1286
+ toggleGroupRow: et,
1287
+ rowIndexLabel: ee,
1288
+ startResize: on,
1289
+ handleResizeDoubleClick: ut,
1290
+ startRowResize: Le,
1291
+ autosizeRow: We,
1292
+ isCellSelected: n.visualSelection.isCellSelected,
1293
+ isSelectionAnchorCell: n.visualSelection.isSelectionAnchorCell,
1294
+ shouldHighlightSelectedCell: n.visualSelection.shouldHighlightSelectedCell,
1295
+ isCellOnSelectionEdge: n.visualSelection.isCellOnSelectionEdge,
1296
+ isCellInFillPreview: Ve,
1297
+ isCellInPendingClipboardRange: de,
1298
+ isCellOnPendingClipboardEdge: me,
1299
+ isEditingCell: ot,
1300
+ isCellEditable: (i, m, v, O) => h(i, H.value + m, v),
1301
+ handleCellMouseDown: Zt,
1302
+ handleCellClick: n.cellIo.handleCellClick,
1303
+ handleCellKeydown: z,
1304
+ startInlineEdit: Fe,
1305
+ isFillHandleCell: en,
1306
+ startFillHandleDrag: Yt,
1307
+ startFillHandleDoubleClick: Jt,
1308
+ fillActionAnchorCell: n.fillAction.fillActionAnchorCell,
1309
+ fillActionBehavior: n.fillAction.fillActionBehavior,
1310
+ applyFillActionBehavior: we,
1311
+ handleEditorKeydown: Wt,
1312
+ commitInlineEdit: De,
1313
+ cancelInlineEdit: rt,
1314
+ readCell: n.cellIo.readStageCell,
1315
+ readDisplayCell: n.cellIo.readStageDisplayCell
1288
1316
  });
1289
1317
  return nl({
1290
1318
  mode: e.mode,
@@ -1296,86 +1324,86 @@ function Bl(e) {
1296
1324
  normalizedBaseRowHeight: e.normalizedBaseRowHeight,
1297
1325
  syncSelectionSnapshotFromRuntime: e.syncSelectionSnapshotFromRuntime,
1298
1326
  syncRowSelectionSnapshotFromRuntime: o,
1299
- syncViewport: V,
1300
- scheduleViewportSync: Vt,
1301
- measureVisibleRowHeights: je,
1327
+ syncViewport: D,
1328
+ scheduleViewportSync: F,
1329
+ measureVisibleRowHeights: ye,
1302
1330
  applyRowHeightSettings: e.applyRowHeightSettings
1303
1331
  }), ll({
1304
- bodyViewportRef: j,
1305
- syncViewport: V,
1306
- handleWindowMouseMove: O.scrollSync.handleWindowMouseMove,
1307
- handleWindowMouseUp: O.scrollSync.handleWindowMouseUp,
1308
- cancelScheduledViewportSync: zt,
1332
+ bodyViewportRef: N,
1333
+ syncViewport: D,
1334
+ handleWindowMouseMove: n.scrollSync.handleWindowMouseMove,
1335
+ handleWindowMouseUp: n.scrollSync.handleWindowMouseUp,
1336
+ cancelScheduledViewportSync: ie,
1309
1337
  onAfterMount: () => {
1310
1338
  e.syncSelectionSnapshotFromRuntime(), o(), Dn(() => {
1311
- e.applyRowHeightSettings(), V();
1339
+ e.applyRowHeightSettings(), D();
1312
1340
  });
1313
1341
  },
1314
1342
  dispose: [
1315
- _e,
1316
- on,
1317
- Y,
1318
- O.history.disposeIntentHistory
1343
+ Ne,
1344
+ an,
1345
+ nn,
1346
+ n.history.disposeIntentHistory
1319
1347
  ]
1320
1348
  }), {
1321
- tableStageProps: an,
1322
- tableStageContext: sn,
1323
- syncViewportFromDom: V,
1349
+ tableStageProps: u,
1350
+ tableStageContext: d,
1351
+ syncViewportFromDom: D,
1324
1352
  copySelectedCells: Ae,
1325
- pasteSelectedCells: tt,
1326
- cutSelectedCells: nt,
1327
- clearSelectedCells: Qt,
1328
- captureHistorySnapshot: ee,
1329
- recordHistoryIntentTransaction: te
1353
+ pasteSelectedCells: te,
1354
+ cutSelectedCells: ce,
1355
+ clearSelectedCells: tn,
1356
+ captureHistorySnapshot: U,
1357
+ recordHistoryIntentTransaction: q
1330
1358
  };
1331
1359
  }
1332
- const _l = yt(() => import("./DataGridColumnLayoutPopover-Qt56b3CA.js")), Gl = yt(() => import("./DataGridAdvancedFilterPopover-Bak_CkaO.js")), Pl = yt(() => import("./DataGridAggregationsPopover-DfQ3-UV4.js")), Ll = yt(() => import("./DataGridGanttStageEntry-D4NqLvKS.js"));
1360
+ const _l = gt(() => import("./DataGridColumnLayoutPopover-Qt56b3CA.js")), Gl = gt(() => import("./DataGridAdvancedFilterPopover-Bak_CkaO.js")), Pl = gt(() => import("./DataGridAggregationsPopover-DfQ3-UV4.js")), Ll = gt(() => import("./DataGridGanttStageEntry-BydDrrtc.js"));
1333
1361
  function Wl(e) {
1334
1362
  return Number.isFinite(e) ? Math.max(24, Math.trunc(e)) : 31;
1335
1363
  }
1336
- function Kl(e) {
1364
+ function Nl(e) {
1337
1365
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/\"/g, '\\"');
1338
1366
  }
1339
- function Mn(e) {
1367
+ function pn(e) {
1340
1368
  return (e ?? []).map((o) => ({
1341
1369
  key: o.key,
1342
1370
  direction: o.direction
1343
1371
  }));
1344
1372
  }
1345
- function Cn() {
1373
+ function gn() {
1346
1374
  return {
1347
1375
  columnFilters: {},
1348
1376
  advancedFilters: {},
1349
1377
  advancedExpression: null
1350
1378
  };
1351
1379
  }
1352
- function He(e) {
1353
- return Kn(e ?? Cn()) ?? Cn();
1380
+ function ze(e) {
1381
+ return Nn(e ?? gn()) ?? gn();
1354
1382
  }
1355
- function gn(e) {
1383
+ function Cn(e) {
1356
1384
  return e.startsWith("string:") ? `string:${e.slice(7).toLowerCase()}` : e;
1357
1385
  }
1358
- function Nl(e) {
1386
+ function Kl(e) {
1359
1387
  const o = {};
1360
- for (const [s, i] of Object.entries(e.columnFilters ?? {})) {
1361
- if (i.kind === "valueSet") {
1362
- const w = Array.from(new Set(
1363
- (i.tokens ?? []).map((C) => gn(String(C ?? ""))).filter((C) => C.length > 0)
1388
+ for (const [s, a] of Object.entries(e.columnFilters ?? {})) {
1389
+ if (a.kind === "valueSet") {
1390
+ const f = Array.from(new Set(
1391
+ (a.tokens ?? []).map((C) => Cn(String(C ?? ""))).filter((C) => C.length > 0)
1364
1392
  ));
1365
- if (w.length === 0)
1393
+ if (f.length === 0)
1366
1394
  continue;
1367
1395
  o[s] = {
1368
1396
  kind: "valueSet",
1369
- tokens: w
1397
+ tokens: f
1370
1398
  };
1371
1399
  continue;
1372
1400
  }
1373
1401
  o[s] = {
1374
1402
  kind: "predicate",
1375
- operator: i.operator,
1376
- value: i.value,
1377
- value2: i.value2,
1378
- caseSensitive: i.caseSensitive
1403
+ operator: a.operator,
1404
+ value: a.value,
1405
+ value2: a.value2,
1406
+ caseSensitive: a.caseSensitive
1379
1407
  };
1380
1408
  }
1381
1409
  const r = { ...e.advancedFilters ?? {} }, l = e.advancedExpression ?? null;
@@ -1391,7 +1419,7 @@ function $l(e) {
1391
1419
  s?.kind === "predicate" && typeof s.value == "string" && (o[l] = s.value);
1392
1420
  return o;
1393
1421
  }
1394
- function J(e) {
1422
+ function Y(e) {
1395
1423
  if (typeof globalThis.structuredClone == "function")
1396
1424
  try {
1397
1425
  return globalThis.structuredClone(e);
@@ -1445,7 +1473,7 @@ function Ul(e) {
1445
1473
  return null;
1446
1474
  }
1447
1475
  }
1448
- function Ve(e) {
1476
+ function Te(e) {
1449
1477
  return e ? {
1450
1478
  columns: e.columns.map((o) => ({ ...o })),
1451
1479
  basis: e.basis === "source" ? "source" : "filtered"
@@ -1457,7 +1485,7 @@ function ql(e) {
1457
1485
  expandedByDefault: e.expandedByDefault
1458
1486
  } : null;
1459
1487
  }
1460
- function U(e) {
1488
+ function $(e) {
1461
1489
  return e == null ? "blank" : e instanceof Date ? e.toISOString() : typeof e == "string" ? `"${e}"` : String(e);
1462
1490
  }
1463
1491
  function oe(e) {
@@ -1512,21 +1540,21 @@ function Xl(e) {
1512
1540
  return l === "string" || l === "number" || l === "boolean" || l === "bigint" || l === "date" || l === "repr" || l === "json" ? s : o;
1513
1541
  }
1514
1542
  function Yl(e, o) {
1515
- return o.kind === "valueSet" ? o.tokens.length === 1 ? `${e}: ${Xl(o.tokens[0] ?? "")}` : `${e}: ${o.tokens.length} values` : o.operator === "between" ? `${e} between ${U(o.value)} and ${U(o.value2)}` : o.operator === "isEmpty" || o.operator === "notEmpty" || o.operator === "isNull" || o.operator === "notNull" ? `${e} ${oe(o.operator)}` : `${e} ${oe(o.operator)} ${U(o.value)}`;
1543
+ return o.kind === "valueSet" ? o.tokens.length === 1 ? `${e}: ${Xl(o.tokens[0] ?? "")}` : `${e}: ${o.tokens.length} values` : o.operator === "between" ? `${e} between ${$(o.value)} and ${$(o.value2)}` : o.operator === "isEmpty" || o.operator === "notEmpty" || o.operator === "isNull" || o.operator === "notNull" ? `${e} ${oe(o.operator)}` : `${e} ${oe(o.operator)} ${$(o.value)}`;
1516
1544
  }
1517
1545
  function Jl(e, o) {
1518
1546
  const r = o.clauses.map((l, s) => {
1519
- const i = s === 0 ? "" : `${String(l.join ?? "and").toUpperCase()} `;
1520
- return l.operator === "between" ? `${i}${oe(l.operator)} ${U(l.value)} and ${U(l.value2)}` : l.operator === "isEmpty" || l.operator === "notEmpty" || l.operator === "isNull" || l.operator === "notNull" ? `${i}${oe(l.operator)}` : `${i}${oe(l.operator)} ${U(l.value)}`;
1547
+ const a = s === 0 ? "" : `${String(l.join ?? "and").toUpperCase()} `;
1548
+ return l.operator === "between" ? `${a}${oe(l.operator)} ${$(l.value)} and ${$(l.value2)}` : l.operator === "isEmpty" || l.operator === "notEmpty" || l.operator === "isNull" || l.operator === "notNull" ? `${a}${oe(l.operator)}` : `${a}${oe(l.operator)} ${$(l.value)}`;
1521
1549
  }).filter((l) => l.length > 0);
1522
1550
  return r.length === 0 ? `${e}: active` : `${e} ${r.join(" ")}`;
1523
1551
  }
1524
- function bn(e, o) {
1552
+ function hn(e, o) {
1525
1553
  if (e.kind === "condition") {
1526
1554
  const r = o(e.key);
1527
- return e.operator === "between" ? `${r} between ${U(e.value)} and ${U(e.value2)}` : e.operator === "isEmpty" || e.operator === "notEmpty" || e.operator === "isNull" || e.operator === "notNull" ? `${r} ${oe(e.operator)}` : `${r} ${oe(e.operator)} ${U(e.value)}`;
1555
+ return e.operator === "between" ? `${r} between ${$(e.value)} and ${$(e.value2)}` : e.operator === "isEmpty" || e.operator === "notEmpty" || e.operator === "isNull" || e.operator === "notNull" ? `${r} ${oe(e.operator)}` : `${r} ${oe(e.operator)} ${$(e.value)}`;
1528
1556
  }
1529
- return e.kind === "not" ? `NOT (${bn(e.child, o)})` : e.children.map((r) => bn(r, o)).filter((r) => r.length > 0).join(` ${e.operator.toUpperCase()} `);
1557
+ return e.kind === "not" ? `NOT (${hn(e.child, o)})` : e.children.map((r) => hn(r, o)).filter((r) => r.length > 0).join(` ${e.operator.toUpperCase()} `);
1530
1558
  }
1531
1559
  const Zl = [
1532
1560
  "sum",
@@ -1677,6 +1705,18 @@ const no = {
1677
1705
  type: Number,
1678
1706
  default: 31
1679
1707
  },
1708
+ layoutMode: {
1709
+ type: String,
1710
+ default: "fill"
1711
+ },
1712
+ minRows: {
1713
+ type: Number,
1714
+ default: null
1715
+ },
1716
+ maxRows: {
1717
+ type: Number,
1718
+ default: null
1719
+ },
1680
1720
  rowHover: {
1681
1721
  type: Boolean,
1682
1722
  default: !1
@@ -1715,9 +1755,9 @@ const no = {
1715
1755
  }
1716
1756
  },
1717
1757
  setup(e) {
1718
- const o = W(0), r = W(Mn(e.sortModel)), l = W(He(e.filterModel)), s = m(() => $l(l.value));
1719
- let i = "";
1720
- const w = () => {
1758
+ const o = P(0), r = P(pn(e.sortModel)), l = P(ze(e.filterModel)), s = w(() => $l(l.value));
1759
+ let a = "";
1760
+ const f = () => {
1721
1761
  const t = e.runtimeRowModel.getSnapshot();
1722
1762
  return [
1723
1763
  t.kind,
@@ -1727,253 +1767,253 @@ const no = {
1727
1767
  t.projection?.recomputeVersion ?? t.projection?.version ?? ""
1728
1768
  ].join("|");
1729
1769
  };
1730
- i = w();
1770
+ a = f();
1731
1771
  const C = e.runtimeRowModel.subscribe(() => {
1732
- const t = w();
1733
- t !== i && (i = t, o.value += 1);
1772
+ const t = f();
1773
+ t !== a && (a = t, o.value += 1);
1734
1774
  });
1735
1775
  En(() => {
1736
1776
  C();
1737
- }), K(
1777
+ }), L(
1738
1778
  () => e.sortModel,
1739
1779
  (t) => {
1740
- r.value = Mn(t);
1780
+ r.value = pn(t);
1741
1781
  },
1742
1782
  { deep: !0 }
1743
- ), K(
1783
+ ), L(
1744
1784
  () => e.filterModel,
1745
1785
  (t) => {
1746
- l.value = He(t);
1786
+ l.value = ze(t);
1747
1787
  },
1748
1788
  { deep: !0 }
1749
1789
  );
1750
- const b = m(() => e.mode), A = m(() => e.rows), v = m(() => (o.value, e.runtime.api.rows.getSnapshot().rowCount)), R = m(() => e.runtime.columnSnapshot.value.visibleColumns), y = m(() => e.runtime.columnSnapshot.value.columns ?? []), g = m(() => R.value.filter((t) => t.visible !== !1).map((t) => ({
1790
+ const y = w(() => e.mode), A = w(() => e.rows), b = w(() => (o.value, e.runtime.api.rows.getSnapshot().rowCount)), R = w(() => e.runtime.columnSnapshot.value.visibleColumns), S = w(() => e.runtime.columnSnapshot.value.columns ?? []), h = w(() => R.value.filter((t) => t.visible !== !1).map((t) => ({
1751
1791
  key: t.key,
1752
1792
  label: t.column.label ?? t.key
1753
- }))), f = m(() => y.value.map((t) => ({
1793
+ }))), g = w(() => S.value.map((t) => ({
1754
1794
  key: t.key,
1755
1795
  label: t.column.label ?? t.key,
1756
1796
  visible: t.visible !== !1
1757
- }))), M = m(() => y.value.filter((t) => t.column.capabilities?.aggregatable === !0).map((t) => ({
1797
+ }))), I = w(() => S.value.filter((t) => t.column.capabilities?.aggregatable === !0).map((t) => ({
1758
1798
  key: t.key,
1759
1799
  label: t.column.label ?? t.key,
1760
1800
  allowedOps: to(t.column.dataType)
1761
- }))), I = W(e.rowHeightMode), x = m(() => Wl(e.baseRowHeight)), N = m(() => R.value[0]?.key ?? "name"), j = m(() => {
1801
+ }))), M = P(e.rowHeightMode), x = w(() => Wl(e.baseRowHeight)), W = w(() => R.value[0]?.key ?? "name"), re = w(() => {
1762
1802
  const t = /* @__PURE__ */ new Map();
1763
- for (const n of y.value)
1803
+ for (const n of S.value)
1764
1804
  t.set(n.key, n.column.label ?? n.key);
1765
1805
  return t;
1766
1806
  }), {
1767
- isColumnLayoutPanelOpen: ze,
1768
- columnLayoutPanelItems: pt,
1769
- openColumnLayoutPanel: Mt,
1770
- cancelColumnLayoutPanel: H,
1771
- applyColumnLayoutPanel: It,
1772
- moveColumnUp: xt,
1773
- moveColumnDown: At,
1774
- updateColumnVisibility: Ot
1807
+ isColumnLayoutPanelOpen: vt,
1808
+ columnLayoutPanelItems: je,
1809
+ openColumnLayoutPanel: ht,
1810
+ cancelColumnLayoutPanel: N,
1811
+ applyColumnLayoutPanel: Be,
1812
+ moveColumnUp: bt,
1813
+ moveColumnDown: yt,
1814
+ updateColumnVisibility: H
1775
1815
  } = ol({
1776
- resolveColumns: () => f.value,
1816
+ resolveColumns: () => g.value,
1777
1817
  applyColumnLayout: (t) => {
1778
1818
  e.runtime.api.columns.setOrder(t.order);
1779
- for (const [n, a] of Object.entries(t.visibilityByKey))
1780
- e.runtime.api.columns.setVisibility(n, a);
1819
+ for (const [n, u] of Object.entries(t.visibilityByKey))
1820
+ e.runtime.api.columns.setVisibility(n, u);
1781
1821
  }
1782
1822
  }), {
1783
- isAdvancedFilterPanelOpen: Ft,
1784
- advancedFilterDraftClauses: Dt,
1823
+ isAdvancedFilterPanelOpen: Rt,
1824
+ advancedFilterDraftClauses: St,
1785
1825
  appliedAdvancedFilterExpression: he,
1786
- openAdvancedFilterPanel: Et,
1787
- addAdvancedFilterClause: kt,
1788
- removeAdvancedFilterClause: Ht,
1789
- updateAdvancedFilterClause: V,
1790
- cancelAdvancedFilterPanel: Vt,
1791
- applyAdvancedFilterPanel: zt,
1792
- clearAdvancedFilterPanel: Tt
1826
+ openAdvancedFilterPanel: Mt,
1827
+ addAdvancedFilterClause: pt,
1828
+ removeAdvancedFilterClause: It,
1829
+ updateAdvancedFilterClause: xt,
1830
+ cancelAdvancedFilterPanel: At,
1831
+ applyAdvancedFilterPanel: Ot,
1832
+ clearAdvancedFilterPanel: Ft
1793
1833
  } = rl({
1794
- resolveColumns: () => g.value
1795
- }), q = W(!1), F = W(null), L = m(() => !!e.groupBy?.fields?.length), re = m(() => (o.value, Ve(e.runtime.api.rows.getAggregationModel()))), Te = m(() => (o.value, ql(e.runtime.api.rows.getSnapshot().groupBy))), je = m(() => {
1834
+ resolveColumns: () => h.value
1835
+ }), D = P(!1), F = P(null), ie = w(() => !!e.groupBy?.fields?.length), ae = w(() => (o.value, Te(e.runtime.api.rows.getAggregationModel()))), _e = w(() => (o.value, ql(e.runtime.api.rows.getSnapshot().groupBy))), be = w(() => {
1796
1836
  const t = new Map(
1797
1837
  (F.value?.columns ?? []).map((n) => [n.key, n.op])
1798
1838
  );
1799
- return M.value.map((n) => {
1800
- const a = n.allowedOps[0] ?? "count", u = t.get(n.key), d = u && n.allowedOps.includes(u) ? u : a;
1839
+ return I.value.map((n) => {
1840
+ const u = n.allowedOps[0] ?? "count", d = t.get(n.key), i = d && n.allowedOps.includes(d) ? d : u;
1801
1841
  return {
1802
1842
  key: n.key,
1803
1843
  label: n.label,
1804
1844
  enabled: t.has(n.key),
1805
- op: d,
1845
+ op: i,
1806
1846
  allowedOps: n.allowedOps
1807
1847
  };
1808
1848
  });
1809
- }), ie = m(() => F.value?.basis === "source" ? "source" : "filtered");
1810
- K(
1811
- re,
1849
+ }), G = w(() => F.value?.basis === "source" ? "source" : "filtered");
1850
+ L(
1851
+ ae,
1812
1852
  (t) => {
1813
- q.value || (F.value = Ve(t));
1853
+ D.value || (F.value = Te(t));
1814
1854
  },
1815
1855
  { immediate: !0, deep: !0 }
1816
- ), K(
1856
+ ), L(
1817
1857
  () => e.rowHeightMode,
1818
1858
  (t) => {
1819
- I.value = t;
1859
+ M.value = t;
1820
1860
  }
1821
1861
  );
1822
- const Be = (t) => {
1862
+ const Ge = (t) => {
1823
1863
  const n = l.value.columnFilters?.[t];
1824
1864
  return n ? n.kind === "valueSet" ? n.tokens.length > 0 : !0 : !1;
1825
- }, _e = (t) => {
1865
+ }, Pe = (t) => {
1826
1866
  const n = l.value.columnFilters?.[t];
1827
- return !n || n.kind !== "valueSet" ? [] : n.tokens.map((a) => gn(String(a ?? "")));
1828
- }, Q = (t) => Tn(e.columnMenu, t), Ge = (t) => wl(e.columnMenu, t), Pe = (t) => Cl(e.columnMenu, t), ae = (t) => fl(e.columnMenu, t), Le = (t) => gl(e.columnMenu, t), X = (t) => {
1829
- const n = Te.value?.fields.findIndex((a) => a === t) ?? -1;
1867
+ return !n || n.kind !== "valueSet" ? [] : n.tokens.map((u) => Cn(String(u ?? "")));
1868
+ }, ye = (t) => Tn(e.columnMenu, t), Le = (t) => wl(e.columnMenu, t), We = (t) => gl(e.columnMenu, t), Ne = (t) => fl(e.columnMenu, t), Z = (t) => Cl(e.columnMenu, t), Re = (t) => {
1869
+ const n = _e.value?.fields.findIndex((u) => u === t) ?? -1;
1830
1870
  return n >= 0 ? n : null;
1831
- }, Re = (t) => X(t) !== null, G = () => {
1832
- const t = r.value.map((a) => ({
1833
- key: a.key,
1834
- direction: a.direction
1871
+ }, Ke = (t) => Re(t) !== null, V = () => {
1872
+ const t = r.value.map((u) => ({
1873
+ key: u.key,
1874
+ direction: u.direction
1835
1875
  })), n = e.advancedFilter.enabled ? he.value : l.value.advancedExpression ?? null;
1836
1876
  e.runtime.api.rows.setSortAndFilterModel({
1837
1877
  sortModel: t,
1838
- filterModel: Nl({
1878
+ filterModel: Kl({
1839
1879
  ...l.value,
1840
1880
  advancedExpression: n
1841
1881
  })
1842
1882
  });
1843
- }, ye = m(() => e.advancedFilter.enabled ? he.value ?? l.value.advancedExpression ?? null : l.value.advancedExpression ?? null), Se = m(() => {
1844
- const t = (a) => j.value.get(a) ?? a, n = [];
1845
- for (const [a, u] of Object.entries(l.value.columnFilters ?? {}))
1846
- u && n.push(Yl(t(a), u));
1847
- for (const [a, u] of Object.entries(l.value.advancedFilters ?? {}))
1848
- u && n.push(`Advanced: ${Jl(t(a), u)}`);
1849
- return ye.value && n.push(`Advanced: ${bn(ye.value, t)}`), Object.freeze(n);
1850
- }), We = m(() => Se.value.length > 0), jt = () => {
1851
- l.value = Cn(), Tt(), G();
1883
+ }, $e = w(() => e.advancedFilter.enabled ? he.value ?? l.value.advancedExpression ?? null : l.value.advancedExpression ?? null), Q = w(() => {
1884
+ const t = (u) => re.value.get(u) ?? u, n = [];
1885
+ for (const [u, d] of Object.entries(l.value.columnFilters ?? {}))
1886
+ d && n.push(Yl(t(u), d));
1887
+ for (const [u, d] of Object.entries(l.value.advancedFilters ?? {}))
1888
+ d && n.push(`Advanced: ${Jl(t(u), d)}`);
1889
+ return $e.value && n.push(`Advanced: ${hn($e.value, t)}`), Object.freeze(n);
1890
+ }), Se = w(() => Q.value.length > 0), Dt = () => {
1891
+ l.value = gn(), Ft(), V();
1852
1892
  };
1853
- K(
1893
+ L(
1854
1894
  he,
1855
1895
  () => {
1856
- e.advancedFilter.enabled && G();
1896
+ e.advancedFilter.enabled && V();
1857
1897
  },
1858
1898
  { deep: !0 }
1859
1899
  );
1860
- const Bt = (t, n = !1) => {
1861
- const a = r.value.findIndex((d) => d.key === t), u = a >= 0 ? r.value[a] : null;
1862
- if (!u) {
1863
- const d = { key: t, direction: "asc" };
1864
- r.value = n ? [...r.value, d] : [d], G();
1900
+ const Ue = (t, n = !1) => {
1901
+ const u = r.value.findIndex((i) => i.key === t), d = u >= 0 ? r.value[u] : null;
1902
+ if (!d) {
1903
+ const i = { key: t, direction: "asc" };
1904
+ r.value = n ? [...r.value, i] : [i], V();
1865
1905
  return;
1866
1906
  }
1867
- if (u.direction === "asc") {
1868
- const d = { key: t, direction: "desc" };
1869
- n ? r.value = r.value.map((h) => h.key === t ? d : h) : r.value = [d], G();
1907
+ if (d.direction === "asc") {
1908
+ const i = { key: t, direction: "desc" };
1909
+ n ? r.value = r.value.map((m) => m.key === t ? i : m) : r.value = [i], V();
1870
1910
  return;
1871
1911
  }
1872
- r.value = n ? r.value.filter((d) => d.key !== t) : [], G();
1873
- }, pe = (t) => {
1874
- const n = r.value.findIndex((d) => d.key === t);
1912
+ r.value = n ? r.value.filter((i) => i.key !== t) : [], V();
1913
+ }, qe = (t) => {
1914
+ const n = r.value.findIndex((i) => i.key === t);
1875
1915
  if (n < 0)
1876
1916
  return "";
1877
- const a = r.value[n];
1878
- if (!a)
1917
+ const u = r.value[n];
1918
+ if (!u)
1879
1919
  return "";
1880
- const u = a.direction === "asc" ? "↑" : "↓";
1881
- return r.value.length > 1 ? `${u}${n + 1}` : u;
1882
- }, Ke = (t, n) => {
1883
- const a = He(l.value), u = n.trim();
1884
- u ? a.columnFilters[t] = {
1920
+ const d = u.direction === "asc" ? "↑" : "↓";
1921
+ return r.value.length > 1 ? `${d}${n + 1}` : d;
1922
+ }, Et = (t, n) => {
1923
+ const u = ze(l.value), d = n.trim();
1924
+ d ? u.columnFilters[t] = {
1885
1925
  kind: "predicate",
1886
1926
  operator: "contains",
1887
- value: u,
1927
+ value: d,
1888
1928
  caseSensitive: !1
1889
- } : delete a.columnFilters[t], l.value = a, G();
1890
- }, _t = () => {
1891
- e.runtime.api.view.setRowHeightMode(I.value), e.runtime.api.view.setBaseRowHeight(x.value);
1892
- }, Gt = () => {
1893
- F.value = Ve(re.value), q.value = !0;
1894
- }, Me = () => {
1895
- F.value = Ve(re.value), q.value = !1;
1929
+ } : delete u.columnFilters[t], l.value = u, V();
1930
+ }, kt = () => {
1931
+ e.runtime.api.view.setRowHeightMode(M.value), e.runtime.api.view.setBaseRowHeight(x.value);
1932
+ }, Ht = () => {
1933
+ F.value = Te(ae.value), D.value = !0;
1934
+ }, se = () => {
1935
+ F.value = Te(ae.value), D.value = !1;
1896
1936
  };
1897
- K(
1898
- L,
1937
+ L(
1938
+ ie,
1899
1939
  (t) => {
1900
- t || Me();
1940
+ t || se();
1901
1941
  },
1902
1942
  { immediate: !0 }
1903
1943
  );
1904
- const Pt = () => {
1944
+ const Xe = () => {
1905
1945
  F.value = null;
1906
- }, Ne = (t) => {
1946
+ }, Vt = (t) => {
1907
1947
  F.value = {
1908
1948
  basis: t,
1909
1949
  columns: F.value?.columns ?? []
1910
1950
  };
1911
- }, ee = (t, n) => {
1912
- const a = M.value.find((S) => S.key === t);
1913
- if (!a)
1951
+ }, zt = (t, n) => {
1952
+ const u = I.value.find((v) => v.key === t);
1953
+ if (!u)
1914
1954
  return;
1915
- const u = F.value?.columns ?? [];
1955
+ const d = F.value?.columns ?? [];
1916
1956
  if (!n) {
1917
- const S = u.filter((D) => D.key !== t);
1918
- F.value = S.length > 0 ? { basis: ie.value, columns: S } : null;
1957
+ const v = d.filter((O) => O.key !== t);
1958
+ F.value = v.length > 0 ? { basis: G.value, columns: v } : null;
1919
1959
  return;
1920
1960
  }
1921
- const h = u.find((S) => S.key === t) ?? {
1961
+ const m = d.find((v) => v.key === t) ?? {
1922
1962
  key: t,
1923
- op: a.allowedOps[0] ?? "count"
1963
+ op: u.allowedOps[0] ?? "count"
1924
1964
  };
1925
1965
  F.value = {
1926
- basis: ie.value,
1966
+ basis: G.value,
1927
1967
  columns: [
1928
- ...u.filter((S) => S.key !== t),
1929
- h
1968
+ ...d.filter((v) => v.key !== t),
1969
+ m
1930
1970
  ]
1931
1971
  };
1932
- }, te = (t, n) => {
1933
- const a = M.value.find((d) => d.key === t);
1934
- if (!a || !a.allowedOps.includes(n))
1972
+ }, Ye = (t, n) => {
1973
+ const u = I.value.find((i) => i.key === t);
1974
+ if (!u || !u.allowedOps.includes(n))
1935
1975
  return;
1936
- const u = (F.value?.columns ?? []).map((d) => d.key !== t ? d : {
1937
- ...d,
1976
+ const d = (F.value?.columns ?? []).map((i) => i.key !== t ? i : {
1977
+ ...i,
1938
1978
  op: n
1939
1979
  });
1940
1980
  F.value = {
1941
- basis: ie.value,
1942
- columns: u
1981
+ basis: G.value,
1982
+ columns: d
1943
1983
  };
1944
- }, Lt = () => {
1984
+ }, Tt = () => {
1945
1985
  const t = F.value && F.value.columns.length > 0 ? F.value : null;
1946
- e.runtime.api.rows.setAggregationModel(t), F.value = Ve(t), q.value = !1;
1947
- }, $e = (t) => r.value.find((n) => n.key === t)?.direction ?? null, Ue = (t, n) => {
1948
- const a = R.value.find((u) => u.key === t);
1949
- !a || a.column.capabilities?.sortable === !1 || (r.value = n === null ? r.value.filter((u) => u.key !== t) : [{ key: t, direction: n }], G());
1950
- }, qe = (t, n) => {
1986
+ e.runtime.api.rows.setAggregationModel(t), F.value = Te(t), D.value = !1;
1987
+ }, Me = (t) => r.value.find((n) => n.key === t)?.direction ?? null, U = (t, n) => {
1988
+ const u = R.value.find((d) => d.key === t);
1989
+ !u || u.column.capabilities?.sortable === !1 || (r.value = n === null ? r.value.filter((d) => d.key !== t) : [{ key: t, direction: n }], V());
1990
+ }, q = (t, n) => {
1951
1991
  e.runtime.api.columns.setPin(t, n);
1952
- }, Xe = (t, n) => {
1953
- const a = Te.value, u = n ? Array.from(/* @__PURE__ */ new Set([...a?.fields ?? [], t])) : (a?.fields ?? []).filter((d) => d !== t);
1954
- e.runtime.api.rows.setGroupBy(u.length > 0 ? {
1955
- fields: u,
1956
- expandedByDefault: a?.expandedByDefault ?? !0
1992
+ }, Je = (t, n) => {
1993
+ const u = _e.value, d = n ? Array.from(/* @__PURE__ */ new Set([...u?.fields ?? [], t])) : (u?.fields ?? []).filter((i) => i !== t);
1994
+ e.runtime.api.rows.setGroupBy(d.length > 0 ? {
1995
+ fields: d,
1996
+ expandedByDefault: u?.expandedByDefault ?? !0
1957
1997
  } : null);
1958
- }, Ye = (t, n) => {
1959
- const a = Array.from(new Set(
1960
- n.map((d) => gn(String(d ?? ""))).filter((d) => d.length > 0)
1998
+ }, Ze = (t, n) => {
1999
+ const u = Array.from(new Set(
2000
+ n.map((i) => Cn(String(i ?? ""))).filter((i) => i.length > 0)
1961
2001
  ));
1962
- if (a.length === 0) {
1963
- Ie(t);
2002
+ if (u.length === 0) {
2003
+ pe(t);
1964
2004
  return;
1965
2005
  }
1966
- const u = He(l.value);
1967
- u.columnFilters[t] = {
2006
+ const d = ze(l.value);
2007
+ d.columnFilters[t] = {
1968
2008
  kind: "valueSet",
1969
- tokens: a
1970
- }, l.value = u, G();
1971
- }, Ie = (t) => {
1972
- const n = He(l.value);
1973
- delete n.columnFilters[t], l.value = n, G();
1974
- }, ne = W(null), z = W(null);
1975
- let se = 0;
1976
- const xe = () => {
2009
+ tokens: u
2010
+ }, l.value = d, V();
2011
+ }, pe = (t) => {
2012
+ const n = ze(l.value);
2013
+ delete n.columnFilters[t], l.value = n, V();
2014
+ }, ee = P(null), j = P(null);
2015
+ let Qe = 0;
2016
+ const Ie = () => {
1977
2017
  const t = e.selectionSnapshot.value, n = t?.ranges[t.activeRangeIndex] ?? null;
1978
2018
  return n ? {
1979
2019
  startRow: n.startRow,
@@ -1981,16 +2021,16 @@ const no = {
1981
2021
  startColumn: n.startCol,
1982
2022
  endColumn: n.endCol
1983
2023
  } : null;
1984
- }, Je = () => {
2024
+ }, et = () => {
1985
2025
  const t = e.selectionSnapshot.value?.activeCell;
1986
2026
  return t ? {
1987
2027
  rowIndex: t.rowIndex,
1988
2028
  columnIndex: t.colIndex
1989
2029
  } : null;
1990
- }, Ze = (t) => t ? t.startRow !== t.endRow || t.startColumn !== t.endColumn : !1, Qe = (t, n) => t.rowIndex >= Math.min(n.startRow, n.endRow) && t.rowIndex <= Math.max(n.startRow, n.endRow) && t.columnIndex >= Math.min(n.startColumn, n.endColumn) && t.columnIndex <= Math.max(n.startColumn, n.endColumn), Wt = (t, n) => {
1991
- const a = e.runtime.resolveBodyRowIndexById(t), u = R.value.findIndex((d) => d.key === n);
1992
- return a < 0 || u < 0 ? null : { rowIndex: a, columnIndex: u };
1993
- }, et = (t) => ({
2030
+ }, xe = (t) => t ? t.startRow !== t.endRow || t.startColumn !== t.endColumn : !1, ue = (t, n) => t.rowIndex >= Math.min(n.startRow, n.endRow) && t.rowIndex <= Math.max(n.startRow, n.endRow) && t.columnIndex >= Math.min(n.startColumn, n.endColumn) && t.columnIndex <= Math.max(n.startColumn, n.endColumn), jt = (t, n) => {
2031
+ const u = e.runtime.resolveBodyRowIndexById(t), d = R.value.findIndex((i) => i.key === n);
2032
+ return u < 0 || d < 0 ? null : { rowIndex: u, columnIndex: d };
2033
+ }, tt = (t) => ({
1994
2034
  ranges: [{
1995
2035
  startRow: t.rowIndex,
1996
2036
  endRow: t.rowIndex,
@@ -2015,386 +2055,389 @@ const no = {
2015
2055
  colIndex: t.columnIndex,
2016
2056
  rowId: e.runtime.getBodyRowAtIndex(t.rowIndex)?.rowId ?? null
2017
2057
  }
2018
- }), Ae = (t) => {
2058
+ }), nt = (t) => {
2019
2059
  const n = e.runtime.api.rows.getCount();
2020
- for (let a = 0; a < n; a += 1) {
2021
- const u = e.runtime.api.rows.get(a);
2022
- if (u && String(u.rowId) === t)
2023
- return u;
2060
+ for (let u = 0; u < n; u += 1) {
2061
+ const d = e.runtime.api.rows.get(u);
2062
+ if (d && String(d.rowId) === t)
2063
+ return d;
2024
2064
  }
2025
2065
  return null;
2026
- }, tt = async (t) => {
2066
+ }, Bt = async (t) => {
2027
2067
  try {
2028
2068
  return globalThis.navigator?.clipboard?.writeText ? (await globalThis.navigator.clipboard.writeText(t), !0) : !1;
2029
2069
  } catch {
2030
2070
  return !1;
2031
2071
  }
2032
- }, nt = async () => {
2072
+ }, _t = async () => {
2033
2073
  try {
2034
2074
  return globalThis.navigator?.clipboard?.readText ? await globalThis.navigator.clipboard.readText() : "";
2035
2075
  } catch {
2036
2076
  return "";
2037
2077
  }
2038
- }, Kt = async () => {
2039
- if (z.value?.rows.length)
2040
- return z.value.rows.map((n) => J(n));
2041
- const t = (await nt()).trim();
2078
+ }, Gt = async () => {
2079
+ if (j.value?.rows.length)
2080
+ return j.value.rows.map((n) => Y(n));
2081
+ const t = (await _t()).trim();
2042
2082
  if (!t)
2043
2083
  return null;
2044
2084
  try {
2045
2085
  const n = JSON.parse(t);
2046
2086
  if (Array.isArray(n))
2047
- return n.filter((a) => !!a && typeof a == "object").map((a) => J(a));
2087
+ return n.filter((u) => !!u && typeof u == "object").map((u) => Y(u));
2048
2088
  if (n && typeof n == "object")
2049
- return [J(n)];
2089
+ return [Y(n)];
2050
2090
  } catch {
2051
2091
  return null;
2052
2092
  }
2053
2093
  return null;
2054
- }, lt = async (t, n, a = []) => {
2055
- const u = t.map((h) => J(h));
2056
- z.value = {
2057
- rows: u,
2094
+ }, Ae = async (t, n, u = []) => {
2095
+ const d = t.map((m) => Y(m));
2096
+ j.value = {
2097
+ rows: d,
2058
2098
  operation: n,
2059
- sourceRowIds: a.map((h) => String(h))
2099
+ sourceRowIds: u.map((m) => String(m))
2060
2100
  };
2061
- const d = Ul(u);
2062
- return d && await tt(d), !0;
2063
- }, le = () => e.runtime.api.rows.hasInsertSupport(), Oe = () => e.runtime.api.rows.hasDataMutationSupport(), ue = (t) => !t || typeof t != "object" ? !1 : "data" in t || "row" in t || "kind" in t || "state" in t || "sourceIndex" in t || "originalIndex" in t || "displayIndex" in t, ce = (t) => {
2101
+ const i = Ul(d);
2102
+ return i && await Bt(i), !0;
2103
+ }, te = () => e.runtime.api.rows.hasInsertSupport(), ce = () => e.runtime.api.rows.hasDataMutationSupport(), de = (t) => !t || typeof t != "object" ? !1 : "data" in t || "row" in t || "kind" in t || "state" in t || "sourceIndex" in t || "originalIndex" in t || "displayIndex" in t, me = (t) => {
2064
2104
  const n = t;
2065
2105
  return n.rowId != null ? String(n.rowId) : n.id != null ? String(n.id) : null;
2066
- }, de = (t) => {
2106
+ }, ne = (t) => {
2067
2107
  for (const n of e.rows) {
2068
2108
  if (!n || typeof n != "object")
2069
2109
  continue;
2070
- const a = n;
2071
- if ((a.rowId != null ? String(a.rowId) : a.rowKey != null ? String(a.rowKey) : null) === t && ue(a))
2072
- return a;
2110
+ const u = n;
2111
+ if ((u.rowId != null ? String(u.rowId) : u.rowKey != null ? String(u.rowKey) : null) === t && de(u))
2112
+ return u;
2073
2113
  }
2074
2114
  for (const n of e.rows) {
2075
2115
  if (!n || typeof n != "object")
2076
2116
  continue;
2077
- const a = n;
2078
- if (ue(a))
2079
- return a;
2117
+ const u = n;
2118
+ if (de(u))
2119
+ return u;
2080
2120
  }
2081
2121
  return null;
2082
- }, me = () => (se += 1, `datagrid-row-${Date.now()}-${se}`), ot = (t) => {
2083
- const n = J(t), a = me();
2084
- let u = !1;
2085
- return "id" in n && (n.id = a, u = !0), "rowId" in n && (n.rowId = a, u = !0), u || (n.id = a), n;
2086
- }, rt = (t) => {
2087
- const n = me(), a = {};
2088
- for (const [u, d] of Object.entries(t)) {
2089
- if (u === "id" || u === "rowId") {
2090
- a[u] = n;
2122
+ }, Oe = () => (Qe += 1, `datagrid-row-${Date.now()}-${Qe}`), Pt = (t) => {
2123
+ const n = Y(t), u = Oe();
2124
+ let d = !1;
2125
+ return "id" in n && (n.id = u, d = !0), "rowId" in n && (n.rowId = u, d = !0), d || (n.id = u), n;
2126
+ }, Lt = (t) => {
2127
+ const n = Oe(), u = {};
2128
+ for (const [d, i] of Object.entries(t)) {
2129
+ if (d === "id" || d === "rowId") {
2130
+ u[d] = n;
2091
2131
  continue;
2092
2132
  }
2093
- a[u] = typeof d == "number" ? null : "";
2133
+ u[d] = typeof i == "number" ? null : "";
2094
2134
  }
2095
- return !("id" in a) && !("rowId" in a) && (a.id = n), a;
2096
- }, it = (t, n, a) => {
2097
- const u = me(), d = a === "clone" ? J(t) : Object.entries(t).reduce((S, [D, p]) => (S[D] = typeof p == "number" ? null : "", S), {});
2098
- ("id" in d || !("rowId" in d) && !("id" in d)) && (d.id = u), "rowId" in d && (d.rowId = u), "rowKey" in d && (d.rowKey = u);
2099
- const h = typeof n.state == "object" && n.state != null ? n.state : null;
2135
+ return !("id" in u) && !("rowId" in u) && (u.id = n), u;
2136
+ }, lt = (t, n, u) => {
2137
+ const d = Oe(), i = u === "clone" ? Y(t) : Object.entries(t).reduce((v, [O, p]) => (v[O] = typeof p == "number" ? null : "", v), {});
2138
+ ("id" in i || !("rowId" in i) && !("id" in i)) && (i.id = d), "rowId" in i && (i.rowId = d), "rowKey" in i && (i.rowKey = d);
2139
+ const m = typeof n.state == "object" && n.state != null ? n.state : null;
2100
2140
  return {
2101
2141
  kind: n.kind === "group" ? "leaf" : n.kind ?? "leaf",
2102
- rowId: u,
2103
- rowKey: u,
2142
+ rowId: d,
2143
+ rowKey: d,
2104
2144
  state: {
2105
- ...h ?? {},
2145
+ ...m ?? {},
2106
2146
  selected: !1,
2107
2147
  group: !1,
2108
2148
  pinned: "none",
2109
2149
  expanded: !1
2110
2150
  },
2111
- data: d,
2112
- row: J(d)
2151
+ data: i,
2152
+ row: Y(i)
2113
2153
  };
2114
- }, Nt = (t, n = null) => n && ue(n) ? it(t, n, "clone") : ot(t), at = (t, n = null) => n && ue(n) ? it(t, n, "blank") : rt(t), st = (t) => {
2115
- const a = (e.rowSelectionSnapshot.value?.selectedRows ?? []).map((h) => String(h)).filter((h) => h.length > 0 && Ae(h)?.kind !== "group");
2116
- if (a.length > 0)
2117
- return a;
2118
- const u = xe(), d = R.value.length - 1;
2119
- if (u && d >= 0) {
2120
- const h = Math.min(u.startColumn, u.endColumn), S = Math.max(u.startColumn, u.endColumn), D = Math.min(u.startRow, u.endRow), p = Math.max(u.startRow, u.endRow), P = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
2121
- if (h === 0 && S === d && (P < 0 || P >= D && P <= p)) {
2122
- const $ = [];
2123
- for (let T = D; T <= p; T += 1) {
2154
+ }, ot = (t, n = null) => n && de(n) ? lt(t, n, "clone") : Pt(t), Fe = (t, n = null) => n && de(n) ? lt(t, n, "blank") : Lt(t), De = (t) => {
2155
+ const u = (e.rowSelectionSnapshot.value?.selectedRows ?? []).map((m) => String(m)).filter((m) => m.length > 0 && nt(m)?.kind !== "group");
2156
+ if (u.length > 0)
2157
+ return u;
2158
+ const d = Ie(), i = R.value.length - 1;
2159
+ if (d && i >= 0) {
2160
+ const m = Math.min(d.startColumn, d.endColumn), v = Math.max(d.startColumn, d.endColumn), O = Math.min(d.startRow, d.endRow), p = Math.max(d.startRow, d.endRow), _ = t.length > 0 ? e.runtime.resolveBodyRowIndexById(t) : -1;
2161
+ if (m === 0 && v === i && (_ < 0 || _ >= O && _ <= p)) {
2162
+ const K = [];
2163
+ for (let T = O; T <= p; T += 1) {
2124
2164
  const E = e.runtime.getBodyRowAtIndex(T);
2125
- !E || E.kind === "group" || E.rowId == null || $.push(String(E.rowId));
2165
+ !E || E.kind === "group" || E.rowId == null || K.push(String(E.rowId));
2126
2166
  }
2127
- if ($.length > 0)
2128
- return $;
2167
+ if (K.length > 0)
2168
+ return K;
2129
2169
  }
2130
2170
  }
2131
2171
  return t.length > 0 ? [t] : [];
2132
- }, ut = () => {
2172
+ }, rt = () => {
2133
2173
  const t = [], n = e.runtime.api.rows.getCount();
2134
- for (let a = 0; a < n; a += 1) {
2135
- const u = e.runtime.api.rows.get(a);
2136
- !u || u.kind === "group" || t.push(u.data);
2174
+ for (let u = 0; u < n; u += 1) {
2175
+ const d = e.runtime.api.rows.get(u);
2176
+ !d || d.kind === "group" || t.push(d.data);
2137
2177
  }
2138
2178
  return t;
2139
- }, $t = (t) => {
2140
- if (!Oe() || t.length === 0)
2179
+ }, Wt = (t) => {
2180
+ if (!ce() || t.length === 0)
2141
2181
  return !1;
2142
- const n = new Set(t), a = ut().filter((u) => {
2143
- const d = ce(u);
2144
- return d == null || !n.has(d);
2182
+ const n = new Set(t), u = rt().filter((d) => {
2183
+ const i = me(d);
2184
+ return i == null || !n.has(i);
2145
2185
  });
2146
- return a.length === e.runtime.api.rows.getCount() ? !1 : (e.runtime.api.rows.replaceData(a), e.runtime.api.rowSelection.hasSupport() && (e.runtime.api.rowSelection.clearSelectedRows(), e.syncRowSelectionSnapshotFromRuntime?.()), !0);
2147
- }, we = (t, n) => {
2148
- if (!Oe() || t.length === 0 || !n)
2186
+ return u.length === e.runtime.api.rows.getCount() ? !1 : (e.runtime.api.rows.replaceData(u), e.runtime.api.rowSelection.hasSupport() && (e.runtime.api.rowSelection.clearSelectedRows(), e.syncRowSelectionSnapshotFromRuntime?.()), !0);
2187
+ }, Nt = (t, n) => {
2188
+ if (!ce() || t.length === 0 || !n)
2149
2189
  return !1;
2150
- const a = ut(), u = new Set(t.map((D) => String(D)));
2151
- if (u.has(String(n)))
2190
+ const u = rt(), d = new Set(t.map((O) => String(O)));
2191
+ if (d.has(String(n)))
2152
2192
  return !1;
2153
- const d = a.filter((D) => {
2154
- const p = ce(D);
2155
- return p != null && u.has(p);
2193
+ const i = u.filter((O) => {
2194
+ const p = me(O);
2195
+ return p != null && d.has(p);
2156
2196
  });
2157
- if (d.length === 0)
2197
+ if (i.length === 0)
2158
2198
  return !1;
2159
- const h = a.filter((D) => {
2160
- const p = ce(D);
2161
- return p == null || !u.has(p);
2162
- }), S = h.findIndex((D) => ce(D) === n);
2163
- return S < 0 ? !1 : (e.runtime.api.rows.replaceData([
2164
- ...h.slice(0, S + 1),
2165
- ...d,
2166
- ...h.slice(S + 1)
2199
+ const m = u.filter((O) => {
2200
+ const p = me(O);
2201
+ return p == null || !d.has(p);
2202
+ }), v = m.findIndex((O) => me(O) === n);
2203
+ return v < 0 ? !1 : (e.runtime.api.rows.replaceData([
2204
+ ...m.slice(0, v + 1),
2205
+ ...i,
2206
+ ...m.slice(v + 1)
2167
2207
  ]), e.runtime.api.rowSelection.hasSupport() && (e.runtime.api.rowSelection.selectRows(t), e.syncRowSelectionSnapshotFromRuntime?.()), !0);
2168
- }, ct = () => z.value ? (z.value = null, !0) : !1, Ut = (t) => {
2208
+ }, Kt = () => j.value ? (j.value = null, !0) : !1, $t = (t) => {
2169
2209
  if (t.kind === "group")
2170
2210
  return !1;
2171
- const n = z.value;
2211
+ const n = j.value;
2172
2212
  return n ? n.sourceRowIds.includes(String(t.rowId)) : !1;
2173
2213
  };
2174
- let dt = () => !1, mt = () => {
2175
- }, wt = () => {
2176
- }, Fe = async (t, n) => !1;
2177
- const qt = (t, n) => {
2214
+ let it = () => !1, le = () => {
2215
+ }, Ee = () => {
2216
+ }, ke = async (t, n) => !1;
2217
+ const Ut = (t, n) => {
2178
2218
  if (n)
2179
2219
  return n;
2180
- const a = In[t], u = oo[t];
2181
- return u ? `${a} (${u})` : a;
2220
+ const u = In[t], d = oo[t];
2221
+ return d ? `${u} (${d})` : u;
2182
2222
  }, {
2183
- tableStageProps: De,
2184
- tableStageContext: ft,
2185
- copySelectedCells: Xt,
2186
- pasteSelectedCells: Yt,
2187
- cutSelectedCells: Ct,
2223
+ tableStageProps: He,
2224
+ tableStageContext: at,
2225
+ copySelectedCells: qt,
2226
+ pasteSelectedCells: Xt,
2227
+ cutSelectedCells: Yt,
2188
2228
  clearSelectedCells: Jt,
2189
- captureHistorySnapshot: fe,
2229
+ captureHistorySnapshot: we,
2190
2230
  recordHistoryIntentTransaction: Zt
2191
2231
  } = Bl({
2192
- mode: b,
2232
+ mode: y,
2233
+ layoutMode: w(() => e.layoutMode),
2234
+ minRows: w(() => e.minRows),
2235
+ maxRows: w(() => e.maxRows),
2193
2236
  rows: A,
2194
2237
  sourceRows: A,
2195
2238
  runtime: e.runtime,
2196
2239
  rowVersion: o,
2197
- totalRuntimeRows: v,
2240
+ totalRuntimeRows: b,
2198
2241
  visibleColumns: R,
2199
- rowRenderMode: m(() => e.renderMode),
2200
- rowHeightMode: I,
2242
+ rowRenderMode: w(() => e.renderMode),
2243
+ rowHeightMode: M,
2201
2244
  normalizedBaseRowHeight: x,
2202
2245
  selectionSnapshot: e.selectionSnapshot,
2203
2246
  selectionAnchor: e.selectionAnchor,
2204
2247
  rowSelectionSnapshot: e.rowSelectionSnapshot,
2205
- rowHover: m(() => e.rowHover),
2206
- stripedRows: m(() => e.stripedRows),
2207
- showRowIndex: m(() => e.showRowIndex),
2208
- showRowSelection: m(() => e.rowSelection),
2209
- isRowInPendingClipboardCut: Ut,
2248
+ rowHover: w(() => e.rowHover),
2249
+ stripedRows: w(() => e.stripedRows),
2250
+ showRowIndex: w(() => e.showRowIndex),
2251
+ showRowSelection: w(() => e.rowSelection),
2252
+ isRowInPendingClipboardCut: $t,
2210
2253
  syncSelectionSnapshotFromRuntime: e.syncSelectionSnapshotFromRuntime,
2211
2254
  syncRowSelectionSnapshotFromRuntime: e.syncRowSelectionSnapshotFromRuntime,
2212
- clearExternalPendingClipboardOperation: ct,
2213
- firstColumnKey: N,
2255
+ clearExternalPendingClipboardOperation: Kt,
2256
+ firstColumnKey: W,
2214
2257
  columnFilterTextByKey: s,
2215
- virtualization: m(() => e.virtualization),
2216
- toggleSortForColumn: Bt,
2217
- sortIndicator: pe,
2218
- setColumnFilterText: Ke,
2219
- columnMenuEnabled: m(() => e.columnMenu.enabled),
2220
- columnMenuMaxFilterValues: m(() => e.columnMenu.maxFilterValues),
2221
- resolveColumnMenuItems: Q,
2222
- resolveColumnMenuDisabledItems: Ge,
2223
- resolveColumnMenuDisabledReasons: Pe,
2224
- resolveColumnMenuLabels: ae,
2225
- resolveColumnMenuActionOptions: Le,
2226
- isColumnFilterActive: Be,
2227
- isColumnGrouped: Re,
2228
- resolveColumnGroupOrder: X,
2229
- resolveColumnMenuSortDirection: $e,
2230
- resolveColumnMenuSelectedTokens: _e,
2231
- applyColumnMenuSort: Ue,
2232
- applyColumnMenuPin: qe,
2233
- applyColumnMenuGroupBy: Xe,
2234
- applyColumnMenuFilter: Ye,
2235
- clearColumnMenuFilter: Ie,
2236
- applyRowHeightSettings: _t,
2237
- cloneRowData: J,
2258
+ virtualization: w(() => e.virtualization),
2259
+ toggleSortForColumn: Ue,
2260
+ sortIndicator: qe,
2261
+ setColumnFilterText: Et,
2262
+ columnMenuEnabled: w(() => e.columnMenu.enabled),
2263
+ columnMenuMaxFilterValues: w(() => e.columnMenu.maxFilterValues),
2264
+ resolveColumnMenuItems: ye,
2265
+ resolveColumnMenuDisabledItems: Le,
2266
+ resolveColumnMenuDisabledReasons: We,
2267
+ resolveColumnMenuLabels: Ne,
2268
+ resolveColumnMenuActionOptions: Z,
2269
+ isColumnFilterActive: Ge,
2270
+ isColumnGrouped: Ke,
2271
+ resolveColumnGroupOrder: Re,
2272
+ resolveColumnMenuSortDirection: Me,
2273
+ resolveColumnMenuSelectedTokens: Pe,
2274
+ applyColumnMenuSort: U,
2275
+ applyColumnMenuPin: q,
2276
+ applyColumnMenuGroupBy: Je,
2277
+ applyColumnMenuFilter: Ze,
2278
+ clearColumnMenuFilter: pe,
2279
+ applyRowHeightSettings: kt,
2280
+ cloneRowData: Y,
2238
2281
  isCellEditable: e.isCellEditable,
2239
- isContextMenuVisible: () => dt(),
2240
- closeContextMenu: () => mt(),
2282
+ isContextMenuVisible: () => it(),
2283
+ closeContextMenu: () => le(),
2241
2284
  openContextMenuFromCurrentCell: () => {
2242
- wt();
2285
+ Ee();
2243
2286
  },
2244
- runRowIndexKeyboardAction: (t, n) => Fe(t, n)
2287
+ runRowIndexKeyboardAction: (t, n) => ke(t, n)
2245
2288
  }), {
2246
- contextMenu: B,
2247
- contextMenuRef: gt,
2289
+ contextMenu: z,
2290
+ contextMenuRef: st,
2248
2291
  contextMenuStyle: Qt,
2249
- closeContextMenu: Y,
2250
- openContextMenu: Ee,
2292
+ closeContextMenu: X,
2293
+ openContextMenu: Ve,
2251
2294
  onContextMenuKeyDown: en
2252
2295
  } = Wn();
2253
- dt = () => B.value.visible, mt = Y;
2296
+ it = () => z.value.visible, le = X;
2254
2297
  const tn = il({
2255
2298
  isInteractionBlocked: () => !1,
2256
2299
  isRangeMoveModifierActive: () => !1,
2257
- resolveSelectionRange: xe,
2258
- resolveCellCoordFromDataset: Wt,
2300
+ resolveSelectionRange: Ie,
2301
+ resolveCellCoordFromDataset: jt,
2259
2302
  applyCellSelection: (t) => {
2260
- e.runtime.api.selection.setSnapshot(et(t)), e.syncSelectionSnapshotFromRuntime();
2303
+ e.runtime.api.selection.setSnapshot(tt(t)), e.syncSelectionSnapshotFromRuntime();
2261
2304
  },
2262
- resolveActiveCellCoord: Je,
2305
+ resolveActiveCellCoord: et,
2263
2306
  setActiveCellCoord: (t) => {
2264
- e.runtime.api.selection.setSnapshot(et(t)), e.syncSelectionSnapshotFromRuntime();
2307
+ e.runtime.api.selection.setSnapshot(tt(t)), e.syncSelectionSnapshotFromRuntime();
2265
2308
  },
2266
2309
  cellCoordsEqual: (t, n) => t?.rowIndex === n?.rowIndex && t?.columnIndex === n?.columnIndex,
2267
- isMultiCellSelection: Ze,
2268
- isCoordInsideRange: Qe,
2269
- openContextMenu: Ee,
2270
- closeContextMenu: Y,
2271
- isColumnContextEnabled: (t) => e.cellMenu.enabled ? ht(e.cellMenu, t).length > 0 : !1,
2310
+ isMultiCellSelection: xe,
2311
+ isCoordInsideRange: ue,
2312
+ openContextMenu: Ve,
2313
+ closeContextMenu: X,
2314
+ isColumnContextEnabled: (t) => e.cellMenu.enabled ? wt(e.cellMenu, t).length > 0 : !1,
2272
2315
  isRowIndexContextEnabled: () => e.rowIndexMenu.enabled && e.showRowIndex
2273
2316
  }), nn = al({
2274
- resolveCurrentCellCoord: Je,
2275
- resolveViewportElement: () => ne.value,
2317
+ resolveCurrentCellCoord: et,
2318
+ resolveViewportElement: () => ee.value,
2276
2319
  resolveRowAtIndex: (t) => e.runtime.getBodyRowAtIndex(t) ?? void 0,
2277
2320
  resolveColumnAtIndex: (t) => R.value[t] ?? void 0,
2278
- resolveSelectionRange: xe,
2279
- isMultiCellSelection: (t) => Ze(t),
2280
- isCoordInsideRange: Qe,
2281
- openContextMenu: Ee,
2282
- isColumnContextEnabled: (t) => e.cellMenu.enabled && ht(e.cellMenu, t.key).length > 0
2321
+ resolveSelectionRange: Ie,
2322
+ isMultiCellSelection: (t) => xe(t),
2323
+ isCoordInsideRange: ue,
2324
+ openContextMenu: Ve,
2325
+ isColumnContextEnabled: (t) => e.cellMenu.enabled && wt(e.cellMenu, t.key).length > 0
2283
2326
  });
2284
- wt = () => {
2327
+ Ee = () => {
2285
2328
  nn.openContextMenuFromCurrentCell();
2286
2329
  };
2287
2330
  const ln = (t) => {
2288
- if (!e.rowIndexMenu.enabled || !e.showRowIndex || !ne.value)
2331
+ if (!e.rowIndexMenu.enabled || !e.showRowIndex || !ee.value)
2289
2332
  return !1;
2290
- const n = String(t), a = `.datagrid-stage__row-index-cell[data-row-id="${Kl(n)}"]`, u = ne.value.querySelector(a);
2291
- if (!u)
2333
+ const n = String(t), u = `.datagrid-stage__row-index-cell[data-row-id="${Nl(n)}"]`, d = ee.value.querySelector(u);
2334
+ if (!d)
2292
2335
  return !1;
2293
- const d = u.getBoundingClientRect();
2294
- return Ee(
2295
- d.left + Math.max(10, Math.min(d.width / 2, Math.max(10, d.width - 10))),
2296
- d.bottom - 4,
2336
+ const i = d.getBoundingClientRect();
2337
+ return Ve(
2338
+ i.left + Math.max(10, Math.min(i.width / 2, Math.max(10, i.width - 10))),
2339
+ i.bottom - 4,
2297
2340
  {
2298
2341
  zone: "row-index",
2299
2342
  rowId: n
2300
2343
  }
2301
2344
  ), !0;
2302
- }, Ce = (t, n) => {
2345
+ }, fe = (t, n) => {
2303
2346
  Zt({
2304
2347
  intent: "edit",
2305
2348
  label: n
2306
2349
  }, t);
2307
2350
  };
2308
- Fe = async (t, n) => {
2309
- const a = String(n);
2351
+ ke = async (t, n) => {
2352
+ const u = String(n);
2310
2353
  if (t === "open-row-menu")
2311
- return ln(a);
2312
- const u = Ae(a);
2313
- if (!u || u.kind === "group")
2354
+ return ln(u);
2355
+ const d = nt(u);
2356
+ if (!d || d.kind === "group")
2314
2357
  return !1;
2315
2358
  if (t === "insert-row-above") {
2316
- if (!le())
2359
+ if (!te())
2317
2360
  return !1;
2318
- const d = fe(), h = e.runtime.api.rows.insertDataBefore(
2361
+ const i = we(), m = e.runtime.api.rows.insertDataBefore(
2319
2362
  n,
2320
- [at(u.data, de(a))]
2363
+ [Fe(d.data, ne(u))]
2321
2364
  );
2322
- return h && Ce(d, "Insert row above"), h;
2365
+ return m && fe(i, "Insert row above"), m;
2323
2366
  }
2324
2367
  if (t === "insert-row-below") {
2325
- if (!le())
2368
+ if (!te())
2326
2369
  return !1;
2327
- const d = fe(), h = e.runtime.api.rows.insertDataAfter(
2370
+ const i = we(), m = e.runtime.api.rows.insertDataAfter(
2328
2371
  n,
2329
- [at(u.data, de(a))]
2372
+ [Fe(d.data, ne(u))]
2330
2373
  );
2331
- return h && Ce(d, "Insert row below"), h;
2374
+ return m && fe(i, "Insert row below"), m;
2332
2375
  }
2333
2376
  if (t === "copy-row")
2334
- return lt([u.data], "copy", [a]);
2377
+ return Ae([d.data], "copy", [u]);
2335
2378
  if (t === "cut-row")
2336
- return lt([u.data], "cut", [a]);
2379
+ return Ae([d.data], "cut", [u]);
2337
2380
  if (t === "paste-row") {
2338
- if (!le())
2381
+ if (!te())
2339
2382
  return !1;
2340
- const d = await Kt();
2341
- if (!d || d.length === 0)
2383
+ const i = await Gt();
2384
+ if (!i || i.length === 0)
2342
2385
  return !1;
2343
- const h = fe(), S = z.value?.operation === "cut" ? z.value.sourceRowIds : [], D = de(
2344
- S[0] ?? a
2345
- ) ?? de(a), p = S.length > 0 ? we(S, a) : e.runtime.api.rows.insertDataAfter(
2386
+ const m = we(), v = j.value?.operation === "cut" ? j.value.sourceRowIds : [], O = ne(
2387
+ v[0] ?? u
2388
+ ) ?? ne(u), p = v.length > 0 ? Nt(v, u) : e.runtime.api.rows.insertDataAfter(
2346
2389
  n,
2347
- d.map((P) => Nt(P, D))
2390
+ i.map((_) => ot(_, O))
2348
2391
  );
2349
- return p && z.value?.operation === "cut" && (z.value = null), p && Ce(
2350
- h,
2351
- S.length > 0 ? S.length > 1 ? `Move ${S.length} rows` : "Move row" : d.length > 1 ? `Paste ${d.length} rows` : "Paste row"
2392
+ return p && j.value?.operation === "cut" && (j.value = null), p && fe(
2393
+ m,
2394
+ v.length > 0 ? v.length > 1 ? `Move ${v.length} rows` : "Move row" : i.length > 1 ? `Paste ${i.length} rows` : "Paste row"
2352
2395
  ), p;
2353
2396
  }
2354
2397
  if (t === "delete-selected-rows") {
2355
- const d = st(a);
2356
- if (d.length === 0)
2398
+ const i = De(u);
2399
+ if (i.length === 0)
2357
2400
  return !1;
2358
- const h = fe(), S = $t(d);
2359
- return S && Ce(h, d.length > 1 ? `Delete ${d.length} rows` : "Delete row"), S;
2401
+ const m = we(), v = Wt(i);
2402
+ return v && fe(m, i.length > 1 ? `Delete ${i.length} rows` : "Delete row"), v;
2360
2403
  }
2361
2404
  return !1;
2362
2405
  };
2363
2406
  const on = sl({
2364
2407
  resolveContextMenuState: () => ({
2365
- zone: B.value.zone,
2366
- columnKey: B.value.columnKey,
2367
- rowId: B.value.rowId
2408
+ zone: z.value.zone,
2409
+ columnKey: z.value.columnKey,
2410
+ rowId: z.value.rowId
2368
2411
  }),
2369
2412
  runHeaderContextAction: () => !1,
2370
- runRowIndexContextAction: Fe,
2371
- copySelection: Xt,
2372
- pasteSelection: Yt,
2373
- cutSelection: Ct,
2413
+ runRowIndexContextAction: ke,
2414
+ copySelection: qt,
2415
+ pasteSelection: Xt,
2416
+ cutSelection: Yt,
2374
2417
  clearCurrentSelection: Jt,
2375
- closeContextMenu: Y
2376
- }), ke = m(() => {
2377
- if (!B.value.visible)
2418
+ closeContextMenu: X
2419
+ }), ut = w(() => {
2420
+ if (!z.value.visible)
2378
2421
  return [];
2379
- const t = B.value.zone;
2422
+ const t = z.value.zone;
2380
2423
  if (t === "cell" || t === "range") {
2381
- const n = B.value.columnKey ?? "";
2424
+ const n = z.value.columnKey ?? "";
2382
2425
  if (!e.cellMenu.enabled || !n)
2383
2426
  return [];
2384
- const a = ht(e.cellMenu, n), u = new Set(bl(e.cellMenu, n)), d = hl(e.cellMenu, n), h = Rl(e.cellMenu, n);
2385
- return a.flatMap((S, D) => {
2386
- const p = no[S] ?? [];
2387
- return p.flatMap((P) => {
2388
- const T = h[P];
2427
+ const u = wt(e.cellMenu, n), d = new Set(hl(e.cellMenu, n)), i = bl(e.cellMenu, n), m = yl(e.cellMenu, n);
2428
+ return u.flatMap((v, O) => {
2429
+ const p = no[v] ?? [];
2430
+ return p.flatMap((_) => {
2431
+ const T = m[_];
2389
2432
  if (T?.hidden)
2390
2433
  return [];
2391
- const E = u.has(S) || T?.disabled === !0;
2434
+ const E = d.has(v) || T?.disabled === !0;
2392
2435
  return [{
2393
- id: P,
2394
- label: T?.label ?? In[P],
2436
+ id: _,
2437
+ label: T?.label ?? In[_],
2395
2438
  disabled: E,
2396
- title: T?.disabledReason ?? d[S],
2397
- separatorBefore: D > 0 && P === p[0]
2439
+ title: T?.disabledReason ?? i[v],
2440
+ separatorBefore: O > 0 && _ === p[0]
2398
2441
  }];
2399
2442
  });
2400
2443
  });
@@ -2402,30 +2445,30 @@ const no = {
2402
2445
  if (t === "row-index") {
2403
2446
  if (!e.rowIndexMenu.enabled)
2404
2447
  return [];
2405
- const n = yl(e.rowIndexMenu), a = new Set(Sl(e.rowIndexMenu)), u = pl(e.rowIndexMenu), d = Ml(e.rowIndexMenu);
2406
- return n.flatMap((h, S) => {
2407
- const D = lo[h] ?? [];
2408
- return D.flatMap((p) => {
2409
- const $ = d[p === "insert-row-above" ? "insertAbove" : p === "insert-row-below" ? "insertBelow" : p === "copy-row" ? "copy" : p === "paste-row" ? "paste" : p === "delete-selected-rows" ? "deleteSelected" : "cut"];
2410
- if ($?.hidden)
2448
+ const n = Rl(e.rowIndexMenu), u = new Set(Sl(e.rowIndexMenu)), d = Ml(e.rowIndexMenu), i = pl(e.rowIndexMenu);
2449
+ return n.flatMap((m, v) => {
2450
+ const O = lo[m] ?? [];
2451
+ return O.flatMap((p) => {
2452
+ const K = i[p === "insert-row-above" ? "insertAbove" : p === "insert-row-below" ? "insertBelow" : p === "copy-row" ? "copy" : p === "paste-row" ? "paste" : p === "delete-selected-rows" ? "deleteSelected" : "cut"];
2453
+ if (K?.hidden)
2411
2454
  return [];
2412
- let T = a.has(h) || $?.disabled === !0, E = $?.disabledReason ?? u[h];
2413
- return (p === "insert-row-above" || p === "insert-row-below" || p === "paste-row") && !le() && (T = !0, E = E ?? "Row insertion is not supported by the current row model"), (p === "cut-row" || p === "delete-selected-rows") && !Oe() && (T = !0, E = E ?? "Row deletion is not supported by the current row model"), p === "delete-selected-rows" && st(B.value.rowId ?? "").length === 0 && (T = !0, E = E ?? "No deletable rows are selected"), [{
2455
+ let T = u.has(m) || K?.disabled === !0, E = K?.disabledReason ?? d[m];
2456
+ return (p === "insert-row-above" || p === "insert-row-below" || p === "paste-row") && !te() && (T = !0, E = E ?? "Row insertion is not supported by the current row model"), (p === "cut-row" || p === "delete-selected-rows") && !ce() && (T = !0, E = E ?? "Row deletion is not supported by the current row model"), p === "delete-selected-rows" && De(z.value.rowId ?? "").length === 0 && (T = !0, E = E ?? "No deletable rows are selected"), [{
2414
2457
  id: p,
2415
- label: qt(p, $?.label),
2458
+ label: Ut(p, K?.label),
2416
2459
  disabled: T,
2417
2460
  title: E,
2418
- separatorBefore: S > 0 && p === D[0]
2461
+ separatorBefore: v > 0 && p === O[0]
2419
2462
  }];
2420
2463
  });
2421
2464
  });
2422
2465
  }
2423
2466
  return [];
2424
- }), vt = (t) => {
2467
+ }), rn = (t) => {
2425
2468
  tn.dispatchViewportContextMenu(t);
2426
2469
  }, ge = () => {
2427
- ne.value?.querySelector(".grid-body-viewport")?.focus({ preventScroll: !0 });
2428
- }, rn = () => {
2470
+ ee.value?.querySelector(".grid-body-viewport")?.focus({ preventScroll: !0 });
2471
+ }, an = () => {
2429
2472
  Dn(() => {
2430
2473
  if (typeof window < "u") {
2431
2474
  window.requestAnimationFrame(() => {
@@ -2435,136 +2478,145 @@ const no = {
2435
2478
  }
2436
2479
  ge();
2437
2480
  });
2438
- }, O = async (t) => {
2439
- await on.runContextMenuAction(t) && (ge(), Y(), rn());
2481
+ }, ct = async (t) => {
2482
+ await on.runContextMenuAction(t) && (ge(), X(), an());
2440
2483
  };
2441
- K(
2442
- () => B.value.visible,
2443
- (t, n, a) => {
2484
+ L(
2485
+ () => z.value.visible,
2486
+ (t, n, u) => {
2444
2487
  if (!t || typeof window > "u")
2445
2488
  return;
2446
- const u = (h) => {
2447
- const S = h.target;
2448
- S && gt.value?.contains(S) || Y();
2449
- }, d = () => {
2450
- Y();
2489
+ const d = (m) => {
2490
+ const v = m.target;
2491
+ v && st.value?.contains(v) || X();
2492
+ }, i = () => {
2493
+ X();
2451
2494
  };
2452
- window.addEventListener("mousedown", u, !0), window.addEventListener("blur", d), a(() => {
2453
- window.removeEventListener("mousedown", u, !0), window.removeEventListener("blur", d);
2495
+ window.addEventListener("mousedown", d, !0), window.addEventListener("blur", i), u(() => {
2496
+ window.removeEventListener("mousedown", d, !0), window.removeEventListener("blur", i);
2454
2497
  });
2455
2498
  }
2456
2499
  );
2457
- const an = m(() => ({
2458
- ...De.value,
2500
+ const dt = w(() => ({
2501
+ ...He.value,
2459
2502
  columns: {
2460
- ...De.value.columns,
2503
+ ...He.value.columns,
2461
2504
  columnMenuEnabled: e.columnMenu.enabled,
2462
2505
  columnMenuMaxFilterValues: e.columnMenu.maxFilterValues,
2463
- resolveColumnMenuItems: Q,
2464
- resolveColumnMenuDisabledItems: Ge,
2465
- resolveColumnMenuDisabledReasons: Pe,
2466
- resolveColumnMenuLabels: ae,
2467
- resolveColumnMenuActionOptions: Le,
2468
- isColumnFilterActive: Be,
2469
- isColumnGrouped: Re,
2470
- resolveColumnGroupOrder: X,
2471
- resolveColumnMenuSortDirection: $e,
2472
- resolveColumnMenuSelectedTokens: _e,
2473
- applyColumnMenuSort: Ue,
2474
- applyColumnMenuPin: qe,
2475
- applyColumnMenuGroupBy: Xe,
2476
- applyColumnMenuFilter: Ye,
2477
- clearColumnMenuFilter: Ie
2506
+ resolveColumnMenuItems: ye,
2507
+ resolveColumnMenuDisabledItems: Le,
2508
+ resolveColumnMenuDisabledReasons: We,
2509
+ resolveColumnMenuLabels: Ne,
2510
+ resolveColumnMenuActionOptions: Z,
2511
+ isColumnFilterActive: Ge,
2512
+ isColumnGrouped: Ke,
2513
+ resolveColumnGroupOrder: Re,
2514
+ resolveColumnMenuSortDirection: Me,
2515
+ resolveColumnMenuSelectedTokens: Pe,
2516
+ applyColumnMenuSort: U,
2517
+ applyColumnMenuPin: q,
2518
+ applyColumnMenuGroupBy: Je,
2519
+ applyColumnMenuFilter: Ze,
2520
+ clearColumnMenuFilter: pe
2478
2521
  },
2479
2522
  rows: {
2480
- ...De.value.rows,
2523
+ ...He.value.rows,
2481
2524
  sourceRows: e.rows,
2482
2525
  rowHover: e.rowHover,
2483
2526
  stripedRows: e.stripedRows
2484
2527
  }
2485
- })), sn = m(() => {
2528
+ })), sn = w(() => {
2486
2529
  const t = [];
2487
2530
  return e.columnLayout.enabled && t.push({
2488
2531
  key: "column-layout",
2489
2532
  component: _l,
2490
2533
  props: {
2491
- isOpen: ze.value,
2492
- items: pt.value,
2534
+ isOpen: vt.value,
2535
+ items: je.value,
2493
2536
  buttonLabel: e.columnLayout.buttonLabel,
2494
2537
  active: !1,
2495
- onOpen: Mt,
2496
- onToggleVisibility: Ot,
2497
- onMoveUp: xt,
2498
- onMoveDown: At,
2499
- onApply: It,
2500
- onCancel: H
2538
+ onOpen: ht,
2539
+ onToggleVisibility: H,
2540
+ onMoveUp: bt,
2541
+ onMoveDown: yt,
2542
+ onApply: Be,
2543
+ onCancel: N
2501
2544
  }
2502
2545
  }), e.advancedFilter.enabled && t.push({
2503
2546
  key: "advanced-filter",
2504
2547
  component: Gl,
2505
2548
  props: {
2506
- isOpen: Ft.value,
2507
- clauses: Dt.value,
2508
- columns: g.value,
2509
- appliedFilterSummaryItems: Se.value,
2510
- hasAnyFilters: We.value,
2549
+ isOpen: Rt.value,
2550
+ clauses: St.value,
2551
+ columns: h.value,
2552
+ appliedFilterSummaryItems: Q.value,
2553
+ hasAnyFilters: Se.value,
2511
2554
  buttonLabel: e.advancedFilter.buttonLabel,
2512
- active: We.value,
2513
- onOpen: Et,
2514
- onAdd: kt,
2515
- onRemove: Ht,
2516
- onUpdateClause: V,
2517
- onApply: zt,
2518
- onCancel: Vt,
2519
- onResetAll: jt
2555
+ active: Se.value,
2556
+ onOpen: Mt,
2557
+ onAdd: pt,
2558
+ onRemove: It,
2559
+ onUpdateClause: xt,
2560
+ onApply: Ot,
2561
+ onCancel: At,
2562
+ onResetAll: Dt
2520
2563
  }
2521
2564
  }), e.aggregations.enabled && e.mode !== "pivot" && t.push({
2522
2565
  key: "aggregations",
2523
2566
  component: Pl,
2524
2567
  props: {
2525
- isOpen: q.value,
2526
- basis: ie.value,
2527
- items: je.value,
2568
+ isOpen: D.value,
2569
+ basis: G.value,
2570
+ items: be.value,
2528
2571
  buttonLabel: e.aggregations.buttonLabel,
2529
- active: L.value && (q.value || !!re.value?.columns.length),
2530
- disabled: !L.value,
2531
- disabledReason: L.value ? "" : "Aggregations require an active group-by model.",
2532
- onOpen: Gt,
2533
- onUpdateBasis: Ne,
2534
- onToggleColumn: ee,
2535
- onUpdateOp: te,
2536
- onClear: Pt,
2537
- onApply: Lt,
2538
- onCancel: Me
2572
+ active: ie.value && (D.value || !!ae.value?.columns.length),
2573
+ disabled: !ie.value,
2574
+ disabledReason: ie.value ? "" : "Aggregations require an active group-by model.",
2575
+ onOpen: Ht,
2576
+ onUpdateBasis: Vt,
2577
+ onToggleColumn: zt,
2578
+ onUpdateOp: Ye,
2579
+ onClear: Xe,
2580
+ onApply: Tt,
2581
+ onCancel: se
2539
2582
  }
2540
2583
  }), [...t, ...e.toolbarModules];
2541
2584
  });
2542
2585
  return () => k("div", {
2543
- class: "datagrid-app-layout"
2586
+ class: [
2587
+ "datagrid-app-layout",
2588
+ e.layoutMode === "auto-height" ? "datagrid-app-layout--auto-height" : "datagrid-app-layout--fill"
2589
+ ]
2544
2590
  }, [
2545
2591
  k(dl, {
2546
2592
  modules: sn.value
2547
2593
  }),
2548
2594
  k("div", {
2549
- class: "datagrid-app-workspace"
2595
+ class: [
2596
+ "datagrid-app-workspace",
2597
+ e.layoutMode === "auto-height" ? "datagrid-app-workspace--auto-height" : "datagrid-app-workspace--fill"
2598
+ ]
2550
2599
  }, [
2551
2600
  k("div", {
2552
- class: "datagrid-app-stage",
2553
- ref: ne
2601
+ class: [
2602
+ "datagrid-app-stage",
2603
+ e.layoutMode === "auto-height" ? "datagrid-app-stage--auto-height" : "datagrid-app-stage--fill"
2604
+ ],
2605
+ ref: ee
2554
2606
  }, [
2555
2607
  e.viewMode === "gantt" ? k(Ll, {
2556
- stageContext: ft,
2608
+ stageContext: at,
2557
2609
  runtime: e.runtime,
2558
2610
  gantt: e.gantt,
2559
2611
  baseRowHeight: x.value,
2560
2612
  rowVersion: o.value
2561
2613
  }) : k(cl, {
2562
- ...an.value,
2563
- stageContext: ft,
2564
- onViewportContextMenu: vt
2614
+ ...dt.value,
2615
+ stageContext: at,
2616
+ onViewportContextMenu: rn
2565
2617
  }),
2566
- B.value.visible && ke.value.length > 0 ? k("div", {
2567
- ref: gt,
2618
+ z.value.visible && ut.value.length > 0 ? k("div", {
2619
+ ref: st,
2568
2620
  class: "datagrid-context-menu",
2569
2621
  style: Qt.value,
2570
2622
  role: "menu",
@@ -2576,7 +2628,7 @@ const no = {
2576
2628
  }
2577
2629
  });
2578
2630
  }
2579
- }, ke.value.flatMap((t) => {
2631
+ }, ut.value.flatMap((t) => {
2580
2632
  const n = [];
2581
2633
  return t.separatorBefore && n.push(k("div", {
2582
2634
  class: "datagrid-context-menu__separator",
@@ -2588,7 +2640,7 @@ const no = {
2588
2640
  disabled: t.disabled,
2589
2641
  title: t.title,
2590
2642
  onClick: () => {
2591
- O(t.id);
2643
+ ct(t.id);
2592
2644
  }
2593
2645
  }, t.label)), n;
2594
2646
  })) : null
@@ -2647,11 +2699,11 @@ function co(e, o) {
2647
2699
  r.set(l.name, l);
2648
2700
  return Array.from(r.values());
2649
2701
  }
2650
- function po(e) {
2702
+ function Mo(e) {
2651
2703
  return so(e);
2652
2704
  }
2653
- function Mo(e) {
2654
- const o = ro(e.clientRowModelOptions), r = e.enterpriseClientRowModelOptions, l = uo(e.columns), s = e.formulas !== void 0, i = e.computedFields !== void 0, w = e.formulaFunctions !== void 0, C = l.length > 0, b = s || C ? co(l, e.formulas) : void 0, A = i ? ao(e.computedFields) : void 0, v = w ? e.formulaFunctions ?? {} : void 0, R = !!(C || s || i || w);
2705
+ function po(e) {
2706
+ const o = ro(e.clientRowModelOptions), r = e.enterpriseClientRowModelOptions, l = uo(e.columns), s = e.formulas !== void 0, a = e.computedFields !== void 0, f = e.formulaFunctions !== void 0, C = l.length > 0, y = s || C ? co(l, e.formulas) : void 0, A = a ? ao(e.computedFields) : void 0, b = f ? e.formulaFunctions ?? {} : void 0, R = !!(C || s || a || f);
2655
2707
  if (!o && !R)
2656
2708
  return r ? {
2657
2709
  ...r
@@ -2662,26 +2714,26 @@ function Mo(e) {
2662
2714
  if (!o && r)
2663
2715
  return r;
2664
2716
  if (o && r) {
2665
- let y = xn.get(o);
2666
- y || (y = /* @__PURE__ */ new WeakMap(), xn.set(o, y));
2667
- const g = y.get(r);
2668
- if (g)
2669
- return g;
2670
- const f = {
2717
+ let S = xn.get(o);
2718
+ S || (S = /* @__PURE__ */ new WeakMap(), xn.set(o, S));
2719
+ const h = S.get(r);
2720
+ if (h)
2721
+ return h;
2722
+ const g = {
2671
2723
  ...o,
2672
2724
  ...r
2673
2725
  };
2674
- return y.set(
2726
+ return S.set(
2675
2727
  r,
2676
- f
2677
- ), f;
2728
+ g
2729
+ ), g;
2678
2730
  }
2679
2731
  }
2680
2732
  return {
2681
2733
  ...o ?? {},
2682
- ...i ? { initialComputedFields: A } : {},
2683
- ...s || C ? { initialFormulaFields: b } : {},
2684
- ...w ? { initialFormulaFunctionRegistry: v } : {},
2734
+ ...a ? { initialComputedFields: A } : {},
2735
+ ...s || C ? { initialFormulaFields: y } : {},
2736
+ ...f ? { initialFormulaFunctionRegistry: b } : {},
2685
2737
  ...r?.computeMode ? { computeMode: r.computeMode } : {},
2686
2738
  ...r?.workerPatchDispatchThreshold !== void 0 ? { workerPatchDispatchThreshold: r.workerPatchDispatchThreshold } : {},
2687
2739
  ...r?.formulaColumnCacheMaxColumns !== void 0 ? { formulaColumnCacheMaxColumns: r.formulaColumnCacheMaxColumns } : {}
@@ -2705,45 +2757,45 @@ function On(e) {
2705
2757
  };
2706
2758
  }
2707
2759
  function Io(e) {
2708
- const o = W(0), r = un(), l = _n(
2760
+ const o = P(0), r = un(), l = _n(
2709
2761
  e.rowModel.value ? null : un({
2710
2762
  rows: e.rows.value,
2711
2763
  ...On(e.clientRowModelOptions.value)
2712
2764
  })
2713
2765
  ), s = (C) => {
2714
2766
  !C || C === e.rowModel.value || "dispose" in C && typeof C.dispose == "function" && C.dispose();
2715
- }, i = () => {
2767
+ }, a = () => {
2716
2768
  e.rowModel.value || (s(l.value), l.value = un({
2717
2769
  rows: e.rows.value,
2718
2770
  ...On(e.clientRowModelOptions.value)
2719
2771
  }), o.value += 1, e.onOwnedRowModelRecreated?.());
2720
- }, w = m(() => e.rowModel.value ?? l.value ?? r);
2721
- return K(
2772
+ }, f = w(() => e.rowModel.value ?? l.value ?? r);
2773
+ return L(
2722
2774
  e.rows,
2723
2775
  (C) => {
2724
2776
  l.value && l.value.setRows(C);
2725
2777
  },
2726
2778
  { deep: !1 }
2727
- ), K(
2779
+ ), L(
2728
2780
  e.clientRowModelOptions,
2729
2781
  () => {
2730
- i();
2782
+ a();
2731
2783
  },
2732
2784
  { deep: !0 }
2733
- ), K(
2785
+ ), L(
2734
2786
  e.rowModel,
2735
2787
  (C) => {
2736
2788
  if (C) {
2737
2789
  s(l.value), l.value = null, o.value += 1;
2738
2790
  return;
2739
2791
  }
2740
- l.value || i();
2792
+ l.value || a();
2741
2793
  }
2742
2794
  ), En(() => {
2743
2795
  s(l.value), s(r);
2744
2796
  }), {
2745
2797
  dataGridInstanceKey: o,
2746
- resolvedRowModel: w,
2798
+ resolvedRowModel: f,
2747
2799
  disposeOwnedRowModel: s
2748
2800
  };
2749
2801
  }
@@ -2752,10 +2804,10 @@ export {
2752
2804
  dl as a,
2753
2805
  Il as b,
2754
2806
  Bl as c,
2755
- ho as d,
2756
- Ro as e,
2757
- yo as f,
2758
- po as g,
2759
- Mo as r,
2807
+ bo as d,
2808
+ yo as e,
2809
+ Ro as f,
2810
+ Mo as g,
2811
+ po as r,
2760
2812
  Io as u
2761
2813
  };