@toolbox-web/grid 1.6.2 → 1.8.0
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/README.md +51 -15
- package/all.js +267 -158
- package/all.js.map +1 -1
- package/index.js +866 -722
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +68 -1
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/header.d.ts.map +1 -1
- package/lib/core/plugin/base-plugin.d.ts +182 -1
- package/lib/core/plugin/base-plugin.d.ts.map +1 -1
- package/lib/core/plugin/index.d.ts +1 -1
- package/lib/core/plugin/index.d.ts.map +1 -1
- package/lib/core/plugin/plugin-manager.d.ts +56 -1
- package/lib/core/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/core/plugin/types.d.ts +36 -0
- package/lib/core/plugin/types.d.ts.map +1 -1
- package/lib/core/types.d.ts +1349 -31
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +140 -87
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +64 -7
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.js +123 -65
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/EditingPlugin.d.ts +6 -1
- package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
- package/lib/plugins/editing/index.js +95 -13
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +91 -34
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +6 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
- package/lib/plugins/filtering/index.js +192 -123
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +57 -0
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +7 -2
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.js +142 -60
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +69 -12
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +70 -13
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +3 -3
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.js +106 -36
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +57 -0
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +57 -0
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/lib/plugins/print/index.js +58 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
- package/lib/plugins/reorder/column-drag.d.ts +2 -2
- package/lib/plugins/reorder/index.js +68 -17
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts +6 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -1
- package/lib/plugins/responsive/index.js +125 -54
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js +169 -112
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts +14 -2
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +84 -7
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +79 -22
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/TreePlugin.d.ts +7 -1
- package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
- package/lib/plugins/tree/index.js +140 -58
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +6 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
- package/lib/plugins/undo-redo/index.js +79 -10
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +57 -0
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/public.d.ts +80 -2
- package/public.d.ts.map +1 -1
- package/umd/grid.all.umd.js +25 -25
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +15 -15
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +5 -5
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +1 -1
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/editing.umd.js +1 -1
- package/umd/plugins/editing.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-rows.umd.js +2 -2
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/print.umd.js +1 -1
- package/umd/plugins/print.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/responsive.umd.js +1 -1
- package/umd/plugins/responsive.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +2 -2
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -1
- package/umd/plugins/tree.umd.js.map +1 -1
- package/umd/plugins/undo-redo.umd.js +1 -1
- package/umd/plugins/undo-redo.umd.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginManifest,
|
|
1
|
+
import { PluginManifest, PluginQuery, BaseGridPlugin } from '../../core/plugin/base-plugin';
|
|
2
2
|
import { ColumnConfig } from '../../core/types';
|
|
3
3
|
import { PinnedColumnsConfig } from './types';
|
|
4
4
|
/**
|
|
@@ -63,7 +63,7 @@ import { PinnedColumnsConfig } from './types';
|
|
|
63
63
|
*/
|
|
64
64
|
export declare class PinnedColumnsPlugin extends BaseGridPlugin<PinnedColumnsConfig> {
|
|
65
65
|
/**
|
|
66
|
-
* Plugin manifest - declares owned properties
|
|
66
|
+
* Plugin manifest - declares owned properties and handled queries.
|
|
67
67
|
* @internal
|
|
68
68
|
*/
|
|
69
69
|
static readonly manifest: PluginManifest;
|
|
@@ -90,7 +90,7 @@ export declare class PinnedColumnsPlugin extends BaseGridPlugin<PinnedColumnsCon
|
|
|
90
90
|
* Handle inter-plugin queries.
|
|
91
91
|
* @internal
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
handleQuery(query: PluginQuery): unknown;
|
|
94
94
|
/**
|
|
95
95
|
* Re-apply sticky offsets (e.g., after column resize).
|
|
96
96
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PinnedColumnsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/pinned-columns/PinnedColumnsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"PinnedColumnsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/pinned-columns/PinnedColumnsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAKnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,mBAAmB,CAAC;IAC1E;;;OAGG;IACH,gBAAyB,QAAQ,EAAE,cAAc,CAmB/C;IAEF,gBAAgB;IAChB,QAAQ,CAAC,IAAI,mBAAmB;IAEhC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAEnE;IAGD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,YAAY,CAA6B;IAKjD,gBAAgB;IACP,MAAM,IAAI,IAAI;IASvB;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;KAAE,GAAG,OAAO;IAStF,gBAAgB;IACP,cAAc,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE;IAMzE,gBAAgB;IACP,WAAW,IAAI,IAAI;IAoB5B;;;OAGG;IACM,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAgCjD;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAK5B;;OAEG;IACH,oBAAoB,IAAI,YAAY,EAAE;IAKtC;;OAEG;IACH,qBAAqB,IAAI,YAAY,EAAE;IAKvC;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAI5B;;;;OAIG;IACM,0BAA0B,CACjC,KAAK,CAAC,EAAE,WAAW,EACnB,WAAW,CAAC,EAAE,WAAW,GACxB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS;CAsCrE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const d = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>',
|
|
1
|
+
const d = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', y = {
|
|
2
2
|
expand: "▶",
|
|
3
3
|
collapse: "▼",
|
|
4
4
|
sortAsc: "▲",
|
|
@@ -10,11 +10,8 @@ const d = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentCo
|
|
|
10
10
|
filter: d,
|
|
11
11
|
filterActive: d,
|
|
12
12
|
print: "🖨️"
|
|
13
|
-
}, y = {
|
|
14
|
-
/** Ask if a column can be moved. Context: ColumnConfig. Response: boolean | undefined */
|
|
15
|
-
CAN_MOVE_COLUMN: "canMoveColumn"
|
|
16
13
|
};
|
|
17
|
-
class
|
|
14
|
+
class p {
|
|
18
15
|
/**
|
|
19
16
|
* Plugin dependencies - declare other plugins this one requires.
|
|
20
17
|
*
|
|
@@ -149,8 +146,65 @@ class m {
|
|
|
149
146
|
* @returns `true` if the event was cancelled (preventDefault called), `false` otherwise
|
|
150
147
|
*/
|
|
151
148
|
emitCancelable(t, e) {
|
|
152
|
-
const
|
|
153
|
-
return this.grid?.dispatchEvent?.(
|
|
149
|
+
const i = new CustomEvent(t, { detail: e, bubbles: !0, cancelable: !0 });
|
|
150
|
+
return this.grid?.dispatchEvent?.(i), i.defaultPrevented;
|
|
151
|
+
}
|
|
152
|
+
// =========================================================================
|
|
153
|
+
// Event Bus - Plugin-to-Plugin Communication
|
|
154
|
+
// =========================================================================
|
|
155
|
+
/**
|
|
156
|
+
* Subscribe to an event from another plugin.
|
|
157
|
+
* The subscription is automatically cleaned up when this plugin is detached.
|
|
158
|
+
*
|
|
159
|
+
* @category Plugin Development
|
|
160
|
+
* @param eventType - The event type to listen for (e.g., 'filter-change')
|
|
161
|
+
* @param callback - The callback to invoke when the event is emitted
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* // In attach() or other initialization
|
|
166
|
+
* this.on('filter-change', (detail) => {
|
|
167
|
+
* console.log('Filter changed:', detail);
|
|
168
|
+
* });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
on(t, e) {
|
|
172
|
+
this.grid?._pluginManager?.subscribe(this, t, e);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Unsubscribe from a plugin event.
|
|
176
|
+
*
|
|
177
|
+
* @category Plugin Development
|
|
178
|
+
* @param eventType - The event type to stop listening for
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* this.off('filter-change');
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
off(t) {
|
|
186
|
+
this.grid?._pluginManager?.unsubscribe(this, t);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Emit an event to other plugins via the Event Bus.
|
|
190
|
+
* This is for inter-plugin communication only; it does NOT dispatch DOM events.
|
|
191
|
+
* Use `emit()` to dispatch DOM events that external consumers can listen to.
|
|
192
|
+
*
|
|
193
|
+
* @category Plugin Development
|
|
194
|
+
* @param eventType - The event type to emit (should be declared in manifest.events)
|
|
195
|
+
* @param detail - The event payload
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* // Emit to other plugins (not DOM)
|
|
200
|
+
* this.emitPluginEvent('filter-change', { field: 'name', value: 'Alice' });
|
|
201
|
+
*
|
|
202
|
+
* // For DOM events that consumers can addEventListener to:
|
|
203
|
+
* this.emit('filter-change', { field: 'name', value: 'Alice' });
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
emitPluginEvent(t, e) {
|
|
207
|
+
this.grid?._pluginManager?.emitPluginEvent(t, e);
|
|
154
208
|
}
|
|
155
209
|
/**
|
|
156
210
|
* Request a re-render of the grid.
|
|
@@ -238,7 +292,7 @@ class m {
|
|
|
238
292
|
*/
|
|
239
293
|
get gridIcons() {
|
|
240
294
|
const t = this.grid?.gridConfig?.icons ?? {};
|
|
241
|
-
return { ...
|
|
295
|
+
return { ...y, ...t };
|
|
242
296
|
}
|
|
243
297
|
// #region Animation Helpers
|
|
244
298
|
/**
|
|
@@ -279,8 +333,8 @@ class m {
|
|
|
279
333
|
get animationDuration() {
|
|
280
334
|
const t = this.gridElement;
|
|
281
335
|
if (t) {
|
|
282
|
-
const e = getComputedStyle(t).getPropertyValue("--tbw-animation-duration").trim(),
|
|
283
|
-
if (!isNaN(
|
|
336
|
+
const e = getComputedStyle(t).getPropertyValue("--tbw-animation-duration").trim(), i = parseInt(e, 10);
|
|
337
|
+
if (!isNaN(i)) return i;
|
|
284
338
|
}
|
|
285
339
|
return 200;
|
|
286
340
|
}
|
|
@@ -314,7 +368,7 @@ class m {
|
|
|
314
368
|
}
|
|
315
369
|
// #endregion
|
|
316
370
|
}
|
|
317
|
-
function
|
|
371
|
+
function m(r) {
|
|
318
372
|
return r.filter((t) => t.sticky === "left");
|
|
319
373
|
}
|
|
320
374
|
function k(r) {
|
|
@@ -326,25 +380,25 @@ function a(r) {
|
|
|
326
380
|
function u(r, t) {
|
|
327
381
|
const e = Array.from(r.querySelectorAll(".header-row .cell"));
|
|
328
382
|
if (!e.length) return;
|
|
329
|
-
const
|
|
383
|
+
const i = /* @__PURE__ */ new Map();
|
|
330
384
|
t.forEach((n, c) => {
|
|
331
|
-
n.field &&
|
|
385
|
+
n.field && i.set(n.field, c);
|
|
332
386
|
});
|
|
333
387
|
let l = 0;
|
|
334
388
|
for (const n of t)
|
|
335
389
|
if (n.sticky === "left") {
|
|
336
|
-
const c =
|
|
337
|
-
|
|
390
|
+
const c = i.get(n.field), s = e.find((o) => o.getAttribute("data-field") === n.field);
|
|
391
|
+
s && (s.classList.add("sticky-left"), s.style.position = "sticky", s.style.left = l + "px", c !== void 0 && r.querySelectorAll(`.data-grid-row .cell[data-col="${c}"]`).forEach((o) => {
|
|
338
392
|
o.classList.add("sticky-left"), o.style.position = "sticky", o.style.left = l + "px";
|
|
339
|
-
}), l +=
|
|
393
|
+
}), l += s.offsetWidth);
|
|
340
394
|
}
|
|
341
395
|
let f = 0;
|
|
342
396
|
for (const n of [...t].reverse())
|
|
343
397
|
if (n.sticky === "right") {
|
|
344
|
-
const c =
|
|
345
|
-
|
|
398
|
+
const c = i.get(n.field), s = e.find((o) => o.getAttribute("data-field") === n.field);
|
|
399
|
+
s && (s.classList.add("sticky-right"), s.style.position = "sticky", s.style.right = f + "px", c !== void 0 && r.querySelectorAll(`.data-grid-row .cell[data-col="${c}"]`).forEach((o) => {
|
|
346
400
|
o.classList.add("sticky-right"), o.style.position = "sticky", o.style.right = f + "px";
|
|
347
|
-
}), f +=
|
|
401
|
+
}), f += s.offsetWidth);
|
|
348
402
|
}
|
|
349
403
|
}
|
|
350
404
|
function h(r) {
|
|
@@ -352,9 +406,10 @@ function h(r) {
|
|
|
352
406
|
e.classList.remove("sticky-left", "sticky-right"), e.style.position = "", e.style.left = "", e.style.right = "";
|
|
353
407
|
});
|
|
354
408
|
}
|
|
355
|
-
|
|
409
|
+
const g = "canMoveColumn";
|
|
410
|
+
class C extends p {
|
|
356
411
|
/**
|
|
357
|
-
* Plugin manifest - declares owned properties
|
|
412
|
+
* Plugin manifest - declares owned properties and handled queries.
|
|
358
413
|
* @internal
|
|
359
414
|
*/
|
|
360
415
|
static manifest = {
|
|
@@ -365,6 +420,16 @@ class C extends m {
|
|
|
365
420
|
description: 'the "sticky" column property',
|
|
366
421
|
isUsed: (t) => t === "left" || t === "right"
|
|
367
422
|
}
|
|
423
|
+
],
|
|
424
|
+
queries: [
|
|
425
|
+
{
|
|
426
|
+
type: g,
|
|
427
|
+
description: "Prevents pinned (sticky) columns from being moved/reordered"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
type: "getStickyOffsets",
|
|
431
|
+
description: "Returns the sticky offsets for left/right pinned columns"
|
|
432
|
+
}
|
|
368
433
|
]
|
|
369
434
|
};
|
|
370
435
|
/** @internal */
|
|
@@ -389,8 +454,8 @@ class C extends m {
|
|
|
389
454
|
* Auto-detect sticky columns from column configuration.
|
|
390
455
|
*/
|
|
391
456
|
static detect(t, e) {
|
|
392
|
-
const
|
|
393
|
-
return Array.isArray(
|
|
457
|
+
const i = e?.columns;
|
|
458
|
+
return Array.isArray(i) ? a(i) : !1;
|
|
394
459
|
}
|
|
395
460
|
// #endregion
|
|
396
461
|
// #region Hooks
|
|
@@ -415,15 +480,20 @@ class C extends m {
|
|
|
415
480
|
* Handle inter-plugin queries.
|
|
416
481
|
* @internal
|
|
417
482
|
*/
|
|
418
|
-
|
|
483
|
+
handleQuery(t) {
|
|
419
484
|
switch (t.type) {
|
|
420
|
-
case
|
|
421
|
-
const e = t.context,
|
|
422
|
-
if (
|
|
485
|
+
case g: {
|
|
486
|
+
const e = t.context, i = e.sticky;
|
|
487
|
+
if (i === "left" || i === "right")
|
|
423
488
|
return !1;
|
|
424
489
|
const l = e.meta?.sticky;
|
|
425
490
|
return l === "left" || l === "right" ? !1 : void 0;
|
|
426
491
|
}
|
|
492
|
+
case "getStickyOffsets":
|
|
493
|
+
return {
|
|
494
|
+
left: Object.fromEntries(this.leftOffsets),
|
|
495
|
+
right: Object.fromEntries(this.rightOffsets)
|
|
496
|
+
};
|
|
427
497
|
default:
|
|
428
498
|
return;
|
|
429
499
|
}
|
|
@@ -442,7 +512,7 @@ class C extends m {
|
|
|
442
512
|
*/
|
|
443
513
|
getLeftPinnedColumns() {
|
|
444
514
|
const t = [...this.columns];
|
|
445
|
-
return
|
|
515
|
+
return m(t);
|
|
446
516
|
}
|
|
447
517
|
/**
|
|
448
518
|
* Get columns pinned to the right.
|
|
@@ -465,20 +535,20 @@ class C extends m {
|
|
|
465
535
|
getHorizontalScrollOffsets(t, e) {
|
|
466
536
|
if (!this.isApplied)
|
|
467
537
|
return;
|
|
468
|
-
let
|
|
538
|
+
let i = 0, l = 0;
|
|
469
539
|
if (t) {
|
|
470
540
|
const n = t.querySelectorAll(".sticky-left"), c = t.querySelectorAll(".sticky-right");
|
|
471
|
-
n.forEach((
|
|
472
|
-
|
|
473
|
-
}), c.forEach((
|
|
474
|
-
l +=
|
|
541
|
+
n.forEach((s) => {
|
|
542
|
+
i += s.offsetWidth;
|
|
543
|
+
}), c.forEach((s) => {
|
|
544
|
+
l += s.offsetWidth;
|
|
475
545
|
});
|
|
476
546
|
} else
|
|
477
|
-
this.grid.querySelectorAll(".header-row .cell").forEach((
|
|
478
|
-
|
|
547
|
+
this.grid.querySelectorAll(".header-row .cell").forEach((s) => {
|
|
548
|
+
s.classList.contains("sticky-left") ? i += s.offsetWidth : s.classList.contains("sticky-right") && (l += s.offsetWidth);
|
|
479
549
|
});
|
|
480
550
|
const f = e?.classList.contains("sticky-left") || e?.classList.contains("sticky-right");
|
|
481
|
-
return { left:
|
|
551
|
+
return { left: i, right: l, skipScroll: f };
|
|
482
552
|
}
|
|
483
553
|
// #endregion
|
|
484
554
|
}
|