@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.
Files changed (87) hide show
  1. package/all.d.ts +1 -0
  2. package/all.d.ts.map +1 -1
  3. package/all.js +1655 -1444
  4. package/all.js.map +1 -1
  5. package/index.js +438 -401
  6. package/index.js.map +1 -1
  7. package/lib/core/grid.d.ts.map +1 -1
  8. package/lib/core/internal/rows.d.ts.map +1 -1
  9. package/lib/core/internal/validate-config.d.ts +10 -0
  10. package/lib/core/internal/validate-config.d.ts.map +1 -1
  11. package/lib/core/plugin/base-plugin.d.ts +101 -0
  12. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  13. package/lib/core/plugin/index.d.ts +1 -1
  14. package/lib/core/plugin/index.d.ts.map +1 -1
  15. package/lib/plugins/clipboard/index.js +22 -0
  16. package/lib/plugins/clipboard/index.js.map +1 -1
  17. package/lib/plugins/column-virtualization/index.js +48 -26
  18. package/lib/plugins/column-virtualization/index.js.map +1 -1
  19. package/lib/plugins/context-menu/index.js +64 -42
  20. package/lib/plugins/context-menu/index.js.map +1 -1
  21. package/lib/plugins/editing/EditingPlugin.d.ts +6 -1
  22. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  23. package/lib/plugins/editing/index.js +50 -4
  24. package/lib/plugins/editing/index.js.map +1 -1
  25. package/lib/plugins/export/index.js +36 -14
  26. package/lib/plugins/export/index.js.map +1 -1
  27. package/lib/plugins/filtering/index.js +63 -41
  28. package/lib/plugins/filtering/index.js.map +1 -1
  29. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +6 -1
  30. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  31. package/lib/plugins/grouping-columns/index.js +47 -6
  32. package/lib/plugins/grouping-columns/index.js.map +1 -1
  33. package/lib/plugins/grouping-rows/index.js +22 -0
  34. package/lib/plugins/grouping-rows/index.js.map +1 -1
  35. package/lib/plugins/master-detail/index.js +22 -0
  36. package/lib/plugins/master-detail/index.js.map +1 -1
  37. package/lib/plugins/multi-sort/index.js +22 -0
  38. package/lib/plugins/multi-sort/index.js.map +1 -1
  39. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +6 -1
  40. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  41. package/lib/plugins/pinned-columns/index.js +36 -0
  42. package/lib/plugins/pinned-columns/index.js.map +1 -1
  43. package/lib/plugins/pinned-rows/index.js +22 -0
  44. package/lib/plugins/pinned-rows/index.js.map +1 -1
  45. package/lib/plugins/pivot/index.js +22 -0
  46. package/lib/plugins/pivot/index.js.map +1 -1
  47. package/lib/plugins/reorder/index.js +22 -0
  48. package/lib/plugins/reorder/index.js.map +1 -1
  49. package/lib/plugins/responsive/ResponsivePlugin.d.ts +123 -0
  50. package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -0
  51. package/lib/plugins/responsive/index.d.ts +11 -0
  52. package/lib/plugins/responsive/index.d.ts.map +1 -0
  53. package/lib/plugins/responsive/index.js +589 -0
  54. package/lib/plugins/responsive/index.js.map +1 -0
  55. package/lib/plugins/responsive/types.d.ts +133 -0
  56. package/lib/plugins/responsive/types.d.ts.map +1 -0
  57. package/lib/plugins/selection/SelectionPlugin.d.ts +6 -1
  58. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  59. package/lib/plugins/selection/index.d.ts +1 -1
  60. package/lib/plugins/selection/index.d.ts.map +1 -1
  61. package/lib/plugins/selection/index.js +105 -63
  62. package/lib/plugins/selection/index.js.map +1 -1
  63. package/lib/plugins/selection/types.d.ts +26 -0
  64. package/lib/plugins/selection/types.d.ts.map +1 -1
  65. package/lib/plugins/server-side/index.js +22 -0
  66. package/lib/plugins/server-side/index.js.map +1 -1
  67. package/lib/plugins/tree/index.js +22 -0
  68. package/lib/plugins/tree/index.js.map +1 -1
  69. package/lib/plugins/undo-redo/index.js +27 -5
  70. package/lib/plugins/undo-redo/index.js.map +1 -1
  71. package/lib/plugins/visibility/index.js +22 -0
  72. package/lib/plugins/visibility/index.js.map +1 -1
  73. package/package.json +1 -1
  74. package/umd/grid.all.umd.js +28 -22
  75. package/umd/grid.all.umd.js.map +1 -1
  76. package/umd/grid.umd.js +18 -14
  77. package/umd/grid.umd.js.map +1 -1
  78. package/umd/plugins/editing.umd.js +1 -1
  79. package/umd/plugins/editing.umd.js.map +1 -1
  80. package/umd/plugins/grouping-columns.umd.js +1 -1
  81. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  82. package/umd/plugins/pinned-columns.umd.js +1 -1
  83. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  84. package/umd/plugins/responsive.umd.js +2 -0
  85. package/umd/plugins/responsive.umd.js.map +1 -0
  86. package/umd/plugins/selection.umd.js +3 -1
  87. package/umd/plugins/selection.umd.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EditingPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/editing/EditingPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,KAAK,EACV,YAAY,EAIZ,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAA4C,aAAa,EAAkC,MAAM,SAAS,CAAC;AAMvH;;GAEG;AACH,eAAO,MAAM,yBAAyB,8GACiE,CAAC;AAwDxG;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAElE;AAWD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAGjE;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH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BAAmB,IAAI,IAAI;IAM3B;;OAEG;IACH,mBAAmB,IAAI,IAAI;CA4c5B"}
@@ -25,6 +25,28 @@ class k {
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,8 +308,8 @@ class k {
286
308
  }
287
309
  // #endregion
288
310
  }
289
- const A = "@layer tbw-plugins{tbw-grid{--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-row-bg: var(--tbw-editing-bg);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-editing-row-outline-color: var(--tbw-color-accent);--tbw-editing-row-outline-width: 1px}tbw-grid .data-grid-row:has(.editing){background:var(--tbw-editing-row-bg);outline:var(--tbw-editing-row-outline-width) solid var(--tbw-editing-row-outline-color);outline-offset:calc(-1 * var(--tbw-editing-row-outline-width))}tbw-grid .data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex;min-height:calc(var(--tbw-row-height) + 2px);align-items:center;justify-content:center}tbw-grid .data-grid-row>.cell.editing input:not([type=checkbox]),tbw-grid .data-grid-row>.cell.editing select,tbw-grid .data-grid-row>.cell.editing textarea{width:100%;height:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}tbw-grid .tbw-editor-host{display:contents}}";
290
- function P(s) {
311
+ const P = "@layer tbw-plugins{tbw-grid{--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-row-bg: var(--tbw-editing-bg);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-editing-row-outline-color: var(--tbw-color-accent);--tbw-editing-row-outline-width: 1px}tbw-grid .data-grid-row:has(.editing){background:var(--tbw-editing-row-bg);outline:var(--tbw-editing-row-outline-width) solid var(--tbw-editing-row-outline-color);outline-offset:calc(-1 * var(--tbw-editing-row-outline-width))}tbw-grid .data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex;min-height:calc(var(--tbw-row-height) + 2px);align-items:center;justify-content:center}tbw-grid .data-grid-row>.cell.editing input:not([type=checkbox]),tbw-grid .data-grid-row>.cell.editing select,tbw-grid .data-grid-row>.cell.editing textarea{width:100%;height:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}tbw-grid .tbw-editor-host{display:contents}}";
312
+ function A(s) {
291
313
  const e = s.options;
292
314
  return e ? typeof e == "function" ? e() : e : [];
293
315
  }
@@ -322,7 +344,7 @@ function D(s) {
322
344
  const o = document.createElement("option");
323
345
  o.value = "", o.textContent = i.emptyLabel ?? "", t.appendChild(o);
324
346
  }
325
- P(s).forEach((o) => {
347
+ A(s).forEach((o) => {
326
348
  const a = document.createElement("option");
327
349
  a.value = String(o.value), a.textContent = o.label, (s.multi && Array.isArray(e.value) && e.value.includes(o.value) || !s.multi && e.value === o.value) && (a.selected = !0), t.appendChild(a);
328
350
  });
@@ -397,10 +419,34 @@ function M(s, e, i) {
397
419
  }), t instanceof HTMLInputElement && t.type === "checkbox" ? t.addEventListener("change", () => i(t.checked)) : t instanceof HTMLSelectElement && t.addEventListener("change", () => i(v(t, e))));
398
420
  }
399
421
  class $ extends k {
422
+ /**
423
+ * Plugin manifest - declares owned properties for configuration validation.
424
+ * @internal
425
+ */
426
+ static manifest = {
427
+ ownedProperties: [
428
+ {
429
+ property: "editable",
430
+ level: "column",
431
+ description: 'the "editable" column property',
432
+ isUsed: (e) => e === !0
433
+ },
434
+ {
435
+ property: "editor",
436
+ level: "column",
437
+ description: 'the "editor" column property'
438
+ },
439
+ {
440
+ property: "editorParams",
441
+ level: "column",
442
+ description: 'the "editorParams" column property'
443
+ }
444
+ ]
445
+ };
400
446
  /** @internal */
401
447
  name = "editing";
402
448
  /** @internal */
403
- styles = A;
449
+ styles = P;
404
450
  /** @internal */
405
451
  get defaultConfig() {
406
452
  return {