@toolbox-web/grid-angular 0.5.0 → 0.6.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 (86) hide show
  1. package/feature-registry-C-cKloXB.js +45 -0
  2. package/features/clipboard.d.ts +18 -0
  3. package/features/clipboard.d.ts.map +1 -0
  4. package/features/clipboard.js +3 -0
  5. package/features/column-virtualization.d.ts +16 -0
  6. package/features/column-virtualization.d.ts.map +1 -0
  7. package/features/column-virtualization.js +3 -0
  8. package/features/context-menu.d.ts +16 -0
  9. package/features/context-menu.d.ts.map +1 -0
  10. package/features/context-menu.js +3 -0
  11. package/features/editing.d.ts +16 -0
  12. package/features/editing.d.ts.map +1 -0
  13. package/features/editing.js +3 -0
  14. package/features/export.d.ts +17 -0
  15. package/features/export.d.ts.map +1 -0
  16. package/features/export.js +3 -0
  17. package/features/filtering.d.ts +17 -0
  18. package/features/filtering.d.ts.map +1 -0
  19. package/features/filtering.js +3 -0
  20. package/features/grouping-columns.d.ts +16 -0
  21. package/features/grouping-columns.d.ts.map +1 -0
  22. package/features/grouping-columns.js +3 -0
  23. package/features/grouping-rows.d.ts +16 -0
  24. package/features/grouping-rows.d.ts.map +1 -0
  25. package/features/grouping-rows.js +3 -0
  26. package/features/index.d.ts +1 -0
  27. package/features/index.d.ts.map +1 -0
  28. package/features/index.js +22 -0
  29. package/features/master-detail.d.ts +16 -0
  30. package/features/master-detail.d.ts.map +1 -0
  31. package/features/master-detail.js +3 -0
  32. package/features/pinned-columns.d.ts +19 -0
  33. package/features/pinned-columns.d.ts.map +1 -0
  34. package/features/pinned-columns.js +3 -0
  35. package/features/pinned-rows.d.ts +16 -0
  36. package/features/pinned-rows.d.ts.map +1 -0
  37. package/features/pinned-rows.js +3 -0
  38. package/features/pivot.d.ts +16 -0
  39. package/features/pivot.d.ts.map +1 -0
  40. package/features/pivot.js +3 -0
  41. package/features/print.d.ts +16 -0
  42. package/features/print.d.ts.map +1 -0
  43. package/features/print.js +3 -0
  44. package/features/reorder.d.ts +16 -0
  45. package/features/reorder.d.ts.map +1 -0
  46. package/features/reorder.js +3 -0
  47. package/features/responsive.d.ts +16 -0
  48. package/features/responsive.d.ts.map +1 -0
  49. package/features/responsive.js +3 -0
  50. package/features/row-reorder.d.ts +16 -0
  51. package/features/row-reorder.d.ts.map +1 -0
  52. package/features/row-reorder.js +3 -0
  53. package/features/selection.d.ts +16 -0
  54. package/features/selection.d.ts.map +1 -0
  55. package/features/selection.js +3 -0
  56. package/features/server-side.d.ts +16 -0
  57. package/features/server-side.d.ts.map +1 -0
  58. package/features/server-side.js +3 -0
  59. package/features/sorting.d.ts +16 -0
  60. package/features/sorting.d.ts.map +1 -0
  61. package/features/sorting.js +3 -0
  62. package/features/tree.d.ts +16 -0
  63. package/features/tree.d.ts.map +1 -0
  64. package/features/tree.js +3 -0
  65. package/features/undo-redo.d.ts +18 -0
  66. package/features/undo-redo.d.ts.map +1 -0
  67. package/features/undo-redo.js +3 -0
  68. package/features/visibility.d.ts +16 -0
  69. package/features/visibility.d.ts.map +1 -0
  70. package/features/visibility.js +3 -0
  71. package/index.d.ts +5 -1
  72. package/index.d.ts.map +1 -1
  73. package/index.js +1016 -306
  74. package/lib/angular-column-config.d.ts +1 -1
  75. package/lib/angular-grid-adapter.d.ts +1 -1
  76. package/lib/angular-grid-adapter.d.ts.map +1 -1
  77. package/lib/base-grid-editor.d.ts +1 -1
  78. package/lib/directives/grid-detail-view.directive.d.ts +1 -1
  79. package/lib/directives/grid.directive.d.ts +554 -3
  80. package/lib/directives/grid.directive.d.ts.map +1 -1
  81. package/lib/feature-registry.d.ts +72 -0
  82. package/lib/feature-registry.d.ts.map +1 -0
  83. package/lib/grid-type-registry.d.ts +1 -1
  84. package/lib/inject-grid.d.ts +109 -0
  85. package/lib/inject-grid.d.ts.map +1 -0
  86. package/package.json +11 -1
package/index.js CHANGED
@@ -1,55 +1,56 @@
1
- var qe = Object.create;
2
- var j = Object.defineProperty;
1
+ var _e = Object.create;
2
+ var N = Object.defineProperty;
3
3
  var $e = Object.getOwnPropertyDescriptor;
4
- var ue = (n, e) => (e = Symbol[n]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + n), I = (n) => {
5
- throw TypeError(n);
4
+ var pe = (i, e) => (e = Symbol[i]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + i), j = (i) => {
5
+ throw TypeError(i);
6
6
  };
7
- var Ue = (n, e, t) => e in n ? j(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
8
- var ce = (n, e) => j(n, "name", { value: e, configurable: !0 });
9
- var h = (n) => [, , , qe(n?.[ue("metadata")] ?? null)], de = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], O = (n) => n !== void 0 && typeof n != "function" ? I("Function expected") : n, We = (n, e, t, i, r) => ({ kind: de[n], name: e, metadata: i, addInitializer: (o) => t._ ? I("Already initialized") : r.push(O(o || null)) }), He = (n, e) => Ue(e, ue("metadata"), n[3]), g = (n, e, t, i) => {
10
- for (var r = 0, o = n[e >> 1], s = o && o.length; r < s; r++) e & 1 ? o[r].call(t) : i = o[r].call(t, i);
11
- return i;
12
- }, v = (n, e, t, i, r, o) => {
13
- var s, l, m, d, T, c = e & 7, C = !!(e & 8), a = !!(e & 16), b = c > 3 ? n.length + 1 : c ? C ? 1 : 2 : 0, D = de[c + 5], le = c > 3 && (n[b - 1] = []), Ge = n[b] || (n[b] = []), w = c && (!a && !C && (r = r.prototype), c < 5 && (c > 3 || !a) && $e(c < 4 ? r : { get [t]() {
14
- return ae(this, o);
15
- }, set [t](p) {
16
- return me(this, o, p);
7
+ var ze = (i, e, t) => e in i ? N(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
8
+ var ue = (i, e) => N(i, "name", { value: e, configurable: !0 });
9
+ var E = (i) => [, , , _e(i?.[pe("metadata")] ?? null)], fe = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], O = (i) => i !== void 0 && typeof i != "function" ? j("Function expected") : i, Be = (i, e, t, n, r) => ({ kind: fe[i], name: e, metadata: n, addInitializer: (o) => t._ ? j("Already initialized") : r.push(O(o || null)) }), Ue = (i, e) => ze(e, pe("metadata"), i[3]), y = (i, e, t, n) => {
10
+ for (var r = 0, o = i[e >> 1], s = o && o.length; r < s; r++) e & 1 ? o[r].call(t) : n = o[r].call(t, n);
11
+ return n;
12
+ }, b = (i, e, t, n, r, o) => {
13
+ var s, l, g, w, A, a = e & 7, R = !!(e & 8), f = !!(e & 16), S = a > 3 ? i.length + 1 : a ? R ? 1 : 2 : 0, M = fe[a + 5], u = a > 3 && (i[S - 1] = []), m = i[S] || (i[S] = []), d = a && (!f && !R && (r = r.prototype), a < 5 && (a > 3 || !f) && $e(a < 4 ? r : { get [t]() {
14
+ return me(this, o);
15
+ }, set [t](h) {
16
+ return de(this, o, h);
17
17
  } }, t));
18
- c ? a && c < 4 && ce(o, (c > 2 ? "set " : c > 1 ? "get " : "") + t) : ce(r, t);
19
- for (var P = i.length - 1; P >= 0; P--)
20
- d = We(c, t, m = {}, n[3], Ge), c && (d.static = C, d.private = a, T = d.access = { has: a ? (p) => Ye(r, p) : (p) => t in p }, c ^ 3 && (T.get = a ? (p) => (c ^ 1 ? ae : Xe)(p, r, c ^ 4 ? o : w.get) : (p) => p[t]), c > 2 && (T.set = a ? (p, F) => me(p, r, F, c ^ 4 ? o : w.set) : (p, F) => p[t] = F)), l = (0, i[P])(c ? c < 4 ? a ? o : w[D] : c > 4 ? void 0 : { get: w.get, set: w.set } : r, d), m._ = 1, c ^ 4 || l === void 0 ? O(l) && (c > 4 ? le.unshift(l) : c ? a ? o = l : w[D] = l : r = l) : typeof l != "object" || l === null ? I("Object expected") : (O(s = l.get) && (w.get = s), O(s = l.set) && (w.set = s), O(s = l.init) && le.unshift(s));
21
- return c || He(n, r), w && j(r, t, w), a ? c ^ 4 ? o : w : r;
18
+ a ? f && a < 4 && ue(o, (a > 2 ? "set " : a > 1 ? "get " : "") + t) : ue(r, t);
19
+ for (var C = n.length - 1; C >= 0; C--)
20
+ w = Be(a, t, g = {}, i[3], m), a && (w.static = R, w.private = f, A = w.access = { has: f ? (h) => Je(r, h) : (h) => t in h }, a ^ 3 && (A.get = f ? (h) => (a ^ 1 ? me : We)(h, r, a ^ 4 ? o : d.get) : (h) => h[t]), a > 2 && (A.set = f ? (h, L) => de(h, r, L, a ^ 4 ? o : d.set) : (h, L) => h[t] = L)), l = (0, n[C])(a ? a < 4 ? f ? o : d[M] : a > 4 ? void 0 : { get: d.get, set: d.set } : r, w), g._ = 1, a ^ 4 || l === void 0 ? O(l) && (a > 4 ? u.unshift(l) : a ? f ? o = l : d[M] = l : r = l) : typeof l != "object" || l === null ? j("Object expected") : (O(s = l.get) && (d.get = s), O(s = l.set) && (d.set = s), O(s = l.init) && u.unshift(s));
21
+ return a || Ue(i, r), d && N(r, t, d), f ? a ^ 4 ? o : d : r;
22
22
  };
23
- var k = (n, e, t) => e.has(n) || I("Cannot " + t), Ye = (n, e) => Object(e) !== e ? I('Cannot use the "in" operator on this value') : n.has(e), ae = (n, e, t) => (k(n, e, "read from private field"), t ? t.call(n) : e.get(n));
24
- var me = (n, e, t, i) => (k(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), Xe = (n, e, t) => (k(n, e, "access private method"), t);
25
- import { inject as u, ElementRef as R, contentChild as x, TemplateRef as L, effect as y, Directive as E, input as f, InjectionToken as ze, Injectable as Be, makeEnvironmentProviders as Je, EventEmitter as fe, createComponent as pe, output as S, computed as A, EnvironmentInjector as Ke, ApplicationRef as Qe, ViewContainerRef as Ze } from "@angular/core";
26
- import { FormGroup as he } from "@angular/forms";
27
- import { DataGridElement as et } from "@toolbox-web/grid";
28
- import { MasterDetailPlugin as ge, ResponsivePlugin as tt } from "@toolbox-web/grid/all";
29
- function ve(n) {
30
- if (typeof n != "function" || n.prototype === void 0)
23
+ var V = (i, e, t) => e.has(i) || j("Cannot " + t), Je = (i, e) => Object(e) !== e ? j('Cannot use the "in" operator on this value') : i.has(e), me = (i, e, t) => (V(i, e, "read from private field"), t ? t.call(i) : e.get(i));
24
+ var de = (i, e, t, n) => (V(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), We = (i, e, t) => (V(i, e, "access private method"), t);
25
+ import { inject as v, ElementRef as T, contentChild as k, TemplateRef as F, effect as D, Directive as x, input as c, InjectionToken as He, Injectable as Ye, makeEnvironmentProviders as Xe, EventEmitter as ge, createComponent as he, signal as G, afterNextRender as Ke, computed as P, output as p, EnvironmentInjector as Qe, ApplicationRef as Ze, ViewContainerRef as et } from "@angular/core";
26
+ import { FormGroup as ve } from "@angular/forms";
27
+ import { c as tt } from "./feature-registry-C-cKloXB.js";
28
+ import { a as wt, g as Rt, b as Ct, i as Et, r as yt } from "./feature-registry-C-cKloXB.js";
29
+ import { DataGridElement as nt } from "@toolbox-web/grid";
30
+ function we(i) {
31
+ if (typeof i != "function" || i.prototype === void 0)
31
32
  return !1;
32
- if (Object.prototype.hasOwnProperty.call(n, "ɵcmp") || Object.prototype.hasOwnProperty.call(n, "ɵfac"))
33
+ if (Object.prototype.hasOwnProperty.call(i, "ɵcmp") || Object.prototype.hasOwnProperty.call(i, "ɵfac"))
33
34
  return !0;
34
- const e = Function.prototype.toString.call(n);
35
+ const e = Function.prototype.toString.call(i);
35
36
  return e.startsWith("class ") || e.startsWith("class{");
36
37
  }
37
- const Se = /* @__PURE__ */ new Map();
38
- function Pe(n) {
39
- return Se.get(n);
38
+ const Oe = /* @__PURE__ */ new Map();
39
+ function je(i) {
40
+ return Oe.get(i);
40
41
  }
41
- var Ce, X;
42
- Ce = [E({ selector: "tbw-grid-column-editor" })];
43
- class V {
44
- elementRef = u(R);
42
+ var ye, X;
43
+ ye = [x({ selector: "tbw-grid-column-editor" })];
44
+ class q {
45
+ elementRef = v(T);
45
46
  /**
46
47
  * Query for the ng-template content child.
47
48
  */
48
- template = x(L);
49
+ template = k(F);
49
50
  /** Effect that triggers when the template is available */
50
- onTemplateReceived = y(() => {
51
+ onTemplateReceived = D(() => {
51
52
  const e = this.template();
52
- e && Se.set(this.elementRef.nativeElement, e);
53
+ e && Oe.set(this.elementRef.nativeElement, e);
53
54
  });
54
55
  /**
55
56
  * Static type guard for template context.
@@ -59,23 +60,23 @@ class V {
59
60
  return !0;
60
61
  }
61
62
  }
62
- X = h(null), V = v(X, 0, "GridColumnEditor", Ce, V), g(X, 1, V);
63
- const Fe = /* @__PURE__ */ new Map();
64
- function je(n) {
65
- return Fe.get(n);
63
+ X = E(null), q = b(X, 0, "GridColumnEditor", ye, q), y(X, 1, q);
64
+ const ke = /* @__PURE__ */ new Map();
65
+ function Ie(i) {
66
+ return ke.get(i);
66
67
  }
67
- var ye, z;
68
- ye = [E({ selector: "tbw-grid-column-view" })];
69
- class N {
70
- elementRef = u(R);
68
+ var be, K;
69
+ be = [x({ selector: "tbw-grid-column-view" })];
70
+ class _ {
71
+ elementRef = v(T);
71
72
  /**
72
73
  * Query for the ng-template content child.
73
74
  */
74
- template = x(L);
75
+ template = k(F);
75
76
  /** Effect that triggers when the template is available */
76
- onTemplateReceived = y(() => {
77
+ onTemplateReceived = D(() => {
77
78
  const e = this.template();
78
- e && Fe.set(this.elementRef.nativeElement, e);
79
+ e && ke.set(this.elementRef.nativeElement, e);
79
80
  });
80
81
  /**
81
82
  * Static type guard for template context.
@@ -85,29 +86,29 @@ class N {
85
86
  return !0;
86
87
  }
87
88
  }
88
- z = h(null), N = v(z, 0, "GridColumnView", ye, N), g(z, 1, N);
89
- const ke = /* @__PURE__ */ new Map();
90
- function we(n) {
91
- const e = n.querySelector("tbw-grid-detail");
89
+ K = E(null), _ = b(K, 0, "GridColumnView", be, _), y(K, 1, _);
90
+ const Ne = /* @__PURE__ */ new Map();
91
+ function Re(i) {
92
+ const e = i.querySelector("tbw-grid-detail");
92
93
  if (e)
93
- return ke.get(e);
94
+ return Ne.get(e);
94
95
  }
95
- var be, B;
96
- be = [E({ selector: "tbw-grid-detail" })];
97
- class _ {
98
- elementRef = u(R);
96
+ var Te, Q;
97
+ Te = [x({ selector: "tbw-grid-detail" })];
98
+ class $ {
99
+ elementRef = v(T);
99
100
  /** Whether to show the expand/collapse column. Default: true */
100
- showExpandColumn = f(!0);
101
+ showExpandColumn = c(!0);
101
102
  /** Animation style for expand/collapse. Default: 'slide' */
102
- animation = f("slide");
103
+ animation = c("slide");
103
104
  /**
104
105
  * Query for the ng-template content child.
105
106
  */
106
- template = x(L);
107
+ template = k(F);
107
108
  /** Effect that triggers when the template is available */
108
- onTemplateReceived = y(() => {
109
+ onTemplateReceived = D(() => {
109
110
  const e = this.template();
110
- e && ke.set(this.elementRef.nativeElement, e);
111
+ e && Ne.set(this.elementRef.nativeElement, e);
111
112
  });
112
113
  /**
113
114
  * Static type guard for template context.
@@ -117,62 +118,62 @@ class _ {
117
118
  return !0;
118
119
  }
119
120
  }
120
- B = h(null), _ = v(B, 0, "GridDetailView", be, _), g(B, 1, _);
121
- const ie = /* @__PURE__ */ Symbol("formArrayContext");
122
- function rt(n) {
123
- return n[ie];
121
+ Q = E(null), $ = b(Q, 0, "GridDetailView", Te, $), y(Q, 1, $);
122
+ const le = /* @__PURE__ */ Symbol("formArrayContext");
123
+ function rt(i) {
124
+ return i[le];
124
125
  }
125
- var Te, J;
126
- Te = [E({
126
+ var Ae, Z;
127
+ Ae = [x({
127
128
  selector: "tbw-grid[formArray]"
128
129
  })];
129
- class G {
130
- elementRef = u(R);
130
+ class z {
131
+ elementRef = v(T);
131
132
  cellCommitListener = null;
132
133
  touchListener = null;
133
134
  /**
134
135
  * The FormArray to bind to the grid.
135
136
  */
136
- formArray = f.required();
137
+ formArray = c.required();
137
138
  /**
138
139
  * Effect that syncs the FormArray value to the grid rows.
139
140
  */
140
- syncFormArrayToGrid = y(() => {
141
+ syncFormArrayToGrid = D(() => {
141
142
  const e = this.formArray(), t = this.elementRef.nativeElement;
142
143
  t && e && (t.rows = e.getRawValue());
143
144
  });
144
145
  ngOnInit() {
145
146
  const e = this.elementRef.nativeElement;
146
- e && (this.#r(e), this.cellCommitListener = (t) => {
147
- const i = t.detail;
148
- this.#i(i);
147
+ e && (this.#n(e), this.cellCommitListener = (t) => {
148
+ const n = t.detail;
149
+ this.#i(n);
149
150
  }, e.addEventListener("cell-commit", this.cellCommitListener), this.touchListener = () => {
150
151
  this.formArray().markAsTouched(), this.touchListener && (e.removeEventListener("click", this.touchListener), this.touchListener = null);
151
152
  }, e.addEventListener("click", this.touchListener));
152
153
  }
153
154
  ngOnDestroy() {
154
155
  const e = this.elementRef.nativeElement;
155
- e && (this.cellCommitListener && e.removeEventListener("cell-commit", this.cellCommitListener), this.touchListener && e.removeEventListener("click", this.touchListener), this.#n(e));
156
+ e && (this.cellCommitListener && e.removeEventListener("cell-commit", this.cellCommitListener), this.touchListener && e.removeEventListener("click", this.touchListener), this.#r(e));
156
157
  }
157
158
  /**
158
159
  * Checks if the FormArray contains FormGroups.
159
160
  */
160
161
  #t() {
161
162
  const e = this.formArray();
162
- return e.length === 0 ? !1 : e.at(0) instanceof he;
163
+ return e.length === 0 ? !1 : e.at(0) instanceof ve;
163
164
  }
164
165
  /**
165
166
  * Gets the FormGroup at a specific row index.
166
167
  */
167
168
  #e(e) {
168
- const i = this.formArray().at(e);
169
- return i instanceof he ? i : void 0;
169
+ const n = this.formArray().at(e);
170
+ return n instanceof ve ? n : void 0;
170
171
  }
171
172
  /**
172
173
  * Stores the FormArrayContext on the grid element.
173
174
  */
174
- #r(e) {
175
- const t = (r) => this.#e(r), i = {
175
+ #n(e) {
176
+ const t = (r) => this.#e(r), n = {
176
177
  getRow: (r) => {
177
178
  const s = this.formArray().at(r);
178
179
  return s ? s.value : null;
@@ -180,8 +181,8 @@ class G {
180
181
  updateField: (r, o, s) => {
181
182
  const l = t(r);
182
183
  if (l) {
183
- const m = l.get(o);
184
- m && (m.setValue(s), m.markAsDirty());
184
+ const g = l.get(o);
185
+ g && (g.setValue(s), g.markAsDirty());
185
186
  }
186
187
  },
187
188
  getValue: () => this.formArray().getRawValue(),
@@ -209,52 +210,52 @@ class G {
209
210
  if (!o) return null;
210
211
  const s = {};
211
212
  let l = !1;
212
- return Object.keys(o.controls).forEach((m) => {
213
- const d = o.get(m);
214
- d?.errors && (s[m] = d.errors, l = !0);
213
+ return Object.keys(o.controls).forEach((g) => {
214
+ const w = o.get(g);
215
+ w?.errors && (s[g] = w.errors, l = !0);
215
216
  }), o.errors && (s._group = o.errors, l = !0), l ? s : null;
216
217
  }
217
218
  };
218
- e[ie] = i;
219
+ e[le] = n;
219
220
  }
220
221
  /**
221
222
  * Clears the FormArrayContext from the grid element.
222
223
  */
223
- #n(e) {
224
- delete e[ie];
224
+ #r(e) {
225
+ delete e[le];
225
226
  }
226
227
  /**
227
228
  * Handles cell-commit events by updating the FormControl in the FormGroup.
228
229
  */
229
230
  #i(e) {
230
- const { rowIndex: t, field: i, value: r } = e, o = this.#e(t);
231
+ const { rowIndex: t, field: n, value: r } = e, o = this.#e(t);
231
232
  if (o) {
232
- const s = o.get(i);
233
+ const s = o.get(n);
233
234
  s && (s.setValue(r), s.markAsDirty(), s.markAsTouched());
234
235
  }
235
236
  }
236
237
  }
237
- J = h(null), G = v(J, 0, "GridFormArray", Te, G), g(J, 1, G);
238
+ Z = E(null), z = b(Z, 0, "GridFormArray", Ae, z), y(Z, 1, z);
238
239
  const Ve = /* @__PURE__ */ new Map();
239
- function nt(n) {
240
- const e = n.querySelector("tbw-grid-responsive-card");
240
+ function it(i) {
241
+ const e = i.querySelector("tbw-grid-responsive-card");
241
242
  if (e)
242
243
  return Ve.get(e);
243
244
  }
244
- var Ae, K;
245
- Ae = [E({
245
+ var xe, ee;
246
+ xe = [x({
246
247
  selector: "tbw-grid-responsive-card"
247
248
  })];
248
- class q {
249
- elementRef = u(R);
249
+ class B {
250
+ elementRef = v(T);
250
251
  /**
251
252
  * The ng-template containing the card content.
252
253
  */
253
- template = x(L);
254
+ template = k(F);
254
255
  /**
255
256
  * Effect that registers the template when it becomes available.
256
257
  */
257
- onTemplateReceived = y(() => {
258
+ onTemplateReceived = D(() => {
258
259
  const e = this.template();
259
260
  e && Ve.set(
260
261
  this.elementRef.nativeElement,
@@ -268,38 +269,38 @@ class q {
268
269
  return !0;
269
270
  }
270
271
  }
271
- K = h(null), q = v(K, 0, "GridResponsiveCard", Ae, q), g(K, 1, q);
272
- const Ne = /* @__PURE__ */ new Map();
273
- function it(n) {
274
- return Ne.get(n);
272
+ ee = E(null), B = b(ee, 0, "GridResponsiveCard", xe, B), y(ee, 1, B);
273
+ const Ge = /* @__PURE__ */ new Map();
274
+ function ot(i) {
275
+ return Ge.get(i);
275
276
  }
276
- var Le, Q;
277
- Le = [E({ selector: "tbw-grid-tool-panel" })];
278
- class $ {
279
- elementRef = u(R);
277
+ var Se, te;
278
+ Se = [x({ selector: "tbw-grid-tool-panel" })];
279
+ class U {
280
+ elementRef = v(T);
280
281
  /** Unique panel identifier (required) */
281
- id = f.required({ alias: "id" });
282
+ id = c.required({ alias: "id" });
282
283
  /** Panel title shown in accordion header (required) */
283
- title = f.required({ alias: "title" });
284
+ title = c.required({ alias: "title" });
284
285
  /** Icon for accordion section header (emoji or text) */
285
- icon = f();
286
+ icon = c();
286
287
  /** Tooltip for accordion section header */
287
- tooltip = f();
288
+ tooltip = c();
288
289
  /** Panel order priority (lower = first, default: 100) */
289
- order = f(100);
290
+ order = c(100);
290
291
  /**
291
292
  * Query for the ng-template content child.
292
293
  */
293
- template = x(L);
294
+ template = k(F);
294
295
  /** Effect that triggers when the template is available */
295
- onTemplateReceived = y(() => {
296
+ onTemplateReceived = D(() => {
296
297
  const e = this.template(), t = this.elementRef.nativeElement;
297
298
  if (e) {
298
299
  t.setAttribute("id", this.id()), t.setAttribute("title", this.title());
299
- const i = this.icon();
300
- i && t.setAttribute("icon", i);
300
+ const n = this.icon();
301
+ n && t.setAttribute("icon", n);
301
302
  const r = this.tooltip();
302
- r && t.setAttribute("tooltip", r), t.setAttribute("order", String(this.order())), Ne.set(t, e);
303
+ r && t.setAttribute("tooltip", r), t.setAttribute("order", String(this.order())), Ge.set(t, e);
303
304
  }
304
305
  });
305
306
  /**
@@ -310,30 +311,30 @@ class $ {
310
311
  return !0;
311
312
  }
312
313
  }
313
- Q = h(null), $ = v(Q, 0, "GridToolPanel", Le, $), g(Q, 1, $);
314
- const oe = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map();
315
- function ot(n) {
316
- const e = oe.get(n);
314
+ te = E(null), U = b(te, 0, "GridToolPanel", Se, U), y(te, 1, U);
315
+ const ce = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
316
+ function st(i) {
317
+ const e = ce.get(i);
317
318
  if (e) return e;
318
- const t = n.querySelector("tbw-grid-column-view");
319
+ const t = i.querySelector("tbw-grid-column-view");
319
320
  if (t)
320
- return je(t);
321
+ return Ie(t);
321
322
  }
322
- function st(n) {
323
- const e = se.get(n);
323
+ function lt(i) {
324
+ const e = ae.get(i);
324
325
  if (e) return e;
325
- const t = n.querySelector("tbw-grid-column-editor");
326
+ const t = i.querySelector("tbw-grid-column-editor");
326
327
  if (t)
327
- return Pe(t);
328
+ return je(t);
328
329
  }
329
- var De, Z;
330
- De = [E({ selector: "[tbwRenderer]" })];
331
- class U {
332
- template = u(L);
333
- elementRef = u(R);
330
+ var Le, ne;
331
+ Le = [x({ selector: "[tbwRenderer]" })];
332
+ class J {
333
+ template = v(F);
334
+ elementRef = v(T);
334
335
  columnElement = null;
335
336
  constructor() {
336
- y(() => {
337
+ D(() => {
337
338
  this.registerTemplate();
338
339
  });
339
340
  }
@@ -341,10 +342,10 @@ class U {
341
342
  let e = this.elementRef.nativeElement?.parentElement;
342
343
  for (; e && e.tagName !== "TBW-GRID-COLUMN"; )
343
344
  e = e.parentElement;
344
- e && (this.columnElement = e, oe.set(e, this.template));
345
+ e && (this.columnElement = e, ce.set(e, this.template));
345
346
  }
346
347
  ngOnDestroy() {
347
- this.columnElement && oe.delete(this.columnElement);
348
+ this.columnElement && ce.delete(this.columnElement);
348
349
  }
349
350
  /**
350
351
  * Static type guard for template context.
@@ -354,15 +355,15 @@ class U {
354
355
  return !0;
355
356
  }
356
357
  }
357
- Z = h(null), U = v(Z, 0, "TbwRenderer", De, U), g(Z, 1, U);
358
- var Oe, ee;
359
- Oe = [E({ selector: "[tbwEditor]" })];
358
+ ne = E(null), J = b(ne, 0, "TbwRenderer", Le, J), y(ne, 1, J);
359
+ var De, re;
360
+ De = [x({ selector: "[tbwEditor]" })];
360
361
  class W {
361
- template = u(L);
362
- elementRef = u(R);
362
+ template = v(F);
363
+ elementRef = v(T);
363
364
  columnElement = null;
364
365
  constructor() {
365
- y(() => {
366
+ D(() => {
366
367
  this.registerTemplate();
367
368
  });
368
369
  }
@@ -370,10 +371,10 @@ class W {
370
371
  let e = this.elementRef.nativeElement?.parentElement;
371
372
  for (; e && e.tagName !== "TBW-GRID-COLUMN"; )
372
373
  e = e.parentElement;
373
- e && (this.columnElement = e, se.set(e, this.template));
374
+ e && (this.columnElement = e, ae.set(e, this.template));
374
375
  }
375
376
  ngOnDestroy() {
376
- this.columnElement && se.delete(this.columnElement);
377
+ this.columnElement && ae.delete(this.columnElement);
377
378
  }
378
379
  /**
379
380
  * Static type guard for template context.
@@ -383,17 +384,17 @@ class W {
383
384
  return !0;
384
385
  }
385
386
  }
386
- ee = h(null), W = v(ee, 0, "TbwEditor", Oe, W), g(ee, 1, W);
387
- const _e = new ze("GRID_TYPE_DEFAULTS");
388
- var Ie, te;
389
- Ie = [Be({ providedIn: "root" })];
390
- class M {
387
+ re = E(null), W = b(re, 0, "TbwEditor", De, W), y(re, 1, W);
388
+ const qe = new He("GRID_TYPE_DEFAULTS");
389
+ var Pe, ie;
390
+ Pe = [Ye({ providedIn: "root" })];
391
+ class I {
391
392
  defaults = /* @__PURE__ */ new Map();
392
393
  constructor() {
393
- const e = u(_e, { optional: !0 });
394
+ const e = v(qe, { optional: !0 });
394
395
  if (e)
395
- for (const [t, i] of Object.entries(e))
396
- this.defaults.set(t, i);
396
+ for (const [t, n] of Object.entries(e))
397
+ this.defaults.set(t, n);
397
398
  }
398
399
  /**
399
400
  * Register type-level defaults for a custom type.
@@ -444,23 +445,23 @@ class M {
444
445
  };
445
446
  }
446
447
  }
447
- te = h(null), M = v(te, 0, "GridTypeRegistry", Ie, M), g(te, 1, M);
448
- function ft(n) {
449
- return Je([{ provide: _e, useValue: n }]);
448
+ ie = E(null), I = b(ie, 0, "GridTypeRegistry", Pe, I), y(ie, 1, I);
449
+ function ft(i) {
450
+ return Xe([{ provide: qe, useValue: i }]);
450
451
  }
451
- function Re(n) {
452
- const e = ot(n);
453
- return e || je(n);
452
+ function Ce(i) {
453
+ const e = st(i);
454
+ return e || Ie(i);
454
455
  }
455
- function Ee(n) {
456
- const e = st(n);
457
- return e || Pe(n);
456
+ function Ee(i) {
457
+ const e = lt(i);
458
+ return e || je(i);
458
459
  }
459
- class lt {
460
- constructor(e, t, i) {
461
- this.injector = e, this.appRef = t, this.viewContainerRef = i, window.__ANGULAR_GRID_ADAPTER__ = this;
460
+ class ct {
461
+ constructor(e, t, n) {
462
+ this.injector = e, this.appRef = t, this.viewContainerRef = n, window.__ANGULAR_GRID_ADAPTER__ = this;
462
463
  try {
463
- this.typeRegistry = this.injector.get(M, null);
464
+ this.typeRegistry = this.injector.get(I, null);
464
465
  } catch {
465
466
  }
466
467
  }
@@ -496,7 +497,7 @@ class lt {
496
497
  processGridConfig(e) {
497
498
  if (!e.columns)
498
499
  return e;
499
- const t = e.columns.map((i) => this.processColumn(i));
500
+ const t = e.columns.map((n) => this.processColumn(n));
500
501
  return {
501
502
  ...e,
502
503
  columns: t
@@ -511,14 +512,14 @@ class lt {
511
512
  */
512
513
  processColumn(e) {
513
514
  const t = { ...e };
514
- return e.renderer && ve(e.renderer) && (t.renderer = this.createComponentRenderer(e.renderer)), e.editor && ve(e.editor) && (t.editor = this.createComponentEditor(e.editor)), t;
515
+ return e.renderer && we(e.renderer) && (t.renderer = this.createComponentRenderer(e.renderer)), e.editor && we(e.editor) && (t.editor = this.createComponentEditor(e.editor)), t;
515
516
  }
516
517
  /**
517
518
  * Determines if this adapter can handle the given element.
518
519
  * Checks if a template is registered for this element (structural or nested).
519
520
  */
520
521
  canHandle(e) {
521
- return Re(e) !== void 0 || Ee(e) !== void 0;
522
+ return Ce(e) !== void 0 || Ee(e) !== void 0;
522
523
  }
523
524
  /**
524
525
  * Creates a view renderer function that creates an embedded view
@@ -528,14 +529,14 @@ class lt {
528
529
  * allowing the grid to use its default rendering.
529
530
  */
530
531
  createRenderer(e) {
531
- const t = Re(e);
532
+ const t = Ce(e);
532
533
  if (t)
533
- return (i) => {
534
+ return (n) => {
534
535
  const r = {
535
- $implicit: i.value,
536
- value: i.value,
537
- row: i.row,
538
- column: i.column
536
+ $implicit: n.value,
537
+ value: n.value,
538
+ row: n.row,
539
+ column: n.column
539
540
  }, o = this.viewContainerRef.createEmbeddedView(t, r);
540
541
  return this.viewRefs.push(o), o.detectChanges(), o.rootNodes[0];
541
542
  };
@@ -559,22 +560,22 @@ class lt {
559
560
  * As long as the component emits `(commit)` with the new value.
560
561
  */
561
562
  createEditor(e) {
562
- const t = Ee(e), i = e.closest("tbw-grid");
563
+ const t = Ee(e), n = e.closest("tbw-grid");
563
564
  return t ? (r) => {
564
- const o = (a) => r.commit(a), s = () => r.cancel(), l = new fe(), m = new fe();
565
- l.subscribe((a) => r.commit(a)), m.subscribe(() => r.cancel());
566
- let d;
567
- if (i) {
568
- const a = rt(i);
569
- if (a?.hasFormGroups) {
570
- const b = i.rows;
571
- if (b) {
572
- const D = b.indexOf(r.row);
573
- D >= 0 && (d = a.getControl(D, r.field));
565
+ const o = (f) => r.commit(f), s = () => r.cancel(), l = new ge(), g = new ge();
566
+ l.subscribe((f) => r.commit(f)), g.subscribe(() => r.cancel());
567
+ let w;
568
+ if (n) {
569
+ const f = rt(n);
570
+ if (f?.hasFormGroups) {
571
+ const S = n.rows;
572
+ if (S) {
573
+ const M = S.indexOf(r.row);
574
+ M >= 0 && (w = f.getControl(M, r.field));
574
575
  }
575
576
  }
576
577
  }
577
- const T = {
578
+ const A = {
578
579
  $implicit: r.value,
579
580
  value: r.value,
580
581
  row: r.row,
@@ -583,32 +584,32 @@ class lt {
583
584
  onCommit: o,
584
585
  onCancel: s,
585
586
  // FormControl from FormArray (if available)
586
- control: d,
587
+ control: w,
587
588
  // Deprecated: EventEmitters (for backwards compatibility)
588
589
  commit: l,
589
- cancel: m
590
- }, c = this.viewContainerRef.createEmbeddedView(t, T);
591
- this.viewRefs.push(c), c.detectChanges();
592
- const C = c.rootNodes[0];
593
- return C && C.addEventListener && (C.addEventListener("commit", (a) => {
594
- const b = a;
595
- r.commit(b.detail);
596
- }), C.addEventListener("cancel", () => {
590
+ cancel: g
591
+ }, a = this.viewContainerRef.createEmbeddedView(t, A);
592
+ this.viewRefs.push(a), a.detectChanges();
593
+ const R = a.rootNodes[0];
594
+ return R && R.addEventListener && (R.addEventListener("commit", (f) => {
595
+ const S = f;
596
+ r.commit(S.detail);
597
+ }), R.addEventListener("cancel", () => {
597
598
  r.cancel();
598
- })), C;
599
- } : (console.warn("[AngularGridAdapter] No editor template registered for element"), () => document.createElement("div"));
599
+ })), R;
600
+ } : () => document.createElement("div");
600
601
  }
601
602
  /**
602
603
  * Creates a detail renderer function for MasterDetailPlugin.
603
604
  * Renders Angular templates for expandable detail rows.
604
605
  */
605
606
  createDetailRenderer(e) {
606
- const t = we(e);
607
+ const t = Re(e);
607
608
  if (t)
608
- return (i) => {
609
+ return (n) => {
609
610
  const r = {
610
- $implicit: i,
611
- row: i
611
+ $implicit: n,
612
+ row: n
612
613
  }, o = this.viewContainerRef.createEmbeddedView(t, r);
613
614
  this.viewRefs.push(o), o.detectChanges();
614
615
  const s = document.createElement("div");
@@ -623,12 +624,12 @@ class lt {
623
624
  * without manual configuration in the Grid directive.
624
625
  */
625
626
  parseDetailElement(e) {
626
- const t = we(e.closest("tbw-grid"));
627
+ const t = Re(e.closest("tbw-grid"));
627
628
  if (t)
628
- return (i) => {
629
+ return (n) => {
629
630
  const r = {
630
- $implicit: i,
631
- row: i
631
+ $implicit: n,
632
+ row: n
632
633
  }, o = this.viewContainerRef.createEmbeddedView(t, r);
633
634
  this.viewRefs.push(o), o.detectChanges();
634
635
  const s = document.createElement("div");
@@ -643,17 +644,17 @@ class lt {
643
644
  * @returns A card renderer function or undefined if no template is found
644
645
  */
645
646
  createResponsiveCardRenderer(e) {
646
- const t = nt(e);
647
+ const t = it(e);
647
648
  if (t)
648
- return (i, r) => {
649
+ return (n, r) => {
649
650
  const o = {
650
- $implicit: i,
651
- row: i,
651
+ $implicit: n,
652
+ row: n,
652
653
  index: r
653
654
  }, s = this.viewContainerRef.createEmbeddedView(t, o);
654
655
  this.viewRefs.push(s), s.detectChanges();
655
656
  const l = document.createElement("div");
656
- return s.rootNodes.forEach((m) => l.appendChild(m)), l;
657
+ return s.rootNodes.forEach((g) => l.appendChild(g)), l;
657
658
  };
658
659
  }
659
660
  /**
@@ -661,14 +662,14 @@ class lt {
661
662
  * The renderer creates an Angular template-based panel content.
662
663
  */
663
664
  createToolPanelRenderer(e) {
664
- const t = it(e);
665
+ const t = ot(e);
665
666
  if (!t)
666
667
  return;
667
- const i = e.closest("tbw-grid");
668
+ const n = e.closest("tbw-grid");
668
669
  return (r) => {
669
670
  const o = {
670
- $implicit: i ?? r,
671
- grid: i ?? r
671
+ $implicit: n ?? r,
672
+ grid: n ?? r
672
673
  }, s = this.viewContainerRef.createEmbeddedView(t, o);
673
674
  return this.viewRefs.push(s), s.detectChanges(), s.rootNodes.forEach((l) => r.appendChild(l)), () => {
674
675
  const l = this.viewRefs.indexOf(s);
@@ -709,10 +710,10 @@ class lt {
709
710
  const t = this.typeRegistry.get(e);
710
711
  if (!t)
711
712
  return;
712
- const i = {
713
+ const n = {
713
714
  editorParams: t.editorParams
714
715
  };
715
- return t.renderer && (i.renderer = this.createComponentRenderer(t.renderer)), t.editor && (i.editor = this.createComponentEditor(t.editor)), i;
716
+ return t.renderer && (n.renderer = this.createComponentRenderer(t.renderer)), t.editor && (n.editor = this.createComponentEditor(t.editor)), n;
716
717
  }
717
718
  /**
718
719
  * Creates a renderer function from an Angular component class.
@@ -720,17 +721,17 @@ class lt {
720
721
  */
721
722
  createComponentRenderer(e) {
722
723
  return (t) => {
723
- const i = document.createElement("span");
724
- i.style.display = "contents";
725
- const r = pe(e, {
724
+ const n = document.createElement("span");
725
+ n.style.display = "contents";
726
+ const r = he(e, {
726
727
  environmentInjector: this.injector,
727
- hostElement: i
728
+ hostElement: n
728
729
  });
729
730
  return this.setComponentInputs(r, {
730
731
  value: t.value,
731
732
  row: t.row,
732
733
  column: t.column
733
- }), this.appRef.attachView(r.hostView), this.componentRefs.push(r), r.changeDetectorRef.detectChanges(), i;
734
+ }), this.appRef.attachView(r.hostView), this.componentRefs.push(r), r.changeDetectorRef.detectChanges(), n;
734
735
  };
735
736
  }
736
737
  /**
@@ -739,11 +740,11 @@ class lt {
739
740
  */
740
741
  createComponentEditor(e) {
741
742
  return (t) => {
742
- const i = document.createElement("span");
743
- i.style.display = "contents";
744
- const r = pe(e, {
743
+ const n = document.createElement("span");
744
+ n.style.display = "contents";
745
+ const r = he(e, {
745
746
  environmentInjector: this.injector,
746
- hostElement: i
747
+ hostElement: n
747
748
  });
748
749
  this.setComponentInputs(r, {
749
750
  value: t.value,
@@ -751,12 +752,12 @@ class lt {
751
752
  column: t.column
752
753
  }), this.appRef.attachView(r.hostView), this.componentRefs.push(r), r.changeDetectorRef.detectChanges();
753
754
  const o = r.instance;
754
- return this.subscribeToOutput(o, "commit", (s) => t.commit(s)), this.subscribeToOutput(o, "cancel", () => t.cancel()), i.addEventListener("commit", (s) => {
755
+ return this.subscribeToOutput(o, "commit", (s) => t.commit(s)), this.subscribeToOutput(o, "cancel", () => t.cancel()), n.addEventListener("commit", (s) => {
755
756
  const l = s;
756
757
  t.commit(l.detail);
757
- }), i.addEventListener("cancel", () => {
758
+ }), n.addEventListener("cancel", () => {
758
759
  t.cancel();
759
- }), i;
760
+ }), n;
760
761
  };
761
762
  }
762
763
  /**
@@ -764,18 +765,18 @@ class lt {
764
765
  * Works with both EventEmitter and OutputEmitterRef (signal outputs).
765
766
  * @internal
766
767
  */
767
- subscribeToOutput(e, t, i) {
768
+ subscribeToOutput(e, t, n) {
768
769
  const r = e[t];
769
- r && typeof r.subscribe == "function" && r.subscribe(i);
770
+ r && typeof r.subscribe == "function" && r.subscribe(n);
770
771
  }
771
772
  /**
772
773
  * Sets component inputs using Angular's setInput API.
773
774
  * @internal
774
775
  */
775
776
  setComponentInputs(e, t) {
776
- for (const [i, r] of Object.entries(t))
777
+ for (const [n, r] of Object.entries(t))
777
778
  try {
778
- e.setInput(i, r);
779
+ e.setInput(n, r);
779
780
  } catch {
780
781
  }
781
782
  }
@@ -787,10 +788,103 @@ class lt {
787
788
  this.viewRefs.forEach((e) => e.destroy()), this.viewRefs = [], this.componentRefs.forEach((e) => e.destroy()), this.componentRefs = [];
788
789
  }
789
790
  }
790
- var xe, re;
791
- xe = [E()];
791
+ function gt() {
792
+ const i = v(T), e = G(!1), t = G(null), n = G(null);
793
+ Ke(() => {
794
+ const u = i.nativeElement.querySelector("tbw-grid");
795
+ if (!u) {
796
+ console.warn("[injectGrid] No tbw-grid element found in component");
797
+ return;
798
+ }
799
+ n.set(u), u.ready?.().then(async () => {
800
+ e.set(!0);
801
+ const m = u.getConfig?.();
802
+ m && t.set(m);
803
+ });
804
+ });
805
+ const r = P(() => {
806
+ const u = t();
807
+ return u?.columns ? u.columns.filter((m) => !m.hidden) : [];
808
+ }), o = async () => {
809
+ const u = n();
810
+ return u ? u.getConfig?.() ?? null : null;
811
+ }, s = async () => {
812
+ const u = n();
813
+ u && await u.forceLayout?.();
814
+ }, l = async (u) => {
815
+ const m = n();
816
+ m && await m.toggleGroup?.(u);
817
+ }, g = (u, m) => {
818
+ n()?.registerStyles?.(u, m);
819
+ }, w = (u) => {
820
+ n()?.unregisterStyles?.(u);
821
+ }, A = () => {
822
+ const u = n(), m = u?.getPluginByName?.("selection");
823
+ if (!m) {
824
+ console.warn("[injectGrid] selectAll requires SelectionPlugin");
825
+ return;
826
+ }
827
+ if (m.config?.mode === "row") {
828
+ const d = u?.rows ?? [], C = new Set(d.map((h, L) => L));
829
+ m.selected = C, m.requestAfterRender?.();
830
+ }
831
+ }, a = () => {
832
+ const m = n()?.getPluginByName?.("selection");
833
+ if (!m) return;
834
+ const d = m.config?.mode;
835
+ d === "row" ? m.selected = /* @__PURE__ */ new Set() : (d === "range" || d === "cell") && (m.ranges = []), m.requestAfterRender?.();
836
+ }, R = () => {
837
+ const m = n()?.getPluginByName?.("selection");
838
+ if (!m) return /* @__PURE__ */ new Set();
839
+ if (m.config?.mode === "row")
840
+ return new Set(m.selected ?? []);
841
+ const d = m.ranges ?? [], C = /* @__PURE__ */ new Set();
842
+ for (const h of d)
843
+ for (let L = h.startRow; L <= h.endRow; L++)
844
+ C.add(L);
845
+ return C;
846
+ };
847
+ return {
848
+ element: n,
849
+ isReady: e,
850
+ config: t,
851
+ visibleColumns: r,
852
+ getConfig: o,
853
+ forceLayout: s,
854
+ toggleGroup: l,
855
+ registerStyles: g,
856
+ unregisterStyles: w,
857
+ selectAll: A,
858
+ clearSelection: a,
859
+ getSelectedIndices: R,
860
+ getSelectedRows: () => {
861
+ const u = n();
862
+ if (!u) return [];
863
+ const m = u.rows ?? [], d = R();
864
+ return Array.from(d).filter((C) => C >= 0 && C < m.length).map((C) => m[C]);
865
+ },
866
+ exportToCsv: (u) => {
867
+ const d = n()?.getPluginByName?.("export");
868
+ if (!d) {
869
+ console.warn("[injectGrid] exportToCsv requires ExportPlugin");
870
+ return;
871
+ }
872
+ d.exportToCsv?.(u);
873
+ },
874
+ exportToJson: (u) => {
875
+ const d = n()?.getPluginByName?.("export");
876
+ if (!d) {
877
+ console.warn("[injectGrid] exportToJson requires ExportPlugin");
878
+ return;
879
+ }
880
+ d.exportToJson?.(u);
881
+ }
882
+ };
883
+ }
884
+ var Fe, oe;
885
+ Fe = [x()];
792
886
  class H {
793
- elementRef = u(R);
887
+ elementRef = v(T);
794
888
  // ============================================================================
795
889
  // Inputs
796
890
  // ============================================================================
@@ -798,31 +892,31 @@ class H {
798
892
  * The cell value. Used when FormControl is not available.
799
893
  * When a FormControl is provided, value is derived from control.value instead.
800
894
  */
801
- value = f();
895
+ value = c();
802
896
  /**
803
897
  * The full row data object.
804
898
  */
805
- row = f();
899
+ row = c();
806
900
  /**
807
901
  * The column configuration.
808
902
  */
809
- column = f();
903
+ column = c();
810
904
  /**
811
905
  * The FormControl for this cell, if the grid is bound to a FormArray.
812
906
  * When provided, the editor uses control.value instead of the value input.
813
907
  */
814
- control = f();
908
+ control = c();
815
909
  // ============================================================================
816
910
  // Outputs
817
911
  // ============================================================================
818
912
  /**
819
913
  * Emits when the user commits a new value.
820
914
  */
821
- commit = S();
915
+ commit = p();
822
916
  /**
823
917
  * Emits when the user cancels editing.
824
918
  */
825
- cancel = S();
919
+ cancel = p();
826
920
  // ============================================================================
827
921
  // Computed State
828
922
  // ============================================================================
@@ -830,7 +924,7 @@ class H {
830
924
  * The current value, derived from FormControl if available, otherwise from value input.
831
925
  * This is the recommended way to get the current value in your editor template.
832
926
  */
833
- currentValue = A(() => {
927
+ currentValue = P(() => {
834
928
  const e = this.control();
835
929
  return e ? e.value : this.value();
836
930
  });
@@ -838,21 +932,21 @@ class H {
838
932
  * Whether the control is invalid (has validation errors).
839
933
  * Returns false if no FormControl is available.
840
934
  */
841
- isInvalid = A(() => this.control()?.invalid ?? !1);
935
+ isInvalid = P(() => this.control()?.invalid ?? !1);
842
936
  /**
843
937
  * Whether the control is dirty (has been modified).
844
938
  * Returns false if no FormControl is available.
845
939
  */
846
- isDirty = A(() => this.control()?.dirty ?? !1);
940
+ isDirty = P(() => this.control()?.dirty ?? !1);
847
941
  /**
848
942
  * Whether the control has been touched.
849
943
  * Returns false if no FormControl is available.
850
944
  */
851
- isTouched = A(() => this.control()?.touched ?? !1);
945
+ isTouched = P(() => this.control()?.touched ?? !1);
852
946
  /**
853
947
  * Whether the control has any validation errors.
854
948
  */
855
- hasErrors = A(() => {
949
+ hasErrors = P(() => {
856
950
  const e = this.control();
857
951
  return e?.errors != null && Object.keys(e.errors).length > 0;
858
952
  });
@@ -860,7 +954,7 @@ class H {
860
954
  * The first error message from the control's validation errors.
861
955
  * Returns an empty string if no errors.
862
956
  */
863
- firstErrorMessage = A(() => {
957
+ firstErrorMessage = P(() => {
864
958
  const e = this.control();
865
959
  if (!e?.errors) return "";
866
960
  const t = Object.keys(e.errors)[0];
@@ -869,9 +963,9 @@ class H {
869
963
  /**
870
964
  * All error messages from the control's validation errors.
871
965
  */
872
- allErrorMessages = A(() => {
966
+ allErrorMessages = P(() => {
873
967
  const e = this.control();
874
- return e?.errors ? Object.entries(e.errors).map(([t, i]) => this.getErrorMessage(t, i)) : [];
968
+ return e?.errors ? Object.entries(e.errors).map(([t, n]) => this.getErrorMessage(t, n)) : [];
875
969
  });
876
970
  // ============================================================================
877
971
  // Methods
@@ -920,25 +1014,26 @@ class H {
920
1014
  }
921
1015
  }
922
1016
  }
923
- re = h(null), H = v(re, 0, "BaseGridEditor", xe, H), g(re, 1, H);
924
- var Me, ne;
925
- Me = [E({ selector: "tbw-grid" })];
1017
+ oe = E(null), H = b(oe, 0, "BaseGridEditor", Fe, H), y(oe, 1, H);
1018
+ var Me, se;
1019
+ Me = [x({ selector: "tbw-grid" })];
926
1020
  class Y {
927
- elementRef = u(R);
928
- injector = u(Ke);
929
- appRef = u(Qe);
930
- viewContainerRef = u(Ze);
1021
+ elementRef = v(T);
1022
+ injector = v(Qe);
1023
+ appRef = v(Ze);
1024
+ viewContainerRef = v(et);
931
1025
  adapter = null;
932
- cellCommitListener = null;
933
1026
  constructor() {
934
- y(() => {
1027
+ D(() => {
935
1028
  const e = this.angularConfig();
936
- if (!e || !this.adapter) return;
937
- const t = this.adapter.processGridConfig(e), i = this.elementRef.nativeElement;
938
- i.gridConfig = t;
1029
+ if (!this.adapter) return;
1030
+ const t = e ? this.adapter.processGridConfig(e) : {}, n = this.createFeaturePlugins(), r = t.plugins || [], o = [...n, ...r], s = this.elementRef.nativeElement;
1031
+ s.gridConfig = {
1032
+ ...t,
1033
+ plugins: o.length > 0 ? o : void 0
1034
+ };
939
1035
  });
940
1036
  }
941
- rowCommitListener = null;
942
1037
  /**
943
1038
  * Custom CSS styles to inject into the grid.
944
1039
  * Use this to style custom cell renderers, editors, or detail panels.
@@ -956,7 +1051,7 @@ class Y {
956
1051
  * <tbw-grid [customStyles]="customStyles">...</tbw-grid>
957
1052
  * ```
958
1053
  */
959
- customStyles = f();
1054
+ customStyles = c();
960
1055
  /**
961
1056
  * Angular-specific grid configuration that supports component classes for renderers/editors.
962
1057
  *
@@ -993,7 +1088,387 @@ class Y {
993
1088
  * ```
994
1089
  */
995
1090
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
996
- angularConfig = f();
1091
+ angularConfig = c();
1092
+ // ═══════════════════════════════════════════════════════════════════════════
1093
+ // FEATURE INPUTS - Declarative plugin configuration
1094
+ // ═══════════════════════════════════════════════════════════════════════════
1095
+ /**
1096
+ * Enable cell/row/range selection.
1097
+ *
1098
+ * **Requires feature import:**
1099
+ * ```typescript
1100
+ * import '@toolbox-web/grid-angular/features/selection';
1101
+ * ```
1102
+ *
1103
+ * @example
1104
+ * ```html
1105
+ * <!-- Shorthand - just the mode -->
1106
+ * <tbw-grid [selection]="'range'" />
1107
+ *
1108
+ * <!-- Full config object -->
1109
+ * <tbw-grid [selection]="{ mode: 'range', checkbox: true }" />
1110
+ * ```
1111
+ */
1112
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1113
+ selection = c();
1114
+ /**
1115
+ * Enable inline cell editing.
1116
+ *
1117
+ * **Requires feature import:**
1118
+ * ```typescript
1119
+ * import '@toolbox-web/grid-angular/features/editing';
1120
+ * ```
1121
+ *
1122
+ * @example
1123
+ * ```html
1124
+ * <!-- Enable with default trigger (dblclick) -->
1125
+ * <tbw-grid [editing]="true" />
1126
+ *
1127
+ * <!-- Specify trigger -->
1128
+ * <tbw-grid [editing]="'click'" />
1129
+ * <tbw-grid [editing]="'dblclick'" />
1130
+ * <tbw-grid [editing]="'manual'" />
1131
+ * ```
1132
+ */
1133
+ editing = c();
1134
+ /**
1135
+ * Enable clipboard copy/paste. Requires selection to be enabled.
1136
+ *
1137
+ * **Requires feature import:**
1138
+ * ```typescript
1139
+ * import '@toolbox-web/grid-angular/features/clipboard';
1140
+ * ```
1141
+ *
1142
+ * @example
1143
+ * ```html
1144
+ * <tbw-grid [selection]="'range'" [clipboard]="true" />
1145
+ * ```
1146
+ */
1147
+ clipboard = c();
1148
+ /**
1149
+ * Enable right-click context menu.
1150
+ *
1151
+ * **Requires feature import:**
1152
+ * ```typescript
1153
+ * import '@toolbox-web/grid-angular/features/context-menu';
1154
+ * ```
1155
+ *
1156
+ * @example
1157
+ * ```html
1158
+ * <tbw-grid [contextMenu]="true" />
1159
+ * ```
1160
+ */
1161
+ contextMenu = c();
1162
+ /**
1163
+ * Enable column sorting.
1164
+ *
1165
+ * **Requires feature import:**
1166
+ * ```typescript
1167
+ * import '@toolbox-web/grid-angular/features/sorting';
1168
+ * ```
1169
+ *
1170
+ * @example
1171
+ * ```html
1172
+ * <!-- Enable with default (multi-sort) -->
1173
+ * <tbw-grid [sorting]="true" />
1174
+ *
1175
+ * <!-- Single column sort only -->
1176
+ * <tbw-grid [sorting]="'single'" />
1177
+ *
1178
+ * <!-- Multi-column sort -->
1179
+ * <tbw-grid [sorting]="'multi'" />
1180
+ * ```
1181
+ */
1182
+ sorting = c();
1183
+ /**
1184
+ * Enable column filtering.
1185
+ *
1186
+ * **Requires feature import:**
1187
+ * ```typescript
1188
+ * import '@toolbox-web/grid-angular/features/filtering';
1189
+ * ```
1190
+ *
1191
+ * @example
1192
+ * ```html
1193
+ * <tbw-grid [filtering]="true" />
1194
+ * <tbw-grid [filtering]="{ debounceMs: 200 }" />
1195
+ * ```
1196
+ */
1197
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1198
+ filtering = c();
1199
+ /**
1200
+ * Enable column drag-to-reorder.
1201
+ *
1202
+ * **Requires feature import:**
1203
+ * ```typescript
1204
+ * import '@toolbox-web/grid-angular/features/reorder';
1205
+ * ```
1206
+ *
1207
+ * @example
1208
+ * ```html
1209
+ * <tbw-grid [reorder]="true" />
1210
+ * ```
1211
+ */
1212
+ reorder = c();
1213
+ /**
1214
+ * Enable column visibility toggle panel.
1215
+ *
1216
+ * **Requires feature import:**
1217
+ * ```typescript
1218
+ * import '@toolbox-web/grid-angular/features/visibility';
1219
+ * ```
1220
+ *
1221
+ * @example
1222
+ * ```html
1223
+ * <tbw-grid [visibility]="true" />
1224
+ * ```
1225
+ */
1226
+ visibility = c();
1227
+ /**
1228
+ * Enable pinned/sticky columns.
1229
+ * Columns are pinned via the `sticky` column property.
1230
+ *
1231
+ * **Requires feature import:**
1232
+ * ```typescript
1233
+ * import '@toolbox-web/grid-angular/features/pinned-columns';
1234
+ * ```
1235
+ *
1236
+ * @example
1237
+ * ```html
1238
+ * <tbw-grid [pinnedColumns]="true" [columns]="[
1239
+ * { field: 'id', sticky: 'left' },
1240
+ * { field: 'name' },
1241
+ * { field: 'actions', sticky: 'right' }
1242
+ * ]" />
1243
+ * ```
1244
+ */
1245
+ pinnedColumns = c();
1246
+ /**
1247
+ * Enable multi-level column headers (column groups).
1248
+ *
1249
+ * **Requires feature import:**
1250
+ * ```typescript
1251
+ * import '@toolbox-web/grid-angular/features/grouping-columns';
1252
+ * ```
1253
+ *
1254
+ * @example
1255
+ * ```html
1256
+ * <tbw-grid [groupingColumns]="{ columnGroups: [...] }" />
1257
+ * ```
1258
+ */
1259
+ groupingColumns = c();
1260
+ /**
1261
+ * Enable horizontal column virtualization for wide grids.
1262
+ *
1263
+ * **Requires feature import:**
1264
+ * ```typescript
1265
+ * import '@toolbox-web/grid-angular/features/column-virtualization';
1266
+ * ```
1267
+ *
1268
+ * @example
1269
+ * ```html
1270
+ * <tbw-grid [columnVirtualization]="true" />
1271
+ * ```
1272
+ */
1273
+ columnVirtualization = c();
1274
+ /**
1275
+ * Enable row drag-to-reorder.
1276
+ *
1277
+ * **Requires feature import:**
1278
+ * ```typescript
1279
+ * import '@toolbox-web/grid-angular/features/row-reorder';
1280
+ * ```
1281
+ *
1282
+ * @example
1283
+ * ```html
1284
+ * <tbw-grid [rowReorder]="true" />
1285
+ * ```
1286
+ */
1287
+ rowReorder = c();
1288
+ /**
1289
+ * Enable row grouping by field values.
1290
+ *
1291
+ * **Requires feature import:**
1292
+ * ```typescript
1293
+ * import '@toolbox-web/grid-angular/features/grouping-rows';
1294
+ * ```
1295
+ *
1296
+ * @example
1297
+ * ```html
1298
+ * <tbw-grid [groupingRows]="{ groupBy: ['department'] }" />
1299
+ * ```
1300
+ */
1301
+ groupingRows = c();
1302
+ /**
1303
+ * Enable pinned rows (aggregation/status bar).
1304
+ *
1305
+ * **Requires feature import:**
1306
+ * ```typescript
1307
+ * import '@toolbox-web/grid-angular/features/pinned-rows';
1308
+ * ```
1309
+ *
1310
+ * @example
1311
+ * ```html
1312
+ * <tbw-grid [pinnedRows]="{ bottom: [{ type: 'aggregation' }] }" />
1313
+ * ```
1314
+ */
1315
+ pinnedRows = c();
1316
+ /**
1317
+ * Enable hierarchical tree view.
1318
+ *
1319
+ * **Requires feature import:**
1320
+ * ```typescript
1321
+ * import '@toolbox-web/grid-angular/features/tree';
1322
+ * ```
1323
+ *
1324
+ * @example
1325
+ * ```html
1326
+ * <tbw-grid [tree]="{ childrenField: 'children' }" />
1327
+ * ```
1328
+ */
1329
+ tree = c();
1330
+ /**
1331
+ * Enable master-detail expandable rows.
1332
+ *
1333
+ * **Requires feature import:**
1334
+ * ```typescript
1335
+ * import '@toolbox-web/grid-angular/features/master-detail';
1336
+ * ```
1337
+ *
1338
+ * @example
1339
+ * ```html
1340
+ * <tbw-grid [masterDetail]="{ detailRenderer: detailFn }" />
1341
+ * ```
1342
+ */
1343
+ masterDetail = c();
1344
+ /**
1345
+ * Enable responsive card layout for narrow viewports.
1346
+ *
1347
+ * **Requires feature import:**
1348
+ * ```typescript
1349
+ * import '@toolbox-web/grid-angular/features/responsive';
1350
+ * ```
1351
+ *
1352
+ * @example
1353
+ * ```html
1354
+ * <tbw-grid [responsive]="{ breakpoint: 768 }" />
1355
+ * ```
1356
+ */
1357
+ responsive = c();
1358
+ /**
1359
+ * Enable undo/redo for cell edits. Requires editing to be enabled.
1360
+ *
1361
+ * **Requires feature import:**
1362
+ * ```typescript
1363
+ * import '@toolbox-web/grid-angular/features/undo-redo';
1364
+ * ```
1365
+ *
1366
+ * @example
1367
+ * ```html
1368
+ * <tbw-grid [editing]="'dblclick'" [undoRedo]="true" />
1369
+ * ```
1370
+ */
1371
+ undoRedo = c();
1372
+ /**
1373
+ * Enable CSV/JSON export functionality.
1374
+ *
1375
+ * **Requires feature import:**
1376
+ * ```typescript
1377
+ * import '@toolbox-web/grid-angular/features/export';
1378
+ * ```
1379
+ *
1380
+ * @example
1381
+ * ```html
1382
+ * <tbw-grid [export]="true" />
1383
+ * <tbw-grid [export]="{ filename: 'data.csv' }" />
1384
+ * ```
1385
+ */
1386
+ exportFeature = c();
1387
+ /**
1388
+ * Enable print functionality.
1389
+ *
1390
+ * **Requires feature import:**
1391
+ * ```typescript
1392
+ * import '@toolbox-web/grid-angular/features/print';
1393
+ * ```
1394
+ *
1395
+ * @example
1396
+ * ```html
1397
+ * <tbw-grid [print]="true" />
1398
+ * ```
1399
+ */
1400
+ print = c();
1401
+ /**
1402
+ * Enable pivot table functionality.
1403
+ *
1404
+ * **Requires feature import:**
1405
+ * ```typescript
1406
+ * import '@toolbox-web/grid-angular/features/pivot';
1407
+ * ```
1408
+ *
1409
+ * @example
1410
+ * ```html
1411
+ * <tbw-grid [pivot]="{ rowFields: ['category'], valueField: 'sales' }" />
1412
+ * ```
1413
+ */
1414
+ pivot = c();
1415
+ /**
1416
+ * Enable server-side data operations.
1417
+ *
1418
+ * **Requires feature import:**
1419
+ * ```typescript
1420
+ * import '@toolbox-web/grid-angular/features/server-side';
1421
+ * ```
1422
+ *
1423
+ * @example
1424
+ * ```html
1425
+ * <tbw-grid [serverSide]="{ dataSource: fetchDataFn }" />
1426
+ * ```
1427
+ */
1428
+ serverSide = c();
1429
+ // ═══════════════════════════════════════════════════════════════════════════
1430
+ // EVENT OUTPUTS - All grid events
1431
+ // ═══════════════════════════════════════════════════════════════════════════
1432
+ /**
1433
+ * Emitted when a cell is clicked.
1434
+ *
1435
+ * @example
1436
+ * ```html
1437
+ * <tbw-grid (cellClick)="onCellClick($event)">...</tbw-grid>
1438
+ * ```
1439
+ */
1440
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1441
+ cellClick = p();
1442
+ /**
1443
+ * Emitted when a row is clicked.
1444
+ *
1445
+ * @example
1446
+ * ```html
1447
+ * <tbw-grid (rowClick)="onRowClick($event)">...</tbw-grid>
1448
+ * ```
1449
+ */
1450
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1451
+ rowClick = p();
1452
+ /**
1453
+ * Emitted when a cell is activated (Enter key or double-click).
1454
+ *
1455
+ * @example
1456
+ * ```html
1457
+ * <tbw-grid (cellActivate)="onCellActivate($event)">...</tbw-grid>
1458
+ * ```
1459
+ */
1460
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1461
+ cellActivate = p();
1462
+ /**
1463
+ * Emitted when a cell value changes (before commit).
1464
+ *
1465
+ * @example
1466
+ * ```html
1467
+ * <tbw-grid (cellChange)="onCellChange($event)">...</tbw-grid>
1468
+ * ```
1469
+ */
1470
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1471
+ cellChange = p();
997
1472
  /**
998
1473
  * Emitted when a cell value is committed (inline editing).
999
1474
  * Provides the row, field, new value, and change tracking information.
@@ -1009,7 +1484,7 @@ class Y {
1009
1484
  * }
1010
1485
  * ```
1011
1486
  */
1012
- cellCommit = S();
1487
+ cellCommit = p();
1013
1488
  /**
1014
1489
  * Emitted when a row's values are committed (bulk/row editing).
1015
1490
  * Provides the row data and change tracking information.
@@ -1019,17 +1494,240 @@ class Y {
1019
1494
  * <tbw-grid (rowCommit)="onRowCommit($event)">...</tbw-grid>
1020
1495
  * ```
1021
1496
  */
1022
- rowCommit = S();
1497
+ rowCommit = p();
1498
+ /**
1499
+ * Emitted when the changed rows are reset.
1500
+ *
1501
+ * @example
1502
+ * ```html
1503
+ * <tbw-grid (changedRowsReset)="onChangedRowsReset($event)">...</tbw-grid>
1504
+ * ```
1505
+ */
1506
+ changedRowsReset = p();
1507
+ /**
1508
+ * Emitted when sort state changes.
1509
+ *
1510
+ * @example
1511
+ * ```html
1512
+ * <tbw-grid (sortChange)="onSortChange($event)">...</tbw-grid>
1513
+ * ```
1514
+ */
1515
+ sortChange = p();
1516
+ /**
1517
+ * Emitted when filter values change.
1518
+ *
1519
+ * @example
1520
+ * ```html
1521
+ * <tbw-grid (filterChange)="onFilterChange($event)">...</tbw-grid>
1522
+ * ```
1523
+ */
1524
+ filterChange = p();
1525
+ /**
1526
+ * Emitted when a column is resized.
1527
+ *
1528
+ * @example
1529
+ * ```html
1530
+ * <tbw-grid (columnResize)="onColumnResize($event)">...</tbw-grid>
1531
+ * ```
1532
+ */
1533
+ columnResize = p();
1534
+ /**
1535
+ * Emitted when a column is moved via drag-and-drop.
1536
+ *
1537
+ * @example
1538
+ * ```html
1539
+ * <tbw-grid (columnMove)="onColumnMove($event)">...</tbw-grid>
1540
+ * ```
1541
+ */
1542
+ columnMove = p();
1543
+ /**
1544
+ * Emitted when column visibility changes.
1545
+ *
1546
+ * @example
1547
+ * ```html
1548
+ * <tbw-grid (columnVisibility)="onColumnVisibility($event)">...</tbw-grid>
1549
+ * ```
1550
+ */
1551
+ columnVisibility = p();
1552
+ /**
1553
+ * Emitted when column state changes (resize, reorder, visibility).
1554
+ *
1555
+ * @example
1556
+ * ```html
1557
+ * <tbw-grid (columnStateChange)="onColumnStateChange($event)">...</tbw-grid>
1558
+ * ```
1559
+ */
1560
+ columnStateChange = p();
1561
+ /**
1562
+ * Emitted when selection changes.
1563
+ *
1564
+ * @example
1565
+ * ```html
1566
+ * <tbw-grid (selectionChange)="onSelectionChange($event)">...</tbw-grid>
1567
+ * ```
1568
+ */
1569
+ selectionChange = p();
1570
+ /**
1571
+ * Emitted when a row is moved via drag-and-drop.
1572
+ *
1573
+ * @example
1574
+ * ```html
1575
+ * <tbw-grid (rowMove)="onRowMove($event)">...</tbw-grid>
1576
+ * ```
1577
+ */
1578
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1579
+ rowMove = p();
1580
+ /**
1581
+ * Emitted when a group is expanded or collapsed.
1582
+ *
1583
+ * @example
1584
+ * ```html
1585
+ * <tbw-grid (groupToggle)="onGroupToggle($event)">...</tbw-grid>
1586
+ * ```
1587
+ */
1588
+ groupToggle = p();
1589
+ /**
1590
+ * Emitted when a tree node is expanded.
1591
+ *
1592
+ * @example
1593
+ * ```html
1594
+ * <tbw-grid (treeExpand)="onTreeExpand($event)">...</tbw-grid>
1595
+ * ```
1596
+ */
1597
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1598
+ treeExpand = p();
1599
+ /**
1600
+ * Emitted when a detail panel is expanded or collapsed.
1601
+ *
1602
+ * @example
1603
+ * ```html
1604
+ * <tbw-grid (detailExpand)="onDetailExpand($event)">...</tbw-grid>
1605
+ * ```
1606
+ */
1607
+ detailExpand = p();
1608
+ /**
1609
+ * Emitted when responsive mode changes (table ↔ card).
1610
+ *
1611
+ * @example
1612
+ * ```html
1613
+ * <tbw-grid (responsiveChange)="onResponsiveChange($event)">...</tbw-grid>
1614
+ * ```
1615
+ */
1616
+ responsiveChange = p();
1617
+ /**
1618
+ * Emitted when cells are copied to clipboard.
1619
+ *
1620
+ * @example
1621
+ * ```html
1622
+ * <tbw-grid (copy)="onCopy($event)">...</tbw-grid>
1623
+ * ```
1624
+ */
1625
+ copy = p();
1626
+ /**
1627
+ * Emitted when cells are pasted from clipboard.
1628
+ *
1629
+ * @example
1630
+ * ```html
1631
+ * <tbw-grid (paste)="onPaste($event)">...</tbw-grid>
1632
+ * ```
1633
+ */
1634
+ paste = p();
1635
+ /**
1636
+ * Emitted when undo/redo is performed.
1637
+ *
1638
+ * @example
1639
+ * ```html
1640
+ * <tbw-grid (undoRedoAction)="onUndoRedo($event)">...</tbw-grid>
1641
+ * ```
1642
+ */
1643
+ undoRedoAction = p();
1644
+ /**
1645
+ * Emitted when export completes.
1646
+ *
1647
+ * @example
1648
+ * ```html
1649
+ * <tbw-grid (exportComplete)="onExportComplete($event)">...</tbw-grid>
1650
+ * ```
1651
+ */
1652
+ exportComplete = p();
1653
+ /**
1654
+ * Emitted when print starts.
1655
+ *
1656
+ * @example
1657
+ * ```html
1658
+ * <tbw-grid (printStart)="onPrintStart($event)">...</tbw-grid>
1659
+ * ```
1660
+ */
1661
+ printStart = p();
1662
+ /**
1663
+ * Emitted when print completes.
1664
+ *
1665
+ * @example
1666
+ * ```html
1667
+ * <tbw-grid (printComplete)="onPrintComplete($event)">...</tbw-grid>
1668
+ * ```
1669
+ */
1670
+ printComplete = p();
1671
+ // Map of output names to event names for automatic wiring
1672
+ eventOutputMap = {
1673
+ cellClick: "cell-click",
1674
+ rowClick: "row-click",
1675
+ cellActivate: "cell-activate",
1676
+ cellChange: "cell-change",
1677
+ cellCommit: "cell-commit",
1678
+ rowCommit: "row-commit",
1679
+ changedRowsReset: "changed-rows-reset",
1680
+ sortChange: "sort-change",
1681
+ filterChange: "filter-change",
1682
+ columnResize: "column-resize",
1683
+ columnMove: "column-move",
1684
+ columnVisibility: "column-visibility",
1685
+ columnStateChange: "column-state-change",
1686
+ selectionChange: "selection-change",
1687
+ rowMove: "row-move",
1688
+ groupToggle: "group-toggle",
1689
+ treeExpand: "tree-expand",
1690
+ detailExpand: "detail-expand",
1691
+ responsiveChange: "responsive-change",
1692
+ copy: "copy",
1693
+ paste: "paste",
1694
+ undoRedoAction: "undo-redo",
1695
+ exportComplete: "export-complete",
1696
+ printStart: "print-start",
1697
+ printComplete: "print-complete"
1698
+ };
1699
+ // Store event listeners for cleanup
1700
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1701
+ eventListeners = /* @__PURE__ */ new Map();
1023
1702
  ngOnInit() {
1024
- this.adapter = new lt(this.injector, this.appRef, this.viewContainerRef), et.registerAdapter(this.adapter);
1703
+ this.adapter = new ct(this.injector, this.appRef, this.viewContainerRef), nt.registerAdapter(this.adapter);
1025
1704
  const e = this.elementRef.nativeElement;
1026
- this.cellCommitListener = (t) => {
1027
- const i = t.detail;
1028
- this.cellCommit.emit(i);
1029
- }, e.addEventListener("cell-commit", this.cellCommitListener), this.rowCommitListener = (t) => {
1030
- const i = t.detail;
1031
- this.rowCommit.emit(i);
1032
- }, e.addEventListener("row-commit", this.rowCommitListener), e.__frameworkAdapter = this.adapter;
1705
+ this.setupEventListeners(e), e.__frameworkAdapter = this.adapter;
1706
+ }
1707
+ /**
1708
+ * Sets up event listeners for all outputs using the eventOutputMap.
1709
+ */
1710
+ setupEventListeners(e) {
1711
+ for (const [t, n] of Object.entries(this.eventOutputMap)) {
1712
+ const r = (o) => {
1713
+ const s = o.detail;
1714
+ this[t].emit(s);
1715
+ };
1716
+ e.addEventListener(n, r), this.eventListeners.set(n, r);
1717
+ }
1718
+ }
1719
+ /**
1720
+ * Creates plugins from feature inputs.
1721
+ * Uses the feature registry to allow tree-shaking - only imported features are bundled.
1722
+ * Returns the array of created plugins (doesn't modify grid).
1723
+ */
1724
+ createFeaturePlugins() {
1725
+ const e = [], t = (n, r) => {
1726
+ if (r == null || r === !1) return;
1727
+ const o = tt(n, r);
1728
+ o && e.push(o);
1729
+ };
1730
+ return t("selection", this.selection()), t("editing", this.editing()), t("clipboard", this.clipboard()), t("contextMenu", this.contextMenu()), t("sorting", this.sorting()), t("filtering", this.filtering()), t("reorder", this.reorder()), t("visibility", this.visibility()), t("pinnedColumns", this.pinnedColumns()), t("groupingColumns", this.groupingColumns()), t("columnVirtualization", this.columnVirtualization()), t("rowReorder", this.rowReorder()), t("groupingRows", this.groupingRows()), t("pinnedRows", this.pinnedRows()), t("tree", this.tree()), t("masterDetail", this.masterDetail()), t("responsive", this.responsive()), t("undoRedo", this.undoRedo()), t("export", this.exportFeature()), t("print", this.print()), t("pivot", this.pivot()), t("serverSide", this.serverSide()), e;
1033
1731
  }
1034
1732
  ngAfterContentInit() {
1035
1733
  const e = this.elementRef.nativeElement;
@@ -1050,30 +1748,30 @@ class Y {
1050
1748
  /**
1051
1749
  * Configures the MasterDetailPlugin after Angular templates are registered.
1052
1750
  * - If plugin exists: refresh its detail renderer
1053
- * - If plugin doesn't exist but <tbw-grid-detail> is present: create and add the plugin
1751
+ * - If plugin doesn't exist but <tbw-grid-detail> is present: dynamically import and add the plugin
1054
1752
  */
1055
- configureMasterDetail(e) {
1753
+ async configureMasterDetail(e) {
1056
1754
  if (!this.adapter) return;
1057
- const t = e.getPlugin?.(ge);
1755
+ const t = e.gridConfig?.plugins?.find((R) => R.name === "masterDetail");
1058
1756
  if (t && typeof t.refreshDetailRenderer == "function") {
1059
1757
  t.refreshDetailRenderer();
1060
1758
  return;
1061
1759
  }
1062
- const i = e.querySelector("tbw-grid-detail");
1063
- if (!i) return;
1760
+ const n = e.querySelector("tbw-grid-detail");
1761
+ if (!n) return;
1064
1762
  const r = this.adapter.createDetailRenderer(e);
1065
1763
  if (!r) return;
1066
- const o = i.getAttribute("animation");
1764
+ const o = n.getAttribute("animation");
1067
1765
  let s = "slide";
1068
1766
  o === "false" ? s = !1 : o === "fade" && (s = "fade");
1069
- const l = i.getAttribute("showExpandColumn") !== "false", m = new ge({
1767
+ const l = n.getAttribute("showExpandColumn") !== "false", { MasterDetailPlugin: g } = await import("@toolbox-web/grid/plugins/master-detail"), w = new g({
1070
1768
  detailRenderer: r,
1071
1769
  showExpandColumn: l,
1072
1770
  animation: s
1073
- }), d = e.gridConfig || {}, T = d.plugins || [];
1771
+ }), A = e.gridConfig || {}, a = A.plugins || [];
1074
1772
  e.gridConfig = {
1075
- ...d,
1076
- plugins: [...T, m]
1773
+ ...A,
1774
+ plugins: [...a, w]
1077
1775
  };
1078
1776
  }
1079
1777
  /**
@@ -1083,18 +1781,18 @@ class Y {
1083
1781
  */
1084
1782
  configureResponsiveCard(e) {
1085
1783
  if (!this.adapter || !e.querySelector("tbw-grid-responsive-card")) return;
1086
- const i = this.adapter.createResponsiveCardRenderer(e);
1087
- if (!i) return;
1088
- const r = e.getPlugin?.(tt);
1089
- if (r) {
1090
- r.setCardRenderer(i);
1784
+ const n = this.adapter.createResponsiveCardRenderer(e);
1785
+ if (!n) return;
1786
+ const r = e.gridConfig?.plugins?.find((o) => o.name === "responsive");
1787
+ if (r && typeof r.setCardRenderer == "function") {
1788
+ r.setCardRenderer(n);
1091
1789
  return;
1092
1790
  }
1093
1791
  console.warn(
1094
1792
  `[tbw-grid-angular] <tbw-grid-responsive-card> found but ResponsivePlugin is not configured.
1095
1793
  Add ResponsivePlugin to your gridConfig.plugins array:
1096
1794
 
1097
- import { ResponsivePlugin } from "@toolbox-web/grid/all";
1795
+ import { ResponsivePlugin } from "@toolbox-web/grid/plugins/responsive";
1098
1796
  gridConfig = {
1099
1797
  plugins: [new ResponsivePlugin({ breakpoint: 600 })]
1100
1798
  };`
@@ -1102,27 +1800,39 @@ Add ResponsivePlugin to your gridConfig.plugins array:
1102
1800
  }
1103
1801
  ngOnDestroy() {
1104
1802
  const e = this.elementRef.nativeElement;
1105
- e && (this.cellCommitListener && (e.removeEventListener("cell-commit", this.cellCommitListener), this.cellCommitListener = null), this.rowCommitListener && (e.removeEventListener("row-commit", this.rowCommitListener), this.rowCommitListener = null)), e && this.customStyles() && e.unregisterStyles?.("angular-custom-styles"), this.adapter && (this.adapter.destroy?.(), this.adapter = null);
1803
+ if (e) {
1804
+ for (const [t, n] of this.eventListeners)
1805
+ e.removeEventListener(t, n);
1806
+ this.eventListeners.clear();
1807
+ }
1808
+ e && this.customStyles() && e.unregisterStyles?.("angular-custom-styles"), this.adapter && (this.adapter.destroy?.(), this.adapter = null);
1106
1809
  }
1107
1810
  }
1108
- ne = h(null), Y = v(ne, 0, "Grid", Me, Y), g(ne, 1, Y);
1811
+ se = E(null), Y = b(se, 0, "Grid", Me, Y), y(se, 1, Y);
1109
1812
  export {
1110
- lt as AngularGridAdapter,
1813
+ ct as AngularGridAdapter,
1111
1814
  H as BaseGridEditor,
1112
- _e as GRID_TYPE_DEFAULTS,
1815
+ qe as GRID_TYPE_DEFAULTS,
1113
1816
  Y as Grid,
1114
- V as GridColumnEditor,
1115
- N as GridColumnView,
1116
- _ as GridDetailView,
1117
- G as GridFormArray,
1118
- q as GridResponsiveCard,
1119
- $ as GridToolPanel,
1120
- M as GridTypeRegistry,
1817
+ q as GridColumnEditor,
1818
+ _ as GridColumnView,
1819
+ $ as GridDetailView,
1820
+ z as GridFormArray,
1821
+ B as GridResponsiveCard,
1822
+ U as GridToolPanel,
1823
+ I as GridTypeRegistry,
1121
1824
  W as TbwCellEditor,
1122
- U as TbwCellView,
1825
+ J as TbwCellView,
1123
1826
  W as TbwEditor,
1124
- U as TbwRenderer,
1827
+ J as TbwRenderer,
1828
+ wt as clearFeatureRegistry,
1829
+ tt as createPluginFromFeature,
1830
+ Rt as getFeatureFactory,
1125
1831
  rt as getFormArrayContext,
1126
- ve as isComponentClass,
1127
- ft as provideGridTypeDefaults
1832
+ Ct as getRegisteredFeatures,
1833
+ gt as injectGrid,
1834
+ we as isComponentClass,
1835
+ Et as isFeatureRegistered,
1836
+ ft as provideGridTypeDefaults,
1837
+ yt as registerFeature
1128
1838
  };