@toolbox-web/grid 1.0.0 → 1.1.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/all.d.ts +1 -0
- package/all.d.ts.map +1 -1
- package/all.js +1655 -1444
- package/all.js.map +1 -1
- package/index.js +438 -401
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/rows.d.ts.map +1 -1
- package/lib/core/internal/validate-config.d.ts +10 -0
- package/lib/core/internal/validate-config.d.ts.map +1 -1
- package/lib/core/plugin/base-plugin.d.ts +101 -0
- 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/plugins/clipboard/index.js +22 -0
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +48 -26
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +64 -42
- 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 +50 -4
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +36 -14
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +63 -41
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +6 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-columns/index.js +47 -6
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +22 -0
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +22 -0
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +22 -0
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +6 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.js +36 -0
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +22 -0
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +22 -0
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js +22 -0
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts +123 -0
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -0
- package/lib/plugins/responsive/index.d.ts +11 -0
- package/lib/plugins/responsive/index.d.ts.map +1 -0
- package/lib/plugins/responsive/index.js +589 -0
- package/lib/plugins/responsive/index.js.map +1 -0
- package/lib/plugins/responsive/types.d.ts +133 -0
- package/lib/plugins/responsive/types.d.ts.map +1 -0
- package/lib/plugins/selection/SelectionPlugin.d.ts +6 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.d.ts +1 -1
- package/lib/plugins/selection/index.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +105 -63
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/types.d.ts +26 -0
- package/lib/plugins/selection/types.d.ts.map +1 -1
- package/lib/plugins/server-side/index.js +22 -0
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js +22 -0
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js +27 -5
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +22 -0
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +28 -22
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +18 -14
- package/umd/grid.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/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.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/responsive.umd.js +2 -0
- package/umd/plugins/responsive.umd.js.map +1 -0
- package/umd/plugins/selection.umd.js +3 -1
- package/umd/plugins/selection.umd.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseGridPlugin } from '../../core/plugin/base-plugin';
|
|
1
|
+
import { PluginManifest, BaseGridPlugin } from '../../core/plugin/base-plugin';
|
|
2
2
|
import { ColumnConfig } from '../../core/types';
|
|
3
3
|
import { ColumnGroup, GroupingColumnsConfig } from './types';
|
|
4
4
|
/**
|
|
@@ -82,6 +82,11 @@ import { ColumnGroup, GroupingColumnsConfig } from './types';
|
|
|
82
82
|
*/
|
|
83
83
|
export declare class GroupingColumnsPlugin extends BaseGridPlugin<GroupingColumnsConfig> {
|
|
84
84
|
#private;
|
|
85
|
+
/**
|
|
86
|
+
* Plugin manifest - declares owned properties for configuration validation.
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
static readonly manifest: PluginManifest;
|
|
85
90
|
/** @internal */
|
|
86
91
|
readonly name = "groupingColumns";
|
|
87
92
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingColumnsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-columns/GroupingColumnsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,qBAAqB,CAAC;;IAC9E,gBAAgB;IAChB,QAAQ,CAAC,IAAI,qBAAqB;IAClC,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAIrE;IAGD,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAS;IAKzB,gBAAgB;IACP,MAAM,IAAI,IAAI;IAQvB;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO;IAczD,gBAAgB;IACP,cAAc,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE;IA0CzE,gBAAgB;IACP,WAAW,IAAI,IAAI;IAkF5B;;;OAGG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;;OAGG;IACH,SAAS,IAAI,WAAW,EAAE;IAI1B;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE;IAKhD;;OAEG;IACH,OAAO,IAAI,IAAI;CAIhB"}
|
|
1
|
+
{"version":3,"file":"GroupingColumnsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-columns/GroupingColumnsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,qBAAqB,CAAC;;IAC9E;;;OAGG;IACH,gBAAyB,QAAQ,EAAE,cAAc,CAc/C;IAEF,gBAAgB;IAChB,QAAQ,CAAC,IAAI,qBAAqB;IAClC,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAIrE;IAGD,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAS;IAKzB,gBAAgB;IACP,MAAM,IAAI,IAAI;IAQvB;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO;IAczD,gBAAgB;IACP,cAAc,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE;IA0CzE,gBAAgB;IACP,WAAW,IAAI,IAAI;IAkF5B;;;OAGG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;;OAGG;IACH,SAAS,IAAI,WAAW,EAAE;IAI1B;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE;IAKhD;;OAEG;IACH,OAAO,IAAI,IAAI;CAIhB"}
|
|
@@ -25,6 +25,28 @@ class p {
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
static dependencies;
|
|
28
|
+
/**
|
|
29
|
+
* Plugin manifest - declares owned properties, config rules, and hook priorities.
|
|
30
|
+
*
|
|
31
|
+
* This is read by the configuration validator to:
|
|
32
|
+
* - Validate that required plugins are loaded when their properties are used
|
|
33
|
+
* - Execute configRules to detect invalid/conflicting settings
|
|
34
|
+
* - Order hook execution based on priority
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* static override readonly manifest: PluginManifest<MyConfig> = {
|
|
39
|
+
* ownedProperties: [
|
|
40
|
+
* { property: 'myProp', level: 'column', description: 'the "myProp" column property' },
|
|
41
|
+
* ],
|
|
42
|
+
* configRules: [
|
|
43
|
+
* { id: 'myPlugin/conflict', severity: 'warn', message: '...', check: (c) => c.a && c.b },
|
|
44
|
+
* ],
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
static manifest;
|
|
28
50
|
/**
|
|
29
51
|
* Plugin version - defaults to grid version for built-in plugins.
|
|
30
52
|
* Third-party plugins can override with their own semver.
|
|
@@ -286,7 +308,7 @@ class p {
|
|
|
286
308
|
}
|
|
287
309
|
// #endregion
|
|
288
310
|
}
|
|
289
|
-
function
|
|
311
|
+
function a(u) {
|
|
290
312
|
if (!u.length) return [];
|
|
291
313
|
const e = /* @__PURE__ */ new Map(), r = [], t = (o, l) => {
|
|
292
314
|
if (!l.length) return;
|
|
@@ -312,13 +334,13 @@ function c(u) {
|
|
|
312
334
|
}
|
|
313
335
|
i.length && (t(n, i.slice()), i = []);
|
|
314
336
|
const d = typeof s == "string" ? s : s.id;
|
|
315
|
-
let
|
|
316
|
-
|
|
337
|
+
let c = e.get(d);
|
|
338
|
+
c || (c = {
|
|
317
339
|
id: d,
|
|
318
340
|
label: typeof s == "string" ? void 0 : s.label,
|
|
319
341
|
columns: [],
|
|
320
342
|
firstIndex: l
|
|
321
|
-
}, e.set(d,
|
|
343
|
+
}, e.set(d, c), r.push(c)), c.columns.push(o);
|
|
322
344
|
}), i.length && t(n, i), r.length === 1 && r[0].implicit && r[0].columns.length === u.length ? [] : r;
|
|
323
345
|
}
|
|
324
346
|
function f(u, e, r) {
|
|
@@ -354,6 +376,25 @@ function m(u) {
|
|
|
354
376
|
}
|
|
355
377
|
const b = "@layer tbw-plugins{.header-group-row{display:grid;grid-auto-flow:column;background:var(--tbw-grouping-columns-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell{display:flex;align-items:center;justify-content:center;padding:var(--tbw-button-padding-sm, .25rem .5rem);font-weight:600;font-size:var(--tbw-font-size-sm, .9em);text-transform:uppercase;letter-spacing:.5px;border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-group-cell:last-child{border-right:none}.header-row .cell.grouped{border-top:none}.header-row .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.header-row .cell.group-end:last-child{border-right:none}.rows .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong, var(--tbw-color-border)))}.rows .cell.group-end:last-child{border-right:none}.header-group-row.no-borders{border-bottom:none}.header-group-row.no-borders .header-group-cell{border-right:none}.header-row.no-group-borders .cell.group-end{border-right:1px solid var(--tbw-color-border)}}";
|
|
356
378
|
class w extends p {
|
|
379
|
+
/**
|
|
380
|
+
* Plugin manifest - declares owned properties for configuration validation.
|
|
381
|
+
* @internal
|
|
382
|
+
*/
|
|
383
|
+
static manifest = {
|
|
384
|
+
ownedProperties: [
|
|
385
|
+
{
|
|
386
|
+
property: "group",
|
|
387
|
+
level: "column",
|
|
388
|
+
description: 'the "group" column property'
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
property: "columnGroups",
|
|
392
|
+
level: "config",
|
|
393
|
+
description: 'the "columnGroups" config property',
|
|
394
|
+
isUsed: (e) => Array.isArray(e) && e.length > 0
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
};
|
|
357
398
|
/** @internal */
|
|
358
399
|
name = "groupingColumns";
|
|
359
400
|
/** @internal */
|
|
@@ -402,7 +443,7 @@ class w extends p {
|
|
|
402
443
|
});
|
|
403
444
|
} else
|
|
404
445
|
t = [...e];
|
|
405
|
-
const i =
|
|
446
|
+
const i = a(t);
|
|
406
447
|
return i.length === 0 ? (this.isActive = !1, this.groups = [], t) : (this.isActive = !0, this.groups = i, t);
|
|
407
448
|
}
|
|
408
449
|
/** @internal */
|
|
@@ -416,7 +457,7 @@ class w extends p {
|
|
|
416
457
|
if (!e) return;
|
|
417
458
|
const r = e.querySelector(".header-group-row");
|
|
418
459
|
r && r.remove();
|
|
419
|
-
const t = this.columns, i =
|
|
460
|
+
const t = this.columns, i = a(t);
|
|
420
461
|
if (i.length === 0) return;
|
|
421
462
|
const n = h(i, t);
|
|
422
463
|
if (n) {
|