@toolbox-web/grid 0.2.5 → 0.2.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.
- package/all.d.ts +486 -80
- package/all.js +1364 -1029
- package/all.js.map +1 -1
- package/index-DG2CZ_Zo.js +3229 -0
- package/index-DG2CZ_Zo.js.map +1 -0
- package/index.d.ts +222 -11
- package/index.js +25 -3143
- package/index.js.map +1 -1
- package/lib/plugins/clipboard/index.js +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/export/index.js +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +184 -149
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +46 -45
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +117 -83
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +140 -82
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +18 -18
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +55 -47
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +385 -351
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js +278 -85
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js +28 -27
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +2 -2
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js +181 -170
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +22 -22
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +12 -12
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +1 -1
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js +1 -1
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/pivot.umd.js +1 -1
- package/umd/plugins/pivot.umd.js.map +1 -1
- package/umd/plugins/reorder.umd.js +1 -1
- package/umd/plugins/reorder.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -1
- package/umd/plugins/tree.umd.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const x = {
|
|
2
2
|
expand: "▶",
|
|
3
3
|
collapse: "▼",
|
|
4
4
|
sortAsc: "▲",
|
|
@@ -8,7 +8,7 @@ const m = {
|
|
|
8
8
|
dragHandle: "⋮⋮",
|
|
9
9
|
toolPanel: "☰"
|
|
10
10
|
};
|
|
11
|
-
class
|
|
11
|
+
class R {
|
|
12
12
|
/** Plugin version - override in subclass if needed */
|
|
13
13
|
version = "1.0.0";
|
|
14
14
|
/** CSS styles to inject into the grid's shadow DOM */
|
|
@@ -99,7 +99,7 @@ class w {
|
|
|
99
99
|
* Use this for rendering that needs to match the grid template.
|
|
100
100
|
*/
|
|
101
101
|
get visibleColumns() {
|
|
102
|
-
return this.grid?.
|
|
102
|
+
return this.grid?._visibleColumns ?? [];
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Get the shadow root of the grid.
|
|
@@ -133,7 +133,7 @@ class w {
|
|
|
133
133
|
*/
|
|
134
134
|
get gridIcons() {
|
|
135
135
|
const e = this.grid?.gridConfig?.icons ?? {};
|
|
136
|
-
return { ...
|
|
136
|
+
return { ...x, ...e };
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Resolve an icon value to string or HTMLElement.
|
|
@@ -164,7 +164,7 @@ class w {
|
|
|
164
164
|
}
|
|
165
165
|
// #endregion
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const y = {
|
|
168
168
|
sum: (n, e) => n.reduce((t, i) => t + (Number(i[e]) || 0), 0),
|
|
169
169
|
avg: (n, e) => {
|
|
170
170
|
const t = n.reduce((i, r) => i + (Number(r[e]) || 0), 0);
|
|
@@ -193,7 +193,7 @@ const b = {
|
|
|
193
193
|
*/
|
|
194
194
|
get(n) {
|
|
195
195
|
if (n !== void 0)
|
|
196
|
-
return typeof n == "function" ? n : _.get(n) ??
|
|
196
|
+
return typeof n == "function" ? n : _.get(n) ?? y[n];
|
|
197
197
|
},
|
|
198
198
|
/**
|
|
199
199
|
* Run an aggregator on a set of rows.
|
|
@@ -206,52 +206,52 @@ const b = {
|
|
|
206
206
|
* Check if an aggregator exists.
|
|
207
207
|
*/
|
|
208
208
|
has(n) {
|
|
209
|
-
return _.has(n) || n in
|
|
209
|
+
return _.has(n) || n in y;
|
|
210
210
|
},
|
|
211
211
|
/**
|
|
212
212
|
* List all available aggregator names.
|
|
213
213
|
*/
|
|
214
214
|
list() {
|
|
215
|
-
return [...Object.keys(
|
|
215
|
+
return [...Object.keys(y), ..._.keys()];
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
f.register.bind(f);
|
|
219
219
|
f.unregister.bind(f);
|
|
220
220
|
f.get.bind(f);
|
|
221
|
-
const
|
|
221
|
+
const w = f.run.bind(f);
|
|
222
222
|
f.list.bind(f);
|
|
223
223
|
function v({ rows: n, config: e, expanded: t }) {
|
|
224
224
|
const i = e.groupOn;
|
|
225
225
|
if (typeof i != "function")
|
|
226
226
|
return [];
|
|
227
227
|
const r = { key: "__root__", value: null, depth: -1, rows: [], children: /* @__PURE__ */ new Map() };
|
|
228
|
-
if (n.forEach((
|
|
229
|
-
let
|
|
230
|
-
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
let p =
|
|
235
|
-
p || (p = { key: g, value: c, depth:
|
|
236
|
-
}),
|
|
228
|
+
if (n.forEach((o) => {
|
|
229
|
+
let d = i(o);
|
|
230
|
+
d == null || d === !1 ? d = ["__ungrouped__"] : Array.isArray(d) || (d = [d]);
|
|
231
|
+
let a = r;
|
|
232
|
+
d.forEach((c, m) => {
|
|
233
|
+
const l = c == null ? "∅" : String(c), g = a.key === "__root__" ? l : a.key + "||" + l;
|
|
234
|
+
let p = a.children.get(l);
|
|
235
|
+
p || (p = { key: g, value: c, depth: m, rows: [], children: /* @__PURE__ */ new Map(), parent: a }, a.children.set(l, p)), a = p;
|
|
236
|
+
}), a.rows.push(o);
|
|
237
237
|
}), r.children.size === 1 && r.children.has("__ungrouped__") && r.children.get("__ungrouped__").rows.length === n.length)
|
|
238
238
|
return [];
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
|
|
239
|
+
const s = [], u = (o) => {
|
|
240
|
+
if (o === r) {
|
|
241
|
+
o.children.forEach((a) => u(a));
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
244
|
+
const d = t.has(o.key);
|
|
245
|
+
s.push({
|
|
246
246
|
kind: "group",
|
|
247
|
-
key:
|
|
248
|
-
value:
|
|
249
|
-
depth:
|
|
250
|
-
rows:
|
|
251
|
-
expanded:
|
|
252
|
-
}),
|
|
247
|
+
key: o.key,
|
|
248
|
+
value: o.value,
|
|
249
|
+
depth: o.depth,
|
|
250
|
+
rows: o.rows,
|
|
251
|
+
expanded: d
|
|
252
|
+
}), d && (o.children.size ? o.children.forEach((a) => u(a)) : o.rows.forEach((a) => s.push({ kind: "data", row: a, rowIndex: n.indexOf(a) })));
|
|
253
253
|
};
|
|
254
|
-
return
|
|
254
|
+
return u(r), s;
|
|
255
255
|
}
|
|
256
256
|
function C(n, e) {
|
|
257
257
|
const t = new Set(n);
|
|
@@ -263,14 +263,14 @@ function A(n) {
|
|
|
263
263
|
t.kind === "group" && e.add(t.key);
|
|
264
264
|
return e;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function k() {
|
|
267
267
|
return /* @__PURE__ */ new Set();
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function K(n) {
|
|
270
270
|
return n.kind !== "group" ? 0 : n.rows.length;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
273
|
-
class
|
|
272
|
+
const S = '.group-row{background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:4px}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:2px}.group-label{display:inline-flex;align-items:center;gap:8px}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:.85em;font-weight:400}[data-group-depth="0"] .group-label{padding-left:0}[data-group-depth="1"] .group-label{padding-left:20px}[data-group-depth="2"] .group-label{padding-left:40px}[data-group-depth="3"] .group-label{padding-left:60px}[data-group-depth="4"] .group-label{padding-left:80px}.data-grid-row.tbw-group-slide-in{animation:tbw-group-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.data-grid-row.tbw-group-fade-in{animation:tbw-group-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-fade-in{0%{opacity:0}to{opacity:1}}';
|
|
273
|
+
class E extends R {
|
|
274
274
|
name = "groupingRows";
|
|
275
275
|
version = "1.0.0";
|
|
276
276
|
get defaultConfig() {
|
|
@@ -278,17 +278,32 @@ class S extends w {
|
|
|
278
278
|
defaultExpanded: !1,
|
|
279
279
|
showRowCount: !0,
|
|
280
280
|
indentWidth: 20,
|
|
281
|
-
aggregators: {}
|
|
281
|
+
aggregators: {},
|
|
282
|
+
animation: "slide"
|
|
282
283
|
};
|
|
283
284
|
}
|
|
284
285
|
// #region Internal State
|
|
285
286
|
expandedKeys = /* @__PURE__ */ new Set();
|
|
286
287
|
flattenedRows = [];
|
|
287
288
|
isActive = !1;
|
|
289
|
+
previousVisibleKeys = /* @__PURE__ */ new Set();
|
|
290
|
+
keysToAnimate = /* @__PURE__ */ new Set();
|
|
291
|
+
// #endregion
|
|
292
|
+
// #region Animation
|
|
293
|
+
get animationStyle() {
|
|
294
|
+
const t = this.grid.effectiveConfig?.animation?.mode ?? "reduced-motion";
|
|
295
|
+
if (t === !1 || t === "off") return !1;
|
|
296
|
+
if (t !== !0 && t !== "on") {
|
|
297
|
+
const i = this.shadowRoot?.host;
|
|
298
|
+
if (i && getComputedStyle(i).getPropertyValue("--tbw-animation-enabled").trim() === "0")
|
|
299
|
+
return !1;
|
|
300
|
+
}
|
|
301
|
+
return this.config.animation ?? "slide";
|
|
302
|
+
}
|
|
288
303
|
// #endregion
|
|
289
304
|
// #region Lifecycle
|
|
290
305
|
detach() {
|
|
291
|
-
this.expandedKeys.clear(), this.flattenedRows = [], this.isActive = !1;
|
|
306
|
+
this.expandedKeys.clear(), this.flattenedRows = [], this.isActive = !1, this.previousVisibleKeys.clear(), this.keysToAnimate.clear();
|
|
292
307
|
}
|
|
293
308
|
// #endregion
|
|
294
309
|
// #region Hooks
|
|
@@ -308,15 +323,24 @@ class S extends w {
|
|
|
308
323
|
config: t,
|
|
309
324
|
expanded: this.expandedKeys
|
|
310
325
|
});
|
|
311
|
-
|
|
326
|
+
if (i.length === 0)
|
|
327
|
+
return this.isActive = !1, this.flattenedRows = [], [...e];
|
|
328
|
+
this.isActive = !0, this.flattenedRows = i, this.keysToAnimate.clear();
|
|
329
|
+
const r = /* @__PURE__ */ new Set();
|
|
330
|
+
return i.forEach((s, u) => {
|
|
331
|
+
if (s.kind === "data") {
|
|
332
|
+
const o = `data-${u}`;
|
|
333
|
+
r.add(o), this.previousVisibleKeys.has(o) || this.keysToAnimate.add(o);
|
|
334
|
+
}
|
|
335
|
+
}), this.previousVisibleKeys = r, i.map((s) => s.kind === "group" ? {
|
|
312
336
|
__isGroupRow: !0,
|
|
313
|
-
__groupKey:
|
|
314
|
-
__groupValue:
|
|
315
|
-
__groupDepth:
|
|
316
|
-
__groupRows:
|
|
317
|
-
__groupExpanded:
|
|
318
|
-
__groupRowCount:
|
|
319
|
-
} :
|
|
337
|
+
__groupKey: s.key,
|
|
338
|
+
__groupValue: s.value,
|
|
339
|
+
__groupDepth: s.depth,
|
|
340
|
+
__groupRows: s.rows,
|
|
341
|
+
__groupExpanded: s.expanded,
|
|
342
|
+
__groupRowCount: K(s)
|
|
343
|
+
} : s.row);
|
|
320
344
|
}
|
|
321
345
|
onCellClick(e) {
|
|
322
346
|
const t = e.row;
|
|
@@ -331,74 +355,84 @@ class S extends w {
|
|
|
331
355
|
return !1;
|
|
332
356
|
const r = this.config;
|
|
333
357
|
if (r.groupRowRenderer) {
|
|
334
|
-
const
|
|
358
|
+
const o = () => {
|
|
335
359
|
this.toggle(e.__groupKey);
|
|
336
|
-
},
|
|
360
|
+
}, d = r.groupRowRenderer({
|
|
337
361
|
key: e.__groupKey,
|
|
338
362
|
value: e.__groupValue,
|
|
339
363
|
depth: e.__groupDepth,
|
|
340
364
|
rows: e.__groupRows,
|
|
341
365
|
expanded: e.__groupExpanded,
|
|
342
|
-
toggleExpand:
|
|
366
|
+
toggleExpand: o
|
|
343
367
|
});
|
|
344
|
-
if (
|
|
345
|
-
return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), typeof
|
|
368
|
+
if (d)
|
|
369
|
+
return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), typeof d == "string" ? t.innerHTML = d : (t.innerHTML = "", t.appendChild(d)), !0;
|
|
346
370
|
}
|
|
347
|
-
const
|
|
371
|
+
const s = () => {
|
|
348
372
|
this.toggle(e.__groupKey);
|
|
349
373
|
};
|
|
350
|
-
return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), t.setAttribute("role", "row"), t.setAttribute("aria-expanded", String(e.__groupExpanded)), t.style.paddingLeft = `${(e.__groupDepth || 0) * (r.indentWidth ?? 20)}px`, t.innerHTML = "", r.fullWidth !== !1 ? this.renderFullWidthGroupRow(e, t,
|
|
374
|
+
return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), t.setAttribute("role", "row"), t.setAttribute("aria-expanded", String(e.__groupExpanded)), t.style.paddingLeft = `${(e.__groupDepth || 0) * (r.indentWidth ?? 20)}px`, t.innerHTML = "", r.fullWidth !== !1 ? this.renderFullWidthGroupRow(e, t, s) : this.renderPerColumnGroupRow(e, t, s), !0;
|
|
351
375
|
}
|
|
352
376
|
afterRender() {
|
|
377
|
+
const e = this.animationStyle;
|
|
378
|
+
if (e === !1 || this.keysToAnimate.size === 0) return;
|
|
379
|
+
const t = this.shadowRoot?.querySelector(".rows");
|
|
380
|
+
if (!t) return;
|
|
381
|
+
const i = e === "fade" ? "tbw-group-fade-in" : "tbw-group-slide-in";
|
|
382
|
+
for (const r of t.querySelectorAll(".data-grid-row:not(.group-row)")) {
|
|
383
|
+
const s = r.querySelector(".cell[data-row]"), u = s ? parseInt(s.getAttribute("data-row") ?? "-1", 10) : -1, d = this.flattenedRows[u]?.kind === "data" ? `data-${u}` : void 0;
|
|
384
|
+
d && this.keysToAnimate.has(d) && (r.classList.add(i), r.addEventListener("animationend", () => r.classList.remove(i), { once: !0 }));
|
|
385
|
+
}
|
|
386
|
+
this.keysToAnimate.clear();
|
|
353
387
|
}
|
|
354
388
|
// #endregion
|
|
355
389
|
// #region Private Rendering Helpers
|
|
356
390
|
renderFullWidthGroupRow(e, t, i) {
|
|
357
|
-
const r = this.config,
|
|
358
|
-
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}),
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
if (
|
|
367
|
-
const
|
|
368
|
-
|
|
391
|
+
const r = this.config, s = document.createElement("div");
|
|
392
|
+
s.className = "cell group-full", s.style.gridColumn = "1 / -1", s.setAttribute("role", "gridcell");
|
|
393
|
+
const u = document.createElement("button");
|
|
394
|
+
u.type = "button", u.className = `group-toggle${e.__groupExpanded ? " expanded" : ""}`, u.setAttribute("aria-label", e.__groupExpanded ? "Collapse group" : "Expand group"), this.setIcon(u, this.resolveIcon(e.__groupExpanded ? "collapse" : "expand")), u.addEventListener("click", (a) => {
|
|
395
|
+
a.stopPropagation(), i();
|
|
396
|
+
}), s.appendChild(u);
|
|
397
|
+
const o = document.createElement("span");
|
|
398
|
+
o.className = "group-label";
|
|
399
|
+
const d = r.formatLabel ? r.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
|
|
400
|
+
if (o.textContent = d, s.appendChild(o), r.showRowCount !== !1) {
|
|
401
|
+
const a = document.createElement("span");
|
|
402
|
+
a.className = "group-count", a.textContent = `(${e.__groupRowCount ?? e.__groupRows?.length ?? 0})`, s.appendChild(a);
|
|
369
403
|
}
|
|
370
|
-
t.appendChild(
|
|
404
|
+
t.appendChild(s);
|
|
371
405
|
}
|
|
372
406
|
renderPerColumnGroupRow(e, t, i) {
|
|
373
|
-
const r = this.config,
|
|
374
|
-
|
|
375
|
-
const
|
|
376
|
-
if (
|
|
407
|
+
const r = this.config, s = r.aggregators ?? {}, u = this.columns, o = e.__groupRows ?? [], a = this.shadowRoot?.querySelector(".body")?.style.gridTemplateColumns || "";
|
|
408
|
+
a && (t.style.display = "grid", t.style.gridTemplateColumns = a), u.forEach((c, m) => {
|
|
409
|
+
const l = document.createElement("div");
|
|
410
|
+
if (l.className = "cell group-cell", l.setAttribute("data-col", String(m)), l.setAttribute("role", "gridcell"), m === 0) {
|
|
377
411
|
const g = document.createElement("button");
|
|
378
|
-
g.type = "button", g.className =
|
|
412
|
+
g.type = "button", g.className = `group-toggle${e.__groupExpanded ? " expanded" : ""}`, g.setAttribute("aria-label", e.__groupExpanded ? "Collapse group" : "Expand group"), this.setIcon(g, this.resolveIcon(e.__groupExpanded ? "collapse" : "expand")), g.addEventListener("click", (h) => {
|
|
379
413
|
h.stopPropagation(), i();
|
|
380
|
-
}),
|
|
381
|
-
const p = document.createElement("span"),
|
|
382
|
-
if (
|
|
383
|
-
const h =
|
|
414
|
+
}), l.appendChild(g);
|
|
415
|
+
const p = document.createElement("span"), b = s[c.field];
|
|
416
|
+
if (b) {
|
|
417
|
+
const h = w(b, o, c.field, c);
|
|
384
418
|
p.textContent = h != null ? String(h) : String(e.__groupValue);
|
|
385
419
|
} else {
|
|
386
420
|
const h = r.formatLabel ? r.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
|
|
387
421
|
p.textContent = h;
|
|
388
422
|
}
|
|
389
|
-
if (
|
|
423
|
+
if (l.appendChild(p), r.showRowCount !== !1) {
|
|
390
424
|
const h = document.createElement("span");
|
|
391
|
-
h.className = "group-count", h.textContent = ` (${
|
|
425
|
+
h.className = "group-count", h.textContent = ` (${o.length})`, l.appendChild(h);
|
|
392
426
|
}
|
|
393
427
|
} else {
|
|
394
|
-
const g =
|
|
428
|
+
const g = s[c.field];
|
|
395
429
|
if (g) {
|
|
396
|
-
const p =
|
|
397
|
-
|
|
430
|
+
const p = w(g, o, c.field, c);
|
|
431
|
+
l.textContent = p != null ? String(p) : "";
|
|
398
432
|
} else
|
|
399
|
-
|
|
433
|
+
l.textContent = "";
|
|
400
434
|
}
|
|
401
|
-
t.appendChild(
|
|
435
|
+
t.appendChild(l);
|
|
402
436
|
});
|
|
403
437
|
}
|
|
404
438
|
// #endregion
|
|
@@ -413,7 +447,7 @@ class S extends w {
|
|
|
413
447
|
* Collapse all groups.
|
|
414
448
|
*/
|
|
415
449
|
collapseAll() {
|
|
416
|
-
this.expandedKeys =
|
|
450
|
+
this.expandedKeys = k(), this.requestRender();
|
|
417
451
|
}
|
|
418
452
|
/**
|
|
419
453
|
* Toggle expansion of a specific group.
|
|
@@ -511,10 +545,10 @@ class S extends w {
|
|
|
511
545
|
}
|
|
512
546
|
// #endregion
|
|
513
547
|
// #region Styles
|
|
514
|
-
styles =
|
|
548
|
+
styles = S;
|
|
515
549
|
// #endregion
|
|
516
550
|
}
|
|
517
551
|
export {
|
|
518
|
-
|
|
552
|
+
E as GroupingRowsPlugin
|
|
519
553
|
};
|
|
520
554
|
//# sourceMappingURL=index.js.map
|