@toolbox-web/grid-angular 0.4.0 → 0.5.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/index.js CHANGED
@@ -1,31 +1,32 @@
1
- var Oe = Object.create;
2
- var O = Object.defineProperty;
3
- var Ne = Object.getOwnPropertyDescriptor;
4
- var ie = (n, e) => (e = Symbol[n]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + n), D = (n) => {
1
+ var qe = Object.create;
2
+ var j = Object.defineProperty;
3
+ var $e = Object.getOwnPropertyDescriptor;
4
+ var ue = (n, e) => (e = Symbol[n]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + n), I = (n) => {
5
5
  throw TypeError(n);
6
6
  };
7
- var Me = (n, e, t) => e in n ? O(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
8
- var te = (n, e) => O(n, "name", { value: e, configurable: !0 });
9
- var h = (n) => [, , , Oe(n?.[ie("metadata")] ?? null)], se = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], A = (n) => n !== void 0 && typeof n != "function" ? D("Function expected") : n, Ve = (n, e, t, r, i) => ({ kind: se[n], name: e, metadata: r, addInitializer: (s) => t._ ? D("Already initialized") : i.push(A(s || null)) }), _e = (n, e) => Me(e, ie("metadata"), n[3]), g = (n, e, t, r) => {
10
- for (var i = 0, s = n[e >> 1], o = s && s.length; i < o; i++) e & 1 ? s[i].call(t) : r = s[i].call(t, r);
11
- return r;
12
- }, v = (n, e, t, r, i, s) => {
13
- var o, l, w, u, d, a = e & 7, T = !!(e & 8), f = !!(e & 16), S = a > 3 ? n.length + 1 : a ? T ? 1 : 2 : 0, Z = se[a + 5], ee = a > 3 && (n[S - 1] = []), je = n[S] || (n[S] = []), p = a && (!f && !T && (i = i.prototype), a < 5 && (a > 3 || !f) && Ne(a < 4 ? i : { get [t]() {
14
- return ne(this, s);
15
- }, set [t](m) {
16
- return re(this, s, m);
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);
17
17
  } }, t));
18
- a ? f && a < 4 && te(s, (a > 2 ? "set " : a > 1 ? "get " : "") + t) : te(i, t);
19
- for (var I = r.length - 1; I >= 0; I--)
20
- u = Ve(a, t, w = {}, n[3], je), a && (u.static = T, u.private = f, d = u.access = { has: f ? (m) => xe(i, m) : (m) => t in m }, a ^ 3 && (d.get = f ? (m) => (a ^ 1 ? ne : qe)(m, i, a ^ 4 ? s : p.get) : (m) => m[t]), a > 2 && (d.set = f ? (m, j) => re(m, i, j, a ^ 4 ? s : p.set) : (m, j) => m[t] = j)), l = (0, r[I])(a ? a < 4 ? f ? s : p[Z] : a > 4 ? void 0 : { get: p.get, set: p.set } : i, u), w._ = 1, a ^ 4 || l === void 0 ? A(l) && (a > 4 ? ee.unshift(l) : a ? f ? s = l : p[Z] = l : i = l) : typeof l != "object" || l === null ? D("Object expected") : (A(o = l.get) && (p.get = o), A(o = l.set) && (p.set = o), A(o = l.init) && ee.unshift(o));
21
- return a || _e(n, i), p && O(i, t, p), f ? a ^ 4 ? s : p : i;
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;
22
22
  };
23
- var N = (n, e, t) => e.has(n) || D("Cannot " + t), xe = (n, e) => Object(e) !== e ? D('Cannot use the "in" operator on this value') : n.has(e), ne = (n, e, t) => (N(n, e, "read from private field"), t ? t.call(n) : e.get(n));
24
- var re = (n, e, t, r) => (N(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), qe = (n, e, t) => (N(n, e, "access private method"), t);
25
- import { inject as c, ElementRef as C, contentChild as L, TemplateRef as b, effect as E, Directive as y, input as R, InjectionToken as ke, Injectable as $e, makeEnvironmentProviders as Ge, EventEmitter as oe, createComponent as ae, EnvironmentInjector as Ue, ApplicationRef as We, ViewContainerRef as Fe, output as le } from "@angular/core";
26
- import { DataGridElement as He } from "@toolbox-web/grid";
27
- import { MasterDetailPlugin as ce, ResponsivePlugin as Be } from "@toolbox-web/grid/all";
28
- function me(n) {
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) {
29
30
  if (typeof n != "function" || n.prototype === void 0)
30
31
  return !1;
31
32
  if (Object.prototype.hasOwnProperty.call(n, "ɵcmp") || Object.prototype.hasOwnProperty.call(n, "ɵfac"))
@@ -33,22 +34,22 @@ function me(n) {
33
34
  const e = Function.prototype.toString.call(n);
34
35
  return e.startsWith("class ") || e.startsWith("class{");
35
36
  }
36
- const be = /* @__PURE__ */ new Map();
37
- function Te(n) {
38
- return be.get(n);
37
+ const Se = /* @__PURE__ */ new Map();
38
+ function Pe(n) {
39
+ return Se.get(n);
39
40
  }
40
- var fe, U;
41
- fe = [y({ selector: "tbw-grid-column-editor" })];
42
- class M {
43
- elementRef = c(C);
41
+ var Ce, X;
42
+ Ce = [E({ selector: "tbw-grid-column-editor" })];
43
+ class V {
44
+ elementRef = u(R);
44
45
  /**
45
46
  * Query for the ng-template content child.
46
47
  */
47
- template = L(b);
48
+ template = x(L);
48
49
  /** Effect that triggers when the template is available */
49
- onTemplateReceived = E(() => {
50
+ onTemplateReceived = y(() => {
50
51
  const e = this.template();
51
- e && be.set(this.elementRef.nativeElement, e);
52
+ e && Se.set(this.elementRef.nativeElement, e);
52
53
  });
53
54
  /**
54
55
  * Static type guard for template context.
@@ -58,23 +59,23 @@ class M {
58
59
  return !0;
59
60
  }
60
61
  }
61
- U = h(null), M = v(U, 0, "GridColumnEditor", fe, M), g(U, 1, M);
62
- const Ae = /* @__PURE__ */ new Map();
63
- function De(n) {
64
- return Ae.get(n);
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);
65
66
  }
66
- var he, W;
67
- he = [y({ selector: "tbw-grid-column-view" })];
68
- class V {
69
- elementRef = c(C);
67
+ var ye, z;
68
+ ye = [E({ selector: "tbw-grid-column-view" })];
69
+ class N {
70
+ elementRef = u(R);
70
71
  /**
71
72
  * Query for the ng-template content child.
72
73
  */
73
- template = L(b);
74
+ template = x(L);
74
75
  /** Effect that triggers when the template is available */
75
- onTemplateReceived = E(() => {
76
+ onTemplateReceived = y(() => {
76
77
  const e = this.template();
77
- e && Ae.set(this.elementRef.nativeElement, e);
78
+ e && Fe.set(this.elementRef.nativeElement, e);
78
79
  });
79
80
  /**
80
81
  * Static type guard for template context.
@@ -84,29 +85,29 @@ class V {
84
85
  return !0;
85
86
  }
86
87
  }
87
- W = h(null), V = v(W, 0, "GridColumnView", he, V), g(W, 1, V);
88
- const Le = /* @__PURE__ */ new Map();
89
- function ue(n) {
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) {
90
91
  const e = n.querySelector("tbw-grid-detail");
91
92
  if (e)
92
- return Le.get(e);
93
+ return ke.get(e);
93
94
  }
94
- var ge, F;
95
- ge = [y({ selector: "tbw-grid-detail" })];
95
+ var be, B;
96
+ be = [E({ selector: "tbw-grid-detail" })];
96
97
  class _ {
97
- elementRef = c(C);
98
+ elementRef = u(R);
98
99
  /** Whether to show the expand/collapse column. Default: true */
99
- showExpandColumn = R(!0);
100
+ showExpandColumn = f(!0);
100
101
  /** Animation style for expand/collapse. Default: 'slide' */
101
- animation = R("slide");
102
+ animation = f("slide");
102
103
  /**
103
104
  * Query for the ng-template content child.
104
105
  */
105
- template = L(b);
106
+ template = x(L);
106
107
  /** Effect that triggers when the template is available */
107
- onTemplateReceived = E(() => {
108
+ onTemplateReceived = y(() => {
108
109
  const e = this.template();
109
- e && Le.set(this.elementRef.nativeElement, e);
110
+ e && ke.set(this.elementRef.nativeElement, e);
110
111
  });
111
112
  /**
112
113
  * Static type guard for template context.
@@ -116,29 +117,146 @@ class _ {
116
117
  return !0;
117
118
  }
118
119
  }
119
- F = h(null), _ = v(F, 0, "GridDetailView", ge, _), g(F, 1, _);
120
- const Pe = /* @__PURE__ */ new Map();
121
- function Ye(n) {
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];
124
+ }
125
+ var Te, J;
126
+ Te = [E({
127
+ selector: "tbw-grid[formArray]"
128
+ })];
129
+ class G {
130
+ elementRef = u(R);
131
+ cellCommitListener = null;
132
+ touchListener = null;
133
+ /**
134
+ * The FormArray to bind to the grid.
135
+ */
136
+ formArray = f.required();
137
+ /**
138
+ * Effect that syncs the FormArray value to the grid rows.
139
+ */
140
+ syncFormArrayToGrid = y(() => {
141
+ const e = this.formArray(), t = this.elementRef.nativeElement;
142
+ t && e && (t.rows = e.getRawValue());
143
+ });
144
+ ngOnInit() {
145
+ const e = this.elementRef.nativeElement;
146
+ e && (this.#r(e), this.cellCommitListener = (t) => {
147
+ const i = t.detail;
148
+ this.#i(i);
149
+ }, e.addEventListener("cell-commit", this.cellCommitListener), this.touchListener = () => {
150
+ this.formArray().markAsTouched(), this.touchListener && (e.removeEventListener("click", this.touchListener), this.touchListener = null);
151
+ }, e.addEventListener("click", this.touchListener));
152
+ }
153
+ ngOnDestroy() {
154
+ 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
+ }
157
+ /**
158
+ * Checks if the FormArray contains FormGroups.
159
+ */
160
+ #t() {
161
+ const e = this.formArray();
162
+ return e.length === 0 ? !1 : e.at(0) instanceof he;
163
+ }
164
+ /**
165
+ * Gets the FormGroup at a specific row index.
166
+ */
167
+ #e(e) {
168
+ const i = this.formArray().at(e);
169
+ return i instanceof he ? i : void 0;
170
+ }
171
+ /**
172
+ * Stores the FormArrayContext on the grid element.
173
+ */
174
+ #r(e) {
175
+ const t = (r) => this.#e(r), i = {
176
+ getRow: (r) => {
177
+ const s = this.formArray().at(r);
178
+ return s ? s.value : null;
179
+ },
180
+ updateField: (r, o, s) => {
181
+ const l = t(r);
182
+ if (l) {
183
+ const m = l.get(o);
184
+ m && (m.setValue(s), m.markAsDirty());
185
+ }
186
+ },
187
+ getValue: () => this.formArray().getRawValue(),
188
+ hasFormGroups: this.#t(),
189
+ getControl: (r, o) => {
190
+ const s = t(r);
191
+ if (s)
192
+ return s.get(o) ?? void 0;
193
+ },
194
+ getRowFormGroup: t,
195
+ isRowValid: (r) => {
196
+ const o = t(r);
197
+ return o ? o.valid : !0;
198
+ },
199
+ isRowTouched: (r) => {
200
+ const o = t(r);
201
+ return o ? o.touched : !1;
202
+ },
203
+ isRowDirty: (r) => {
204
+ const o = t(r);
205
+ return o ? o.dirty : !1;
206
+ },
207
+ getRowErrors: (r) => {
208
+ const o = t(r);
209
+ if (!o) return null;
210
+ const s = {};
211
+ 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);
215
+ }), o.errors && (s._group = o.errors, l = !0), l ? s : null;
216
+ }
217
+ };
218
+ e[ie] = i;
219
+ }
220
+ /**
221
+ * Clears the FormArrayContext from the grid element.
222
+ */
223
+ #n(e) {
224
+ delete e[ie];
225
+ }
226
+ /**
227
+ * Handles cell-commit events by updating the FormControl in the FormGroup.
228
+ */
229
+ #i(e) {
230
+ const { rowIndex: t, field: i, value: r } = e, o = this.#e(t);
231
+ if (o) {
232
+ const s = o.get(i);
233
+ s && (s.setValue(r), s.markAsDirty(), s.markAsTouched());
234
+ }
235
+ }
236
+ }
237
+ J = h(null), G = v(J, 0, "GridFormArray", Te, G), g(J, 1, G);
238
+ const Ve = /* @__PURE__ */ new Map();
239
+ function nt(n) {
122
240
  const e = n.querySelector("tbw-grid-responsive-card");
123
241
  if (e)
124
- return Pe.get(e);
242
+ return Ve.get(e);
125
243
  }
126
- var ve, H;
127
- ve = [y({
244
+ var Ae, K;
245
+ Ae = [E({
128
246
  selector: "tbw-grid-responsive-card"
129
247
  })];
130
- class x {
131
- elementRef = c(C);
248
+ class q {
249
+ elementRef = u(R);
132
250
  /**
133
251
  * The ng-template containing the card content.
134
252
  */
135
- template = L(b);
253
+ template = x(L);
136
254
  /**
137
255
  * Effect that registers the template when it becomes available.
138
256
  */
139
- onTemplateReceived = E(() => {
257
+ onTemplateReceived = y(() => {
140
258
  const e = this.template();
141
- e && Pe.set(
259
+ e && Ve.set(
142
260
  this.elementRef.nativeElement,
143
261
  e
144
262
  );
@@ -150,38 +268,38 @@ class x {
150
268
  return !0;
151
269
  }
152
270
  }
153
- H = h(null), x = v(H, 0, "GridResponsiveCard", ve, x), g(H, 1, x);
154
- const Se = /* @__PURE__ */ new Map();
155
- function ze(n) {
156
- return Se.get(n);
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);
157
275
  }
158
- var Re, B;
159
- Re = [y({ selector: "tbw-grid-tool-panel" })];
160
- class q {
161
- elementRef = c(C);
276
+ var Le, Q;
277
+ Le = [E({ selector: "tbw-grid-tool-panel" })];
278
+ class $ {
279
+ elementRef = u(R);
162
280
  /** Unique panel identifier (required) */
163
- id = R.required({ alias: "id" });
281
+ id = f.required({ alias: "id" });
164
282
  /** Panel title shown in accordion header (required) */
165
- title = R.required({ alias: "title" });
283
+ title = f.required({ alias: "title" });
166
284
  /** Icon for accordion section header (emoji or text) */
167
- icon = R();
285
+ icon = f();
168
286
  /** Tooltip for accordion section header */
169
- tooltip = R();
287
+ tooltip = f();
170
288
  /** Panel order priority (lower = first, default: 100) */
171
- order = R(100);
289
+ order = f(100);
172
290
  /**
173
291
  * Query for the ng-template content child.
174
292
  */
175
- template = L(b);
293
+ template = x(L);
176
294
  /** Effect that triggers when the template is available */
177
- onTemplateReceived = E(() => {
295
+ onTemplateReceived = y(() => {
178
296
  const e = this.template(), t = this.elementRef.nativeElement;
179
297
  if (e) {
180
298
  t.setAttribute("id", this.id()), t.setAttribute("title", this.title());
181
- const r = this.icon();
182
- r && t.setAttribute("icon", r);
183
- const i = this.tooltip();
184
- i && t.setAttribute("tooltip", i), t.setAttribute("order", String(this.order())), Se.set(t, e);
299
+ const i = this.icon();
300
+ i && t.setAttribute("icon", i);
301
+ const r = this.tooltip();
302
+ r && t.setAttribute("tooltip", r), t.setAttribute("order", String(this.order())), Ne.set(t, e);
185
303
  }
186
304
  });
187
305
  /**
@@ -192,30 +310,30 @@ class q {
192
310
  return !0;
193
311
  }
194
312
  }
195
- B = h(null), q = v(B, 0, "GridToolPanel", Re, q), g(B, 1, q);
196
- const Q = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map();
197
- function Je(n) {
198
- const e = Q.get(n);
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);
199
317
  if (e) return e;
200
318
  const t = n.querySelector("tbw-grid-column-view");
201
319
  if (t)
202
- return De(t);
320
+ return je(t);
203
321
  }
204
- function Ke(n) {
205
- const e = X.get(n);
322
+ function st(n) {
323
+ const e = se.get(n);
206
324
  if (e) return e;
207
325
  const t = n.querySelector("tbw-grid-column-editor");
208
326
  if (t)
209
- return Te(t);
327
+ return Pe(t);
210
328
  }
211
- var we, Y;
212
- we = [y({ selector: "[tbwRenderer]" })];
213
- class k {
214
- template = c(b);
215
- elementRef = c(C);
329
+ var De, Z;
330
+ De = [E({ selector: "[tbwRenderer]" })];
331
+ class U {
332
+ template = u(L);
333
+ elementRef = u(R);
216
334
  columnElement = null;
217
335
  constructor() {
218
- E(() => {
336
+ y(() => {
219
337
  this.registerTemplate();
220
338
  });
221
339
  }
@@ -223,10 +341,10 @@ class k {
223
341
  let e = this.elementRef.nativeElement?.parentElement;
224
342
  for (; e && e.tagName !== "TBW-GRID-COLUMN"; )
225
343
  e = e.parentElement;
226
- e && (this.columnElement = e, Q.set(e, this.template));
344
+ e && (this.columnElement = e, oe.set(e, this.template));
227
345
  }
228
346
  ngOnDestroy() {
229
- this.columnElement && Q.delete(this.columnElement);
347
+ this.columnElement && oe.delete(this.columnElement);
230
348
  }
231
349
  /**
232
350
  * Static type guard for template context.
@@ -236,15 +354,15 @@ class k {
236
354
  return !0;
237
355
  }
238
356
  }
239
- Y = h(null), k = v(Y, 0, "TbwRenderer", we, k), g(Y, 1, k);
240
- var Ce, z;
241
- Ce = [y({ selector: "[tbwEditor]" })];
242
- class $ {
243
- template = c(b);
244
- elementRef = c(C);
357
+ Z = h(null), U = v(Z, 0, "TbwRenderer", De, U), g(Z, 1, U);
358
+ var Oe, ee;
359
+ Oe = [E({ selector: "[tbwEditor]" })];
360
+ class W {
361
+ template = u(L);
362
+ elementRef = u(R);
245
363
  columnElement = null;
246
364
  constructor() {
247
- E(() => {
365
+ y(() => {
248
366
  this.registerTemplate();
249
367
  });
250
368
  }
@@ -252,10 +370,10 @@ class $ {
252
370
  let e = this.elementRef.nativeElement?.parentElement;
253
371
  for (; e && e.tagName !== "TBW-GRID-COLUMN"; )
254
372
  e = e.parentElement;
255
- e && (this.columnElement = e, X.set(e, this.template));
373
+ e && (this.columnElement = e, se.set(e, this.template));
256
374
  }
257
375
  ngOnDestroy() {
258
- this.columnElement && X.delete(this.columnElement);
376
+ this.columnElement && se.delete(this.columnElement);
259
377
  }
260
378
  /**
261
379
  * Static type guard for template context.
@@ -265,17 +383,17 @@ class $ {
265
383
  return !0;
266
384
  }
267
385
  }
268
- z = h(null), $ = v(z, 0, "TbwEditor", Ce, $), g(z, 1, $);
269
- const Ie = new ke("GRID_TYPE_DEFAULTS");
270
- var Ee, J;
271
- Ee = [$e({ providedIn: "root" })];
272
- class P {
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 {
273
391
  defaults = /* @__PURE__ */ new Map();
274
392
  constructor() {
275
- const e = c(Ie, { optional: !0 });
393
+ const e = u(_e, { optional: !0 });
276
394
  if (e)
277
- for (const [t, r] of Object.entries(e))
278
- this.defaults.set(t, r);
395
+ for (const [t, i] of Object.entries(e))
396
+ this.defaults.set(t, i);
279
397
  }
280
398
  /**
281
399
  * Register type-level defaults for a custom type.
@@ -326,23 +444,23 @@ class P {
326
444
  };
327
445
  }
328
446
  }
329
- J = h(null), P = v(J, 0, "GridTypeRegistry", Ee, P), g(J, 1, P);
330
- function nt(n) {
331
- return Ge([{ provide: Ie, useValue: n }]);
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 }]);
332
450
  }
333
- function de(n) {
334
- const e = Je(n);
335
- return e || De(n);
451
+ function Re(n) {
452
+ const e = ot(n);
453
+ return e || je(n);
336
454
  }
337
- function pe(n) {
338
- const e = Ke(n);
339
- return e || Te(n);
455
+ function Ee(n) {
456
+ const e = st(n);
457
+ return e || Pe(n);
340
458
  }
341
- class Qe {
342
- constructor(e, t, r) {
343
- this.injector = e, this.appRef = t, this.viewContainerRef = r, window.__ANGULAR_GRID_ADAPTER__ = this;
459
+ class lt {
460
+ constructor(e, t, i) {
461
+ this.injector = e, this.appRef = t, this.viewContainerRef = i, window.__ANGULAR_GRID_ADAPTER__ = this;
344
462
  try {
345
- this.typeRegistry = this.injector.get(P, null);
463
+ this.typeRegistry = this.injector.get(M, null);
346
464
  } catch {
347
465
  }
348
466
  }
@@ -378,7 +496,7 @@ class Qe {
378
496
  processGridConfig(e) {
379
497
  if (!e.columns)
380
498
  return e;
381
- const t = e.columns.map((r) => this.processColumn(r));
499
+ const t = e.columns.map((i) => this.processColumn(i));
382
500
  return {
383
501
  ...e,
384
502
  columns: t
@@ -393,14 +511,14 @@ class Qe {
393
511
  */
394
512
  processColumn(e) {
395
513
  const t = { ...e };
396
- return e.renderer && me(e.renderer) && (t.renderer = this.createComponentRenderer(e.renderer)), e.editor && me(e.editor) && (t.editor = this.createComponentEditor(e.editor)), t;
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;
397
515
  }
398
516
  /**
399
517
  * Determines if this adapter can handle the given element.
400
518
  * Checks if a template is registered for this element (structural or nested).
401
519
  */
402
520
  canHandle(e) {
403
- return de(e) !== void 0 || pe(e) !== void 0;
521
+ return Re(e) !== void 0 || Ee(e) !== void 0;
404
522
  }
405
523
  /**
406
524
  * Creates a view renderer function that creates an embedded view
@@ -410,16 +528,16 @@ class Qe {
410
528
  * allowing the grid to use its default rendering.
411
529
  */
412
530
  createRenderer(e) {
413
- const t = de(e);
531
+ const t = Re(e);
414
532
  if (t)
415
- return (r) => {
416
- const i = {
417
- $implicit: r.value,
418
- value: r.value,
419
- row: r.row,
420
- column: r.column
421
- }, s = this.viewContainerRef.createEmbeddedView(t, i);
422
- return this.viewRefs.push(s), s.detectChanges(), s.rootNodes[0];
533
+ return (i) => {
534
+ const r = {
535
+ $implicit: i.value,
536
+ value: i.value,
537
+ row: i.row,
538
+ column: i.column
539
+ }, o = this.viewContainerRef.createEmbeddedView(t, r);
540
+ return this.viewRefs.push(o), o.detectChanges(), o.rootNodes[0];
423
541
  };
424
542
  }
425
543
  /**
@@ -441,30 +559,43 @@ class Qe {
441
559
  * As long as the component emits `(commit)` with the new value.
442
560
  */
443
561
  createEditor(e) {
444
- const t = pe(e);
562
+ const t = Ee(e), i = e.closest("tbw-grid");
445
563
  return t ? (r) => {
446
- const i = (a) => r.commit(a), s = () => r.cancel(), o = new oe(), l = new oe();
447
- o.subscribe((a) => r.commit(a)), l.subscribe(() => r.cancel());
448
- const w = {
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));
574
+ }
575
+ }
576
+ }
577
+ const T = {
449
578
  $implicit: r.value,
450
579
  value: r.value,
451
580
  row: r.row,
452
581
  column: r.column,
453
582
  // Preferred: simple callback functions
454
- onCommit: i,
583
+ onCommit: o,
455
584
  onCancel: s,
585
+ // FormControl from FormArray (if available)
586
+ control: d,
456
587
  // Deprecated: EventEmitters (for backwards compatibility)
457
- commit: o,
458
- cancel: l
459
- }, u = this.viewContainerRef.createEmbeddedView(t, w);
460
- this.viewRefs.push(u), u.detectChanges();
461
- const d = u.rootNodes[0];
462
- return d && d.addEventListener && (d.addEventListener("commit", (a) => {
463
- const T = a;
464
- r.commit(T.detail);
465
- }), d.addEventListener("cancel", () => {
588
+ 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", () => {
466
597
  r.cancel();
467
- })), d;
598
+ })), C;
468
599
  } : (console.warn("[AngularGridAdapter] No editor template registered for element"), () => document.createElement("div"));
469
600
  }
470
601
  /**
@@ -472,16 +603,16 @@ class Qe {
472
603
  * Renders Angular templates for expandable detail rows.
473
604
  */
474
605
  createDetailRenderer(e) {
475
- const t = ue(e);
606
+ const t = we(e);
476
607
  if (t)
477
- return (r) => {
478
- const i = {
479
- $implicit: r,
480
- row: r
481
- }, s = this.viewContainerRef.createEmbeddedView(t, i);
482
- this.viewRefs.push(s), s.detectChanges();
483
- const o = document.createElement("div");
484
- return s.rootNodes.forEach((l) => o.appendChild(l)), o;
608
+ return (i) => {
609
+ const r = {
610
+ $implicit: i,
611
+ row: i
612
+ }, o = this.viewContainerRef.createEmbeddedView(t, r);
613
+ this.viewRefs.push(o), o.detectChanges();
614
+ const s = document.createElement("div");
615
+ return o.rootNodes.forEach((l) => s.appendChild(l)), s;
485
616
  };
486
617
  }
487
618
  /**
@@ -492,16 +623,16 @@ class Qe {
492
623
  * without manual configuration in the Grid directive.
493
624
  */
494
625
  parseDetailElement(e) {
495
- const t = ue(e.closest("tbw-grid"));
626
+ const t = we(e.closest("tbw-grid"));
496
627
  if (t)
497
- return (r) => {
498
- const i = {
499
- $implicit: r,
500
- row: r
501
- }, s = this.viewContainerRef.createEmbeddedView(t, i);
502
- this.viewRefs.push(s), s.detectChanges();
503
- const o = document.createElement("div");
504
- return s.rootNodes.forEach((l) => o.appendChild(l)), o;
628
+ return (i) => {
629
+ const r = {
630
+ $implicit: i,
631
+ row: i
632
+ }, o = this.viewContainerRef.createEmbeddedView(t, r);
633
+ this.viewRefs.push(o), o.detectChanges();
634
+ const s = document.createElement("div");
635
+ return o.rootNodes.forEach((l) => s.appendChild(l)), s;
505
636
  };
506
637
  }
507
638
  /**
@@ -512,17 +643,17 @@ class Qe {
512
643
  * @returns A card renderer function or undefined if no template is found
513
644
  */
514
645
  createResponsiveCardRenderer(e) {
515
- const t = Ye(e);
646
+ const t = nt(e);
516
647
  if (t)
517
- return (r, i) => {
518
- const s = {
519
- $implicit: r,
520
- row: r,
521
- index: i
522
- }, o = this.viewContainerRef.createEmbeddedView(t, s);
523
- this.viewRefs.push(o), o.detectChanges();
648
+ return (i, r) => {
649
+ const o = {
650
+ $implicit: i,
651
+ row: i,
652
+ index: r
653
+ }, s = this.viewContainerRef.createEmbeddedView(t, o);
654
+ this.viewRefs.push(s), s.detectChanges();
524
655
  const l = document.createElement("div");
525
- return o.rootNodes.forEach((w) => l.appendChild(w)), l;
656
+ return s.rootNodes.forEach((m) => l.appendChild(m)), l;
526
657
  };
527
658
  }
528
659
  /**
@@ -530,18 +661,18 @@ class Qe {
530
661
  * The renderer creates an Angular template-based panel content.
531
662
  */
532
663
  createToolPanelRenderer(e) {
533
- const t = ze(e);
664
+ const t = it(e);
534
665
  if (!t)
535
666
  return;
536
- const r = e.closest("tbw-grid");
537
- return (i) => {
538
- const s = {
539
- $implicit: r ?? i,
540
- grid: r ?? i
541
- }, o = this.viewContainerRef.createEmbeddedView(t, s);
542
- return this.viewRefs.push(o), o.detectChanges(), o.rootNodes.forEach((l) => i.appendChild(l)), () => {
543
- const l = this.viewRefs.indexOf(o);
544
- l > -1 && this.viewRefs.splice(l, 1), o.destroy();
667
+ const i = e.closest("tbw-grid");
668
+ return (r) => {
669
+ const o = {
670
+ $implicit: i ?? r,
671
+ grid: i ?? r
672
+ }, s = this.viewContainerRef.createEmbeddedView(t, o);
673
+ return this.viewRefs.push(s), s.detectChanges(), s.rootNodes.forEach((l) => r.appendChild(l)), () => {
674
+ const l = this.viewRefs.indexOf(s);
675
+ l > -1 && this.viewRefs.splice(l, 1), s.destroy();
545
676
  };
546
677
  };
547
678
  }
@@ -578,10 +709,10 @@ class Qe {
578
709
  const t = this.typeRegistry.get(e);
579
710
  if (!t)
580
711
  return;
581
- const r = {
712
+ const i = {
582
713
  editorParams: t.editorParams
583
714
  };
584
- return t.renderer && (r.renderer = this.createComponentRenderer(t.renderer)), t.editor && (r.editor = this.createComponentEditor(t.editor)), r;
715
+ return t.renderer && (i.renderer = this.createComponentRenderer(t.renderer)), t.editor && (i.editor = this.createComponentEditor(t.editor)), i;
585
716
  }
586
717
  /**
587
718
  * Creates a renderer function from an Angular component class.
@@ -589,17 +720,17 @@ class Qe {
589
720
  */
590
721
  createComponentRenderer(e) {
591
722
  return (t) => {
592
- const r = document.createElement("span");
593
- r.style.display = "contents";
594
- const i = ae(e, {
723
+ const i = document.createElement("span");
724
+ i.style.display = "contents";
725
+ const r = pe(e, {
595
726
  environmentInjector: this.injector,
596
- hostElement: r
727
+ hostElement: i
597
728
  });
598
- return this.setComponentInputs(i, {
729
+ return this.setComponentInputs(r, {
599
730
  value: t.value,
600
731
  row: t.row,
601
732
  column: t.column
602
- }), this.appRef.attachView(i.hostView), this.componentRefs.push(i), i.changeDetectorRef.detectChanges(), r;
733
+ }), this.appRef.attachView(r.hostView), this.componentRefs.push(r), r.changeDetectorRef.detectChanges(), i;
603
734
  };
604
735
  }
605
736
  /**
@@ -608,24 +739,24 @@ class Qe {
608
739
  */
609
740
  createComponentEditor(e) {
610
741
  return (t) => {
611
- const r = document.createElement("span");
612
- r.style.display = "contents";
613
- const i = ae(e, {
742
+ const i = document.createElement("span");
743
+ i.style.display = "contents";
744
+ const r = pe(e, {
614
745
  environmentInjector: this.injector,
615
- hostElement: r
746
+ hostElement: i
616
747
  });
617
- this.setComponentInputs(i, {
748
+ this.setComponentInputs(r, {
618
749
  value: t.value,
619
750
  row: t.row,
620
751
  column: t.column
621
- }), this.appRef.attachView(i.hostView), this.componentRefs.push(i), i.changeDetectorRef.detectChanges();
622
- const s = i.instance;
623
- return this.subscribeToOutput(s, "commit", (o) => t.commit(o)), this.subscribeToOutput(s, "cancel", () => t.cancel()), r.addEventListener("commit", (o) => {
624
- const l = o;
752
+ }), this.appRef.attachView(r.hostView), this.componentRefs.push(r), r.changeDetectorRef.detectChanges();
753
+ 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
+ const l = s;
625
756
  t.commit(l.detail);
626
- }), r.addEventListener("cancel", () => {
757
+ }), i.addEventListener("cancel", () => {
627
758
  t.cancel();
628
- }), r;
759
+ }), i;
629
760
  };
630
761
  }
631
762
  /**
@@ -633,18 +764,18 @@ class Qe {
633
764
  * Works with both EventEmitter and OutputEmitterRef (signal outputs).
634
765
  * @internal
635
766
  */
636
- subscribeToOutput(e, t, r) {
637
- const i = e[t];
638
- i && typeof i.subscribe == "function" && i.subscribe(r);
767
+ subscribeToOutput(e, t, i) {
768
+ const r = e[t];
769
+ r && typeof r.subscribe == "function" && r.subscribe(i);
639
770
  }
640
771
  /**
641
772
  * Sets component inputs using Angular's setInput API.
642
773
  * @internal
643
774
  */
644
775
  setComponentInputs(e, t) {
645
- for (const [r, i] of Object.entries(t))
776
+ for (const [i, r] of Object.entries(t))
646
777
  try {
647
- e.setInput(r, i);
778
+ e.setInput(i, r);
648
779
  } catch {
649
780
  }
650
781
  }
@@ -656,21 +787,155 @@ class Qe {
656
787
  this.viewRefs.forEach((e) => e.destroy()), this.viewRefs = [], this.componentRefs.forEach((e) => e.destroy()), this.componentRefs = [];
657
788
  }
658
789
  }
659
- var ye, K;
660
- ye = [y({ selector: "tbw-grid" })];
661
- class G {
662
- elementRef = c(C);
663
- injector = c(Ue);
664
- appRef = c(We);
665
- viewContainerRef = c(Fe);
790
+ var xe, re;
791
+ xe = [E()];
792
+ class H {
793
+ elementRef = u(R);
794
+ // ============================================================================
795
+ // Inputs
796
+ // ============================================================================
797
+ /**
798
+ * The cell value. Used when FormControl is not available.
799
+ * When a FormControl is provided, value is derived from control.value instead.
800
+ */
801
+ value = f();
802
+ /**
803
+ * The full row data object.
804
+ */
805
+ row = f();
806
+ /**
807
+ * The column configuration.
808
+ */
809
+ column = f();
810
+ /**
811
+ * The FormControl for this cell, if the grid is bound to a FormArray.
812
+ * When provided, the editor uses control.value instead of the value input.
813
+ */
814
+ control = f();
815
+ // ============================================================================
816
+ // Outputs
817
+ // ============================================================================
818
+ /**
819
+ * Emits when the user commits a new value.
820
+ */
821
+ commit = S();
822
+ /**
823
+ * Emits when the user cancels editing.
824
+ */
825
+ cancel = S();
826
+ // ============================================================================
827
+ // Computed State
828
+ // ============================================================================
829
+ /**
830
+ * The current value, derived from FormControl if available, otherwise from value input.
831
+ * This is the recommended way to get the current value in your editor template.
832
+ */
833
+ currentValue = A(() => {
834
+ const e = this.control();
835
+ return e ? e.value : this.value();
836
+ });
837
+ /**
838
+ * Whether the control is invalid (has validation errors).
839
+ * Returns false if no FormControl is available.
840
+ */
841
+ isInvalid = A(() => this.control()?.invalid ?? !1);
842
+ /**
843
+ * Whether the control is dirty (has been modified).
844
+ * Returns false if no FormControl is available.
845
+ */
846
+ isDirty = A(() => this.control()?.dirty ?? !1);
847
+ /**
848
+ * Whether the control has been touched.
849
+ * Returns false if no FormControl is available.
850
+ */
851
+ isTouched = A(() => this.control()?.touched ?? !1);
852
+ /**
853
+ * Whether the control has any validation errors.
854
+ */
855
+ hasErrors = A(() => {
856
+ const e = this.control();
857
+ return e?.errors != null && Object.keys(e.errors).length > 0;
858
+ });
859
+ /**
860
+ * The first error message from the control's validation errors.
861
+ * Returns an empty string if no errors.
862
+ */
863
+ firstErrorMessage = A(() => {
864
+ const e = this.control();
865
+ if (!e?.errors) return "";
866
+ const t = Object.keys(e.errors)[0];
867
+ return this.getErrorMessage(t, e.errors[t]);
868
+ });
869
+ /**
870
+ * All error messages from the control's validation errors.
871
+ */
872
+ allErrorMessages = A(() => {
873
+ const e = this.control();
874
+ return e?.errors ? Object.entries(e.errors).map(([t, i]) => this.getErrorMessage(t, i)) : [];
875
+ });
876
+ // ============================================================================
877
+ // Methods
878
+ // ============================================================================
879
+ /**
880
+ * Commit a new value. Emits the commit output AND dispatches a DOM event.
881
+ * The DOM event enables the grid's auto-wiring to catch the commit.
882
+ * Call this when the user confirms their edit.
883
+ */
884
+ commitValue(e) {
885
+ this.commit.emit(e), this.elementRef.nativeElement.dispatchEvent(new CustomEvent("commit", { detail: e, bubbles: !0 }));
886
+ }
887
+ /**
888
+ * Cancel editing. Emits the cancel output AND dispatches a DOM event.
889
+ * Call this when the user cancels (e.g., presses Escape).
890
+ */
891
+ cancelEdit() {
892
+ this.cancel.emit(), this.elementRef.nativeElement.dispatchEvent(new CustomEvent("cancel", { bubbles: !0 }));
893
+ }
894
+ /**
895
+ * Get a human-readable error message for a validation error.
896
+ * Override this method to customize error messages for your editor.
897
+ *
898
+ * @param errorKey - The validation error key (e.g., 'required', 'minlength')
899
+ * @param errorValue - The error value (e.g., { requiredLength: 5, actualLength: 3 })
900
+ * @returns A human-readable error message
901
+ */
902
+ getErrorMessage(e, t) {
903
+ switch (e) {
904
+ case "required":
905
+ return "This field is required";
906
+ case "minlength":
907
+ return `Minimum length is ${t?.requiredLength ?? "unknown"}`;
908
+ case "maxlength":
909
+ return `Maximum length is ${t?.requiredLength ?? "unknown"}`;
910
+ case "min":
911
+ return `Minimum value is ${t?.min ?? "unknown"}`;
912
+ case "max":
913
+ return `Maximum value is ${t?.max ?? "unknown"}`;
914
+ case "email":
915
+ return "Invalid email address";
916
+ case "pattern":
917
+ return "Invalid format";
918
+ default:
919
+ return `Invalid value (${e})`;
920
+ }
921
+ }
922
+ }
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" })];
926
+ class Y {
927
+ elementRef = u(R);
928
+ injector = u(Ke);
929
+ appRef = u(Qe);
930
+ viewContainerRef = u(Ze);
666
931
  adapter = null;
667
932
  cellCommitListener = null;
668
933
  constructor() {
669
- E(() => {
934
+ y(() => {
670
935
  const e = this.angularConfig();
671
936
  if (!e || !this.adapter) return;
672
- const t = this.adapter.processGridConfig(e), r = this.elementRef.nativeElement;
673
- r.gridConfig = t;
937
+ const t = this.adapter.processGridConfig(e), i = this.elementRef.nativeElement;
938
+ i.gridConfig = t;
674
939
  });
675
940
  }
676
941
  rowCommitListener = null;
@@ -691,7 +956,7 @@ class G {
691
956
  * <tbw-grid [customStyles]="customStyles">...</tbw-grid>
692
957
  * ```
693
958
  */
694
- customStyles = R();
959
+ customStyles = f();
695
960
  /**
696
961
  * Angular-specific grid configuration that supports component classes for renderers/editors.
697
962
  *
@@ -728,7 +993,7 @@ class G {
728
993
  * ```
729
994
  */
730
995
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
731
- angularConfig = R();
996
+ angularConfig = f();
732
997
  /**
733
998
  * Emitted when a cell value is committed (inline editing).
734
999
  * Provides the row, field, new value, and change tracking information.
@@ -744,7 +1009,7 @@ class G {
744
1009
  * }
745
1010
  * ```
746
1011
  */
747
- cellCommit = le();
1012
+ cellCommit = S();
748
1013
  /**
749
1014
  * Emitted when a row's values are committed (bulk/row editing).
750
1015
  * Provides the row data and change tracking information.
@@ -754,16 +1019,16 @@ class G {
754
1019
  * <tbw-grid (rowCommit)="onRowCommit($event)">...</tbw-grid>
755
1020
  * ```
756
1021
  */
757
- rowCommit = le();
1022
+ rowCommit = S();
758
1023
  ngOnInit() {
759
- this.adapter = new Qe(this.injector, this.appRef, this.viewContainerRef), He.registerAdapter(this.adapter);
1024
+ this.adapter = new lt(this.injector, this.appRef, this.viewContainerRef), et.registerAdapter(this.adapter);
760
1025
  const e = this.elementRef.nativeElement;
761
1026
  this.cellCommitListener = (t) => {
762
- const r = t.detail;
763
- this.cellCommit.emit(r);
1027
+ const i = t.detail;
1028
+ this.cellCommit.emit(i);
764
1029
  }, e.addEventListener("cell-commit", this.cellCommitListener), this.rowCommitListener = (t) => {
765
- const r = t.detail;
766
- this.rowCommit.emit(r);
1030
+ const i = t.detail;
1031
+ this.rowCommit.emit(i);
767
1032
  }, e.addEventListener("row-commit", this.rowCommitListener), e.__frameworkAdapter = this.adapter;
768
1033
  }
769
1034
  ngAfterContentInit() {
@@ -789,26 +1054,26 @@ class G {
789
1054
  */
790
1055
  configureMasterDetail(e) {
791
1056
  if (!this.adapter) return;
792
- const t = e.getPlugin?.(ce);
1057
+ const t = e.getPlugin?.(ge);
793
1058
  if (t && typeof t.refreshDetailRenderer == "function") {
794
1059
  t.refreshDetailRenderer();
795
1060
  return;
796
1061
  }
797
- const r = e.querySelector("tbw-grid-detail");
798
- if (!r) return;
799
- const i = this.adapter.createDetailRenderer(e);
1062
+ const i = e.querySelector("tbw-grid-detail");
800
1063
  if (!i) return;
801
- const s = r.getAttribute("animation");
802
- let o = "slide";
803
- s === "false" ? o = !1 : s === "fade" && (o = "fade");
804
- const l = r.getAttribute("showExpandColumn") !== "false", w = new ce({
805
- detailRenderer: i,
1064
+ const r = this.adapter.createDetailRenderer(e);
1065
+ if (!r) return;
1066
+ const o = i.getAttribute("animation");
1067
+ let s = "slide";
1068
+ o === "false" ? s = !1 : o === "fade" && (s = "fade");
1069
+ const l = i.getAttribute("showExpandColumn") !== "false", m = new ge({
1070
+ detailRenderer: r,
806
1071
  showExpandColumn: l,
807
- animation: o
808
- }), u = e.gridConfig || {}, d = u.plugins || [];
1072
+ animation: s
1073
+ }), d = e.gridConfig || {}, T = d.plugins || [];
809
1074
  e.gridConfig = {
810
- ...u,
811
- plugins: [...d, w]
1075
+ ...d,
1076
+ plugins: [...T, m]
812
1077
  };
813
1078
  }
814
1079
  /**
@@ -818,11 +1083,11 @@ class G {
818
1083
  */
819
1084
  configureResponsiveCard(e) {
820
1085
  if (!this.adapter || !e.querySelector("tbw-grid-responsive-card")) return;
821
- const r = this.adapter.createResponsiveCardRenderer(e);
822
- if (!r) return;
823
- const i = e.getPlugin?.(Be);
824
- if (i) {
825
- i.setCardRenderer(r);
1086
+ const i = this.adapter.createResponsiveCardRenderer(e);
1087
+ if (!i) return;
1088
+ const r = e.getPlugin?.(tt);
1089
+ if (r) {
1090
+ r.setCardRenderer(i);
826
1091
  return;
827
1092
  }
828
1093
  console.warn(
@@ -840,21 +1105,24 @@ Add ResponsivePlugin to your gridConfig.plugins array:
840
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);
841
1106
  }
842
1107
  }
843
- K = h(null), G = v(K, 0, "Grid", ye, G), g(K, 1, G);
1108
+ ne = h(null), Y = v(ne, 0, "Grid", Me, Y), g(ne, 1, Y);
844
1109
  export {
845
- Qe as AngularGridAdapter,
846
- Ie as GRID_TYPE_DEFAULTS,
847
- G as Grid,
848
- M as GridColumnEditor,
849
- V as GridColumnView,
1110
+ lt as AngularGridAdapter,
1111
+ H as BaseGridEditor,
1112
+ _e as GRID_TYPE_DEFAULTS,
1113
+ Y as Grid,
1114
+ V as GridColumnEditor,
1115
+ N as GridColumnView,
850
1116
  _ as GridDetailView,
851
- x as GridResponsiveCard,
852
- q as GridToolPanel,
853
- P as GridTypeRegistry,
854
- $ as TbwCellEditor,
855
- k as TbwCellView,
856
- $ as TbwEditor,
857
- k as TbwRenderer,
858
- me as isComponentClass,
859
- nt as provideGridTypeDefaults
1117
+ G as GridFormArray,
1118
+ q as GridResponsiveCard,
1119
+ $ as GridToolPanel,
1120
+ M as GridTypeRegistry,
1121
+ W as TbwCellEditor,
1122
+ U as TbwCellView,
1123
+ W as TbwEditor,
1124
+ U as TbwRenderer,
1125
+ rt as getFormArrayContext,
1126
+ ve as isComponentClass,
1127
+ ft as provideGridTypeDefaults
860
1128
  };