@progress/kendo-vue-grid 8.1.0-develop.5 → 8.1.0-develop.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/Grid.d.ts +32 -17
  2. package/Grid.js +1 -1
  3. package/Grid.mjs +568 -449
  4. package/GridState.d.ts +17 -1
  5. package/GridState.js +1 -1
  6. package/GridState.mjs +84 -71
  7. package/RootGrid.d.ts +29 -0
  8. package/RootGrid.js +1 -1
  9. package/RootGrid.mjs +23 -8
  10. package/cells/GridCell.d.ts +2 -0
  11. package/cells/GridCell.js +1 -1
  12. package/cells/GridCell.mjs +35 -30
  13. package/cells/GridDetailCell.js +1 -1
  14. package/cells/GridDetailCell.mjs +20 -20
  15. package/cells/GridFilterCell.js +1 -1
  16. package/cells/GridFilterCell.mjs +42 -37
  17. package/cells/GridGroupCell.d.ts +2 -0
  18. package/cells/GridGroupCell.js +1 -1
  19. package/cells/GridGroupCell.mjs +69 -55
  20. package/cells/GridHierarchyCell.d.ts +2 -0
  21. package/cells/GridHierarchyCell.js +1 -1
  22. package/cells/GridHierarchyCell.mjs +51 -41
  23. package/cells/GridSelectionCell.d.ts +2 -0
  24. package/cells/GridSelectionCell.js +1 -1
  25. package/cells/GridSelectionCell.mjs +35 -24
  26. package/cells/pincell/GridPinCell.d.ts +72 -0
  27. package/cells/pincell/GridPinCell.js +8 -0
  28. package/cells/pincell/GridPinCell.mjs +111 -0
  29. package/cells/pincell/GridPinDropdownButton.d.ts +27 -0
  30. package/cells/pincell/GridPinDropdownButton.js +8 -0
  31. package/cells/pincell/GridPinDropdownButton.mjs +111 -0
  32. package/common.d.ts +6 -0
  33. package/common.js +1 -1
  34. package/common.mjs +8 -2
  35. package/components/PinnedRowsTable.d.ts +62 -0
  36. package/components/PinnedRowsTable.js +8 -0
  37. package/components/PinnedRowsTable.mjs +135 -0
  38. package/components/StickyGroupTable.d.ts +0 -1
  39. package/components/StickyGroupTable.js +1 -1
  40. package/components/StickyGroupTable.mjs +24 -30
  41. package/constants/main.d.ts +15 -0
  42. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  43. package/drag/ColumnResize.d.ts +2 -0
  44. package/drag/ColumnResize.js +1 -1
  45. package/drag/ColumnResize.mjs +139 -123
  46. package/footer/FooterCell.js +1 -1
  47. package/footer/FooterCell.mjs +22 -20
  48. package/getRowContents.js +1 -1
  49. package/getRowContents.mjs +50 -48
  50. package/header/FilterRow.d.ts +4 -0
  51. package/header/FilterRow.js +1 -1
  52. package/header/FilterRow.mjs +52 -50
  53. package/header/HeaderRow.d.ts +4 -0
  54. package/header/HeaderRow.js +1 -1
  55. package/header/HeaderRow.mjs +114 -105
  56. package/index.js +1 -1
  57. package/index.mjs +15 -14
  58. package/interfaces/ColumnType.d.ts +1 -1
  59. package/interfaces/GridCellProps.d.ts +5 -0
  60. package/interfaces/GridCellsSettings.d.ts +23 -0
  61. package/interfaces/GridColumnProps.d.ts +2 -2
  62. package/interfaces/GridProps.d.ts +102 -31
  63. package/interfaces/GridRowProps.d.ts +13 -4
  64. package/interfaces/GridRowsSettings.d.ts +48 -0
  65. package/interfaces/events.d.ts +19 -2
  66. package/messages/main.d.ts +30 -0
  67. package/messages/main.js +2 -2
  68. package/messages/main.mjs +108 -96
  69. package/package-metadata.js +1 -1
  70. package/package-metadata.mjs +2 -2
  71. package/package.json +13 -12
  72. package/rows/GridRow.d.ts +6 -10
  73. package/rows/GridRow.js +1 -1
  74. package/rows/GridRow.mjs +31 -26
  75. package/utils/main.d.ts +5 -0
  76. package/utils/main.js +1 -1
  77. package/utils/main.mjs +199 -167
  78. package/utils/virtualColumns.js +1 -1
  79. package/utils/virtualColumns.mjs +121 -105
package/utils/main.mjs CHANGED
@@ -5,72 +5,72 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { findGroupExpand as T, updateLeft as O, updateRight as k, tableKeyboardNavigationTools as R } from "@progress/kendo-vue-data-tools";
9
- import { getter as E, canUseDOM as b } from "@progress/kendo-vue-common";
10
- import { gridDefaultProps as M } from "../GridColumn.mjs";
11
- const y = "string";
8
+ import { findGroupExpand as H, updateLeft as T, updateRight as O, tableKeyboardNavigationTools as R } from "@progress/kendo-vue-data-tools";
9
+ import { getter as E, canUseDOM as F } from "@progress/kendo-vue-common";
10
+ import { gridDefaultProps as b } from "../GridColumn.mjs";
11
+ const S = "string";
12
12
  function v(e, t) {
13
- const n = e.split(".");
14
- let r = t;
15
- return n.forEach((a) => {
16
- r = r ? r[a] : void 0;
17
- }), r;
13
+ const r = e.split(".");
14
+ let n = t;
15
+ return r.forEach((a) => {
16
+ n = n ? n[a] : void 0;
17
+ }), n;
18
18
  }
19
- function L(e, t, n, r, a, s, i, o, d, h, p = 0, f) {
20
- let c = p;
21
- for (let g = 0; g < t.length; g++) {
22
- let l;
23
- if (!a || t[g].value === void 0 || t[g].items === void 0) {
24
- const C = d ? !!(s != null && s[E(d)(t[g])]) : !1;
19
+ function k(e, t, r, n, a, d, i, o, h, f, g = 0, l) {
20
+ let c = g;
21
+ for (let p = 0; p < t.length; p++) {
22
+ let s;
23
+ if (!a || t[p].value === void 0 || t[p].items === void 0) {
24
+ const w = h ? !!(d != null && d[E(h)(t[p])]) : !1;
25
25
  e[e.length] = {
26
- dataIndex: r.index,
27
- dataItem: t[g],
26
+ dataIndex: n.index,
27
+ dataItem: t[p],
28
28
  rowType: "data",
29
- level: p,
30
- group: f,
29
+ level: g,
30
+ group: l,
31
31
  // This is related to detail-row expansion
32
- expanded: h !== void 0 ? v(h, t[g]) : C != null ? C : !1
33
- }, r.index++;
32
+ expanded: f !== void 0 ? v(f, t[p]) : w != null ? w : !1
33
+ }, n.index++;
34
34
  continue;
35
35
  } else {
36
- let C;
37
- f != null && f.parents ? C = [{ field: f.field, value: f.value }, ...f.parents] : f ? C = [f] : C = [], l = {
38
- field: t[g].field,
39
- value: t[g].value,
40
- parents: C
36
+ let w;
37
+ l != null && l.parents ? w = [{ field: l.field, value: l.value }, ...l.parents] : l ? w = [l] : w = [], s = {
38
+ field: t[p].field,
39
+ value: t[p].value,
40
+ parents: w
41
41
  };
42
42
  }
43
- c = Math.max(c, p + 1);
43
+ c = Math.max(c, g + 1);
44
44
  let x = !1;
45
- const u = T(i || [], l);
46
- h ? x = h === void 0 || v(h, t[g]) === void 0 || v(h, t[g]) : x = u ? u.expanded !== !1 : o !== !1, e[e.length] = {
45
+ const u = H(i || [], s);
46
+ f ? x = f === void 0 || v(f, t[p]) === void 0 || v(f, t[p]) : x = u ? u.expanded !== !1 : o !== !1, e[e.length] = {
47
47
  dataIndex: -1,
48
- dataItem: t[g],
49
- level: p,
50
- group: l,
48
+ dataItem: t[p],
49
+ level: g,
50
+ group: s,
51
51
  rowType: "groupHeader",
52
52
  expanded: x
53
- }, x && (l.expanded = x, c = Math.max(
54
- L(
53
+ }, x && (s.expanded = x, c = Math.max(
54
+ k(
55
55
  e,
56
- t[g].items,
57
- n,
56
+ t[p].items,
58
57
  r,
58
+ n,
59
59
  a,
60
- s,
60
+ d,
61
61
  i,
62
62
  o,
63
- d,
64
63
  h,
65
- p + 1,
66
- l
64
+ f,
65
+ g + 1,
66
+ s
67
67
  ),
68
68
  c
69
- )), (n === "always" || x && n === "visible") && (e[e.length] = {
69
+ )), (r === "always" || x && r === "visible") && (e[e.length] = {
70
70
  dataIndex: -1,
71
- dataItem: t[g],
71
+ dataItem: t[p],
72
72
  rowType: "groupFooter",
73
- level: p,
73
+ level: g,
74
74
  expanded: x
75
75
  });
76
76
  }
@@ -80,14 +80,14 @@ function W(e) {
80
80
  return e && getComputedStyle(e).direction === "rtl" || !1;
81
81
  }
82
82
  function X(e, t) {
83
- if (!t || !e || !e.originalEvent || !b)
83
+ if (!t || !e || !e.originalEvent || !F)
84
84
  return -1;
85
- let n = document.elementFromPoint(e.clientX, e.originalEvent.clientY);
86
- for (; n && n.parentElement !== t; )
87
- n = n.parentElement;
88
- const r = t.children;
89
- for (let a = 0; a < r.length; a++)
90
- if (r[a] === n)
85
+ let r = document.elementFromPoint(e.clientX, e.originalEvent.clientY);
86
+ for (; r && r.parentElement !== t; )
87
+ r = r.parentElement;
88
+ const n = t.children;
89
+ for (let a = 0; a < n.length; a++)
90
+ if (n[a] === r)
91
91
  return a;
92
92
  return -1;
93
93
  }
@@ -104,82 +104,82 @@ const A = [
104
104
  "dataStateChange",
105
105
  "columnResize",
106
106
  "columnReorder"
107
- ], N = (e, t) => `The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;
107
+ ], L = (e, t) => `The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;
108
108
  function Y(e) {
109
109
  for (let t = 0; t < A.length; t++) {
110
- const n = A[t];
111
- if (e[n] !== void 0) {
112
- const r = "on" + n.charAt(0).toUpperCase() + n.slice(1);
113
- console.warn(N(n, r));
110
+ const r = A[t];
111
+ if (e[r] !== void 0) {
112
+ const n = "on" + r.charAt(0).toUpperCase() + r.slice(1);
113
+ console.warn(L(r, n));
114
114
  }
115
115
  }
116
116
  }
117
- function m(e, t) {
118
- const n = [[]];
119
- let r = 0;
117
+ function J(e, t) {
118
+ const r = [[]];
119
+ let n = 0;
120
120
  for (let i = e.length - 1; i >= 0; i--)
121
- r = Math.max(r, e[i].depth), e[i].headerColSpan = e[i].headerColSpan || 1, e[i].children.length > 0 && (e[i].headerColSpan = e[i].children.reduce(
122
- (o, d) => d.hidden ? o : o + d.headerColSpan,
121
+ n = Math.max(n, e[i].depth), e[i].headerColSpan = e[i].headerColSpan || 1, e[i].children.length > 0 && (e[i].headerColSpan = e[i].children.reduce(
122
+ (o, h) => h.hidden ? o : o + h.headerColSpan,
123
123
  0
124
124
  ));
125
125
  const a = [];
126
- let s = 1;
126
+ let d = 1;
127
127
  return e.forEach((i, o) => {
128
- n[i.depth] = n[i.depth] || [];
129
- let d = !1;
130
- n[i.depth].length === 0 && (s <= 1 ? s = 1 + (i.children.length > 0 ? 0 : r - i.depth) : (s--, d = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : r - i.depth), i.kFirst = d, i.index = n[i.depth].length, i.ariaColumnIndex = a[i.depth] ? a[i.depth] + 1 : 1;
131
- let h = 0;
132
- const p = [], f = /* @__PURE__ */ new Set();
128
+ r[i.depth] = r[i.depth] || [];
129
+ let h = !1;
130
+ r[i.depth].length === 0 && (d <= 1 ? d = 1 + (i.children.length > 0 ? 0 : n - i.depth) : (d--, h = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : n - i.depth), i.kFirst = h, i.index = r[i.depth].length, i.ariaColumnIndex = a[i.depth] ? a[i.depth] + 1 : 1;
131
+ let f = 0;
132
+ const g = [], l = /* @__PURE__ */ new Set();
133
133
  let c = i.parentIndex;
134
- for (; c >= 0 && !f.has(c); )
135
- f.add(c), p.unshift(c), c = e[c].parentIndex;
136
- for (let l = 0; l < p.length; l++) {
137
- const x = p[l], u = e[x], C = n[u.depth], S = C.indexOf(x);
138
- for (let w = 0; w < S; w++) {
139
- const I = C[w];
140
- h += e[I].headerColSpan;
134
+ for (; c >= 0 && !l.has(c); )
135
+ l.add(c), g.unshift(c), c = e[c].parentIndex;
136
+ for (let s = 0; s < g.length; s++) {
137
+ const x = g[s], u = e[x], w = r[u.depth], y = w.indexOf(x);
138
+ for (let I = 0; I < y; I++) {
139
+ const C = w[I];
140
+ f += e[C].headerColSpan;
141
141
  }
142
142
  }
143
- for (let l = 0; l < i.depth; l++) {
144
- const x = n[l] || [], C = (n[i.depth] || []).indexOf(o);
145
- let S = 0;
146
- for (const w of x) {
147
- const I = e[w];
148
- S < C && I.depth + I.rowSpan - 1 >= i.depth && (p.includes(w) || (h += I.headerColSpan)), S += I.headerColSpan;
143
+ for (let s = 0; s < i.depth; s++) {
144
+ const x = r[s] || [], w = (r[i.depth] || []).indexOf(o);
145
+ let y = 0;
146
+ for (const I of x) {
147
+ const C = e[I];
148
+ y < w && C.depth + C.rowSpan - 1 >= i.depth && (g.includes(I) || (f += C.headerColSpan)), y += C.headerColSpan;
149
149
  }
150
150
  }
151
- const g = n[i.depth];
152
- for (const l of g) {
153
- const x = e[l];
154
- x.parentIndex === i.parentIndex && (h += x.headerColSpan);
151
+ const p = r[i.depth];
152
+ for (const s of p) {
153
+ const x = e[s];
154
+ x.parentIndex === i.parentIndex && (f += x.headerColSpan);
155
155
  }
156
- i.virtualColumnOffset = h, n[i.depth].push(o);
157
- for (let l = i.depth; l < i.depth + i.rowSpan; l++)
158
- a[l] = (a[l] || 0) + i.headerColSpan;
159
- }), O(n, e, t), k(n, e, t), n;
156
+ i.virtualColumnOffset = f, r[i.depth].push(o);
157
+ for (let s = i.depth; s < i.depth + i.rowSpan; s++)
158
+ a[s] = (a[s] || 0) + i.headerColSpan;
159
+ }), T(r, e, t), O(r, e, t), r;
160
160
  }
161
- function H(e, t, n, r = 0, a = !1) {
162
- const s = [];
161
+ function N(e, t, r, n = 0, a = !1) {
162
+ const d = [];
163
163
  if (!e)
164
164
  return [];
165
- e && e.length === void 0 && (e = [e]), e.forEach((o, d) => {
165
+ e && e.length === void 0 && (e = [e]), e.forEach((o, h) => {
166
166
  o = o;
167
- const h = o.id ? o.id : R.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"), p = b && o.media && window.matchMedia ? !window.matchMedia(o.media).matches : !1, f = a || p || o.hidden, c = t == null ? void 0 : t.find((l) => l.id === h), g = H(o.children, (c == null ? void 0 : c.children) || [], n, r + 1, f);
168
- s.push(
167
+ const f = o.id ? o.id : R.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), g = F && o.media && window.matchMedia ? !window.matchMedia(o.media).matches : !1, l = a || g || o.hidden, c = t == null ? void 0 : t.find((s) => s.id === f), p = N(o.children, (c == null ? void 0 : c.children) || [], r, n + 1, l);
168
+ d.push(
169
169
  {
170
- depth: r,
171
- ...M,
172
- ...g.length ? { cell: () => null, filterCell: () => null } : {},
170
+ depth: n,
171
+ ...b,
172
+ ...p.length ? { cell: () => null, filterCell: () => null } : {},
173
173
  ...o,
174
- id: h,
175
- declarationIndex: s.length,
176
- children: g,
174
+ id: f,
175
+ declarationIndex: d.length,
176
+ children: p,
177
177
  headerColSpan: 0,
178
178
  rowSpan: 0,
179
179
  columnType: o.columnType || "data",
180
180
  colSpan: o.colSpan || 1,
181
181
  isAccessible: !0,
182
- hidden: f,
182
+ hidden: l,
183
183
  left: null,
184
184
  right: null,
185
185
  rowSpannable: o.rowSpannable,
@@ -187,27 +187,27 @@ function H(e, t, n, r = 0, a = !1) {
187
187
  }
188
188
  );
189
189
  });
190
- const i = (o, d) => o.orderIndex === d.orderIndex ? o.declarationIndex - d.declarationIndex : (o.orderIndex || 0) - (d.orderIndex || 0);
191
- if (s.sort(i), r === 0) {
192
- const o = [], d = (h, p) => h.forEach((f) => {
193
- f.parentIndex = p, d(f.children, o.push(f) - 1);
190
+ const i = (o, h) => o.orderIndex === h.orderIndex ? o.declarationIndex - h.declarationIndex : (o.orderIndex || 0) - (h.orderIndex || 0);
191
+ if (d.sort(i), n === 0) {
192
+ const o = [], h = (f, g) => f.forEach((l) => {
193
+ l.parentIndex = g, h(l.children, o.push(l) - 1);
194
194
  });
195
- return d(s, -1), o;
195
+ return h(d, -1), o;
196
196
  }
197
- return s;
197
+ return d;
198
198
  }
199
199
  const j = (e) => Array.isArray(e) ? e : e ? e.data : [];
200
- function J(e, t, n, r) {
201
- const a = j(e), s = [];
200
+ function Q(e, t, r, n) {
201
+ const a = j(e), d = [];
202
202
  if (a.length > 0) {
203
203
  let i = a[0];
204
204
  if (t)
205
- for (let d = 0; d < t.length; d++)
205
+ for (let h = 0; h < t.length; h++)
206
206
  i = i.items && i.items[0];
207
- Object.getOwnPropertyNames(i).forEach((d) => {
208
- d !== n.column && s.push(
207
+ Object.getOwnPropertyNames(i).forEach((h) => {
208
+ h !== r.column && d.push(
209
209
  {
210
- id: R.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"),
210
+ id: R.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"),
211
211
  declarationIndex: -1,
212
212
  parentIndex: -1,
213
213
  depth: 0,
@@ -222,103 +222,135 @@ function J(e, t, n, r) {
222
222
  children: [],
223
223
  ariaColumnIndex: 0,
224
224
  isAccessible: !0,
225
- ...M,
226
- field: d
225
+ ...b,
226
+ field: h
227
227
  }
228
228
  );
229
229
  });
230
230
  }
231
- return s;
231
+ return d;
232
232
  }
233
233
  const $ = (e, t) => {
234
- var r;
235
- let n = e[t.parentIndex];
236
- for (; n; ) {
237
- if (n.footerCell || (r = n.cells) != null && r.footerCell)
234
+ var n;
235
+ let r = e[t.parentIndex];
236
+ for (; r; ) {
237
+ if (r.footerCell || (n = r.cells) != null && n.footerCell)
238
238
  return !0;
239
- n = e[n.parentIndex];
239
+ r = e[r.parentIndex];
240
240
  }
241
241
  return !1;
242
- }, Q = (e) => e.filter((t) => {
243
- var n;
244
- return $(e, t) ? !1 : !!(t.footerCell || (n = t.cells) != null && n.footerCell) || !(t.children && t.children.length > 0);
245
- }), Z = {
246
- number: function(e, t, n) {
247
- return typeof e === y && e.toLowerCase() === "null" ? null : t.parseNumber(e, n);
242
+ }, Z = (e) => e.filter((t) => {
243
+ var r;
244
+ return $(e, t) ? !1 : !!(t.footerCell || (r = t.cells) != null && r.footerCell) || !(t.children && t.children.length > 0);
245
+ }), _ = {
246
+ number: function(e, t, r) {
247
+ return typeof e === S && e.toLowerCase() === "null" ? null : t.parseNumber(e, r);
248
248
  },
249
- date: function(e, t, n) {
250
- return typeof e === y && e.toLowerCase() === "null" ? null : t.parseDate(e, n);
249
+ date: function(e, t, r) {
250
+ return typeof e === S && e.toLowerCase() === "null" ? null : t.parseDate(e, r);
251
251
  },
252
252
  boolean: function(e) {
253
- return typeof e === y ? e.toLowerCase() === "null" ? null : e.toLowerCase() === "true" : e != null ? !!e : e;
253
+ return typeof e === S ? e.toLowerCase() === "null" ? null : e.toLowerCase() === "true" : e != null ? !!e : e;
254
254
  },
255
255
  string: function(e) {
256
- return typeof e === y && e.toLowerCase() === "null" ? null : e != null ? e + "" : e;
256
+ return typeof e === S && e.toLowerCase() === "null" ? null : e != null ? e + "" : e;
257
257
  },
258
258
  default: function(e) {
259
259
  return e;
260
260
  }
261
261
  };
262
- function D(e, t, n, r) {
262
+ function M(e, t, r, n) {
263
263
  return e.forEach((a) => {
264
- a.expanded = t[r] && !t[r].includes(F(a, n)), a.items && a.items.length && (a.items = D(a.items, t, n, r + 1));
264
+ a.expanded = t[n] && !t[n].includes(D(a, r)), a.items && a.items.length && (a.items = M(a.items, t, r, n + 1));
265
265
  }), e;
266
266
  }
267
- function _(e, t, n) {
268
- return t && t.length && e.data.forEach((r) => {
269
- r.expanded = r.expanded !== void 0 ? r.expanded : t[0] && !t[0].includes(F(r, n)), r.items && r.items.length && (r.items = D(r.items, t, n, 1));
267
+ function q(e, t, r) {
268
+ return t && t.length && e.data.forEach((n) => {
269
+ n.expanded = n.expanded !== void 0 ? n.expanded : t[0] && !t[0].includes(D(n, r)), n.items && n.items.length && (n.items = M(n.items, t, r, 1));
270
270
  }), e;
271
271
  }
272
- function F(e, t) {
273
- let n = e;
274
- for (; n.items && n.items.length; )
275
- n = n.items[0];
276
- return t ? n[t] : e.value;
272
+ function D(e, t) {
273
+ let r = e;
274
+ for (; r.items && r.items.length; )
275
+ r = r.items[0];
276
+ return t ? r[t] : e.value;
277
277
  }
278
- const q = (e) => {
279
- const t = [], n = (r) => r == null ? void 0 : r.forEach((a) => {
280
- t.push(a), n(a.children);
278
+ const G = (e) => {
279
+ const t = [], r = (n) => n == null ? void 0 : n.forEach((a) => {
280
+ t.push(a), r(a.children);
281
281
  });
282
- return n(e), t;
283
- }, G = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), ee = 17895697, te = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, ne = (e, t) => t && t.filter((n) => n.field === e).length > 0, B = (e) => (e.sort((t, n) => t.declarationIndex - n.declarationIndex), e.map((t) => {
284
- const { declarationIndex: n, parentIndex: r, depth: a, headerColSpan: s, rowSpan: i, index: o, kFirst: d, children: h, ...p } = t;
285
- return h.length ? {
286
- children: B(h),
287
- ...p
288
- } : p;
289
- })), re = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1, ie = (e) => {
290
- var r, a;
291
- const t = typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1, n = typeof e == "object" ? (a = e.valueGetter) != null ? a : ((s, i) => E(i)(s)) : (s, i) => E(i)(s);
292
- return { enabled: t, valueGetter: n };
282
+ return r(e), t;
283
+ }, m = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), ee = 17895697, te = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, re = (e, t) => t && t.filter((r) => r.field === e).length > 0, B = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
284
+ const { declarationIndex: r, parentIndex: n, depth: a, headerColSpan: d, rowSpan: i, index: o, kFirst: h, children: f, ...g } = t;
285
+ return f.length ? {
286
+ children: B(f),
287
+ ...g
288
+ } : g;
289
+ })), ne = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1, ie = (e) => {
290
+ var n, a;
291
+ const t = typeof e == "object" ? (n = e.enabled) != null ? n : !0 : e != null ? e : !1, r = typeof e == "object" ? (a = e.valueGetter) != null ? a : ((d, i) => E(i)(d)) : (d, i) => E(i)(d);
292
+ return { enabled: t, valueGetter: r };
293
293
  }, ae = (e) => {
294
294
  let t = 0;
295
295
  if (e) {
296
- const n = e.insertRow(0), r = n.insertCell(0);
297
- r.textContent = "&nbsp;", t = n.getBoundingClientRect().height, e.deleteRow(0);
296
+ const r = e.insertRow(0), n = r.insertCell(0);
297
+ n.textContent = "&nbsp;", t = r.getBoundingClientRect().height, e.deleteRow(0);
298
298
  }
299
299
  return t;
300
+ }, oe = (e, t) => {
301
+ var r, n, a, d, i, o;
302
+ if (!(!e && !t))
303
+ return t ? e ? {
304
+ headerCell: (r = t.headerCell) != null ? r : e.headerCell,
305
+ filterCell: (n = t.filterCell) != null ? n : e.filterCell,
306
+ footerCell: (a = t.footerCell) != null ? a : e.footerCell,
307
+ groupHeader: (d = t.groupHeader) != null ? d : e.groupHeader,
308
+ data: (i = t.data) != null ? i : e.data,
309
+ groupFooter: (o = t.groupFooter) != null ? o : e.groupFooter,
310
+ select: {
311
+ ...e.select || {},
312
+ ...t.select || {}
313
+ },
314
+ hierarchy: {
315
+ ...e.hierarchy || {},
316
+ ...t.hierarchy || {}
317
+ },
318
+ group: {
319
+ ...e.group || {},
320
+ ...t.group || {}
321
+ },
322
+ edit: {
323
+ ...e.edit || {},
324
+ ...t.edit || {}
325
+ },
326
+ pin: {
327
+ ...e.pin || {},
328
+ ...t.pin || {}
329
+ }
330
+ } : t : e;
300
331
  };
301
332
  export {
302
- _ as applyExpandedState,
303
- J as autoGenerateColumns,
333
+ q as applyExpandedState,
334
+ Q as autoGenerateColumns,
304
335
  ae as calcRowHeight,
305
336
  Y as checkPropCompatibility,
306
- G as firefox,
337
+ m as firefox,
307
338
  ee as firefoxMaxHeight,
308
- L as flatData,
309
- Q as footerColumns,
310
- re as getColSpan,
339
+ k as flatData,
340
+ Z as footerColumns,
341
+ ne as getColSpan,
311
342
  te as getColumnWidth,
312
343
  j as getDataAsArray,
313
- q as getFlatColumnsState,
344
+ G as getFlatColumnsState,
314
345
  X as getIndex,
315
346
  v as getNestedValue,
316
347
  ie as getRowSpanOptions,
317
- F as groupedFirstItemValue,
348
+ D as groupedFirstItemValue,
318
349
  W as isRtl,
319
- ne as isSorted,
320
- m as mapColumns,
321
- Z as parsers,
322
- H as readColumns,
350
+ re as isSorted,
351
+ J as mapColumns,
352
+ _ as parsers,
353
+ N as readColumns,
354
+ oe as resolveCells,
323
355
  B as sanitizeColumns
324
356
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function L(a,e,n){let s=0,p=!1;if(n>0&&e)for(let l=0;l<n;l++){const r=e[l]||[];for(let u=0;u<r.length;u++){const h=r[u],S=a[h];(S.rowSpan||1)>n-l&&(s+=S.headerColSpan||1,u===0&&(p=!0))}}return{emptyColSpan:s,skipOffset:p}}function E(a,e){const n=a[e];return!n||n.parentIndex<0?[]:[n.parentIndex,...E(a,n.parentIndex)]}function M(a,e,n){e.forEach(s=>{E(a,s).forEach(l=>n.add(l))})}function w(a,e,n){var p;const s=a[e];((p=s==null?void 0:s.children)==null?void 0:p.length)>0&&s.children.forEach(l=>{let r=typeof l=="number"?l:a.indexOf(l);r>=0&&!n.has(r)&&(n.add(r),w(a,r,n))})}function P(a){const{cellsToRender:e,columns:n,rowIndex:s,enableVirtualization:p,columnsMap:l}=a;if(!p||!e||e.length===0)return{columnsToRender:[],colSpans:[]};const r=[],u=[];let h=-1,S=-1;function I(o,c){let d=-1,i=-1;for(let f=0;f<c.length;f++)o[c[f]].locked||(d===-1&&(d=f),i=f);return{first:d,last:i}}const R=e.reduce((o,c)=>o+c.colSpan,0);let x=[],t=[];const U=n.filter(o=>o.children.length===0),b=new Map;n.forEach((o,c)=>{if(o.children.length===0){const d=U.findIndex(i=>i===o);d>=0&&b.set(d,c)}});const g=new Set;if(e.forEach(o=>{const c=b.get(o.columnIndex);if(c!==void 0){g.add(c);const d=E(n,c);d.forEach(i=>g.add(i)),M(n,d,g),w(n,c,g),d.forEach(i=>{w(n,i,g)})}}),l&&Array.isArray(l)){for(let o=0;o<l.length;o++)x[o]=l[o].filter(c=>g.has(c));t=x[s]||[]}const y=I(n,t);h=y.first,S=y.last;let V=0,O=0,v=!1;return t.forEach((o,c)=>{r.push(o);const d=n[o],i=d.headerColSpan||1;let f;if(h===S)f=R;else if(c===h){const k=d.virtualColumnOffset?d.virtualColumnOffset:0,{emptyColSpan:C,skipOffset:m}=L(n,x,s);O+=C,m&&(O+=k,v=!0),k>0&&!m?f=i+k:f=i}else if(c===S){let k=c===t.length-1;if(l!=null&&l[s]){const C=l[s],m=o;let A=-1;for(let T=C.length-1;T>=0;T--)if(!n[C[T]].locked){A=C[T];break}k=m===A}if(k)f=i;else{const C=R-V-O;if(f=Math.max(C,i),i>C&&u.length>0){const m=i-C;u[0]-=m}}}else f=i;u.push(f),V+=f}),{columnsToRender:r,colSpans:u,skipOffset:v}}function F(a){const{cellModels:e,columns:n=[],tableViewPortWidth:s,scrollLeft:p}=a;let l=0,r=e.length-1,u=0,h=0;for(let t=0;t<e.length;t++)if(!n[e[t].columnIndex].locked&&(u=h,h+=e[t].width||10,h>=p)){l=t;break}for(let t=l;t<e.length;t++)if(!n[e[t].columnIndex].locked)if(u<s+p)u+=e[t].width||10,r=t;else break;l>0&&l--,r<e.length-1&&r++;let S=0,I=0;for(let t=0;t<l;t++)n[e[t].columnIndex].locked||(S+=e[t].colSpan);for(let t=r+1;t<e.length;t++)n[e[t].columnIndex].locked||(I+=e[t].colSpan);e[l].colSpan+=S,e[r].colSpan+=I;const R=e.slice(0,l).filter(t=>n[t.columnIndex].locked),x=e.slice(r+1).filter(t=>n[t.columnIndex].locked);return[...R,...e.slice(l,r+1),...x]}exports.addAllAncestors=M;exports.addDescendants=w;exports.getParentIndices=E;exports.getVirtualCellsToRender=F;exports.getVirtualHeaderCellsToRender=P;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function B(d,n,e){let s=0,p=!1;if(e>0&&n)for(let t=0;t<e;t++){const c=n[t]||[];for(let u=0;u<c.length;u++){const h=c[u],S=d[h];(S.rowSpan||1)>e-t&&(s+=S.headerColSpan||1,u===0&&(p=!0))}}return{emptyColSpan:s,skipOffset:p}}function w(d,n){const e=d[n];return!e||e.parentIndex<0?[]:[e.parentIndex,...w(d,e.parentIndex)]}function L(d,n,e){n.forEach(s=>{w(d,s).forEach(t=>e.add(t))})}function b(d,n,e){var p;const s=d[n];((p=s==null?void 0:s.children)==null?void 0:p.length)>0&&s.children.forEach(t=>{let c=typeof t=="number"?t:d.indexOf(t);c>=0&&!e.has(c)&&(e.add(c),b(d,c,e))})}function j(d){const{cellsToRender:n,columns:e,rowIndex:s,enableVirtualization:p,columnsMap:t}=d;if(!p||!n||n.length===0)return{columnsToRender:[],colSpans:[]};const c=[],u=[];let h=-1,S=-1;function I(o,r){let a=-1,i=-1;for(let f=0;f<r.length;f++)o[r[f]].locked||(a===-1&&(a=f),i=f);return{first:a,last:i}}const E=n.reduce((o,r)=>o+r.colSpan,0);let R=0;for(const o of n){const r=e[o.columnIndex];if(r!=null&&r.locked)R+=o.colSpan;else break}const l=E-R;let V=[],x=[];const P=e.filter(o=>o.children.length===0),A=new Map;e.forEach((o,r)=>{if(o.children.length===0){const a=P.findIndex(i=>i===o);a>=0&&A.set(a,r)}});const k=new Set;if(n.forEach(o=>{const r=A.get(o.columnIndex);if(r!==void 0){k.add(r);const a=w(e,r);a.forEach(i=>k.add(i)),L(e,a,k),b(e,r,k),a.forEach(i=>{b(e,i,k)})}}),t&&Array.isArray(t)){for(let o=0;o<t.length;o++)V[o]=t[o].filter(r=>k.has(r));x=V[s]||[]}const M=I(e,x);h=M.first,S=M.last;let U=0;for(let o=0;o<h;o++){const r=e[x[o]];r!=null&&r.locked&&(U+=r.headerColSpan||1)}let v=0,y=0,F=!1;return x.forEach((o,r)=>{c.push(o);const a=e[o],i=(a==null?void 0:a.headerColSpan)||1;let f;if(h===S)f=l;else if(r===h){const T=a.virtualColumnOffset?a.virtualColumnOffset:0,{emptyColSpan:C,skipOffset:g}=B(e,V,s);y+=C;const m=Math.max(0,T-U);g&&(y+=m,F=!0),m>0&&!g?f=i+m:f=i}else if(r===S){let T=r===x.length-1;if(t!=null&&t[s]){const C=t[s],g=o;let m=-1;for(let O=C.length-1;O>=0;O--)if(!e[C[O]].locked){m=C[O];break}T=g===m}if(T)f=i;else{const C=l-v-y;if(f=Math.max(C,i),i>C&&u.length>0){const g=i-C;u[0]-=g}}}else f=i;u.push(f),v+=f}),{columnsToRender:c,colSpans:u,skipOffset:F}}function D(d){const{cellModels:n,columns:e=[],tableViewPortWidth:s,scrollLeft:p}=d;let t=0,c=n.length-1,u=0,h=0;for(let l=0;l<n.length;l++)if(!e[n[l].columnIndex].locked&&(u=h,h+=n[l].width||10,h>=p)){t=l;break}for(let l=t;l<n.length;l++)if(!e[n[l].columnIndex].locked)if(u<s+p)u+=n[l].width||10,c=l;else break;t>0&&t--,c<n.length-1&&c++;let S=0,I=0;for(let l=0;l<t;l++)e[n[l].columnIndex].locked||(S+=n[l].colSpan);for(let l=c+1;l<n.length;l++)e[n[l].columnIndex].locked||(I+=n[l].colSpan);n[t].colSpan+=S,n[c].colSpan+=I;const E=n.slice(0,t).filter(l=>e[l.columnIndex].locked),R=n.slice(c+1).filter(l=>e[l.columnIndex].locked);return[...E,...n.slice(t,c+1),...R]}exports.addAllAncestors=L;exports.addDescendants=b;exports.getParentIndices=w;exports.getVirtualCellsToRender=D;exports.getVirtualHeaderCellsToRender=j;