json-renderers 1.18.8 → 1.20.1

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/docs/dist/min.js CHANGED
@@ -1,13 +1,13 @@
1
- const it = {
2
- version: "v18.0.0",
1
+ const ct = {
2
+ version: "v20.0.0",
3
3
  description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
4
- }, ct = (t) => {
4
+ }, ut = (t) => {
5
5
  const a = t;
6
6
  typeof globalThis > "u" || !a || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderers = {
7
- meta: it,
7
+ meta: ct,
8
8
  render: a
9
9
  });
10
- }, ut = (t) => {
10
+ }, dt = (t) => {
11
11
  const a = (t == null ? void 0 : t.inConfig) ?? t;
12
12
  if (!a || typeof a != "object")
13
13
  throw new TypeError("Config must be an object");
@@ -17,7 +17,7 @@ const it = {
17
17
  if (typeof e != "string")
18
18
  throw new TypeError("type must be a string");
19
19
  return !0;
20
- }, dt = (t) => {
20
+ }, bt = (t) => {
21
21
  const a = (t == null ? void 0 : t.inConfig) ?? t;
22
22
  if (!a || typeof a != "object")
23
23
  throw new TypeError("Config must be an object");
@@ -27,7 +27,7 @@ const it = {
27
27
  if (!Array.isArray(e))
28
28
  throw new TypeError("data must be an Array");
29
29
  return !0;
30
- }, bt = (t) => {
30
+ }, pt = (t) => {
31
31
  const a = (t == null ? void 0 : t.inConfig) ?? t;
32
32
  if (!a || typeof a != "object")
33
33
  throw new TypeError("Config must be an object");
@@ -37,7 +37,7 @@ const it = {
37
37
  if (!Array.isArray(e))
38
38
  throw new TypeError("columns must be an Array");
39
39
  return !0;
40
- }, pt = (t) => {
40
+ }, mt = (t) => {
41
41
  const a = (t == null ? void 0 : t.inConfig) ?? t;
42
42
  if (!a || typeof a != "object")
43
43
  throw new TypeError("Config must be an object");
@@ -49,8 +49,8 @@ const it = {
49
49
  const a = (t == null ? void 0 : t.inConfig) ?? t;
50
50
  if (!a || typeof a != "object" || Array.isArray(a))
51
51
  throw new TypeError("Config must be an object");
52
- return ut(a), dt(a), bt(a), pt(a), !0;
53
- }, mt = (t) => {
52
+ return dt(a), bt(a), pt(a), mt(a), !0;
53
+ }, ht = (t) => {
54
54
  const a = (t == null ? void 0 : t.inConfig) ?? t;
55
55
  if (!a || typeof a != "object")
56
56
  throw new TypeError("Config must be an object");
@@ -62,7 +62,7 @@ const it = {
62
62
  if (e.trim().length === 0)
63
63
  throw new Error("targetHtmlId must be a non-empty string");
64
64
  return !0;
65
- }, ht = (t) => {
65
+ }, ft = (t) => {
66
66
  const a = (t == null ? void 0 : t.inConfig) ?? t;
67
67
  if (!a || typeof a != "object")
68
68
  throw new TypeError("Config must be an object");
@@ -72,7 +72,7 @@ const it = {
72
72
  if (typeof e != "string")
73
73
  throw new TypeError("appendPosition must be a string");
74
74
  return !0;
75
- }, ft = (t) => {
75
+ }, yt = (t) => {
76
76
  const a = (t == null ? void 0 : t.inConfig) ?? t;
77
77
  if (!a || typeof a != "object")
78
78
  throw new TypeError("Config must be an object");
@@ -86,54 +86,174 @@ const it = {
86
86
  const a = (t == null ? void 0 : t.inConfig) ?? t;
87
87
  if (!a || typeof a != "object" || Array.isArray(a))
88
88
  throw new TypeError("Config must be an object");
89
- return mt(a), ht(a), ft(a), !0;
90
- }, yt = "table", Ct = "", wt = [], gt = [], $t = "", Nt = "replace", Tt = !1, g = {
91
- type: yt,
92
- targetHtmlId: Ct,
93
- data: wt,
89
+ return ht(a), ft(a), yt(a), !0;
90
+ }, Ct = "table", wt = "", $t = [], gt = [], Nt = "", Tt = "replace", xt = !1, $ = {
91
+ type: Ct,
92
+ targetHtmlId: wt,
93
+ data: $t,
94
94
  columns: gt,
95
- classToApply: $t,
96
- appendPosition: Nt,
97
- showLog: Tt
95
+ classToApply: Nt,
96
+ appendPosition: Tt,
97
+ showLog: xt
98
98
  }, G = (t) => {
99
99
  const a = typeof t == "object" && t !== null ? t.inKey ?? t.key : t;
100
- return a && a in g ? g[a] : { ...g };
100
+ return a && a in $ ? $[a] : { ...$ };
101
101
  };
102
- Object.assign(G, g);
103
- const $ = (t) => {
102
+ Object.assign(G, $);
103
+ const g = (t) => {
104
104
  const a = (t == null ? void 0 : t.inConfig) ?? t;
105
105
  if (!a || typeof a != "object" || Array.isArray(a))
106
106
  throw new TypeError("Config must be an object");
107
107
  return P(a), q(a), !0;
108
108
  };
109
- $.getSpec = G;
110
- $.configSpec = g;
111
- $.guardSpec = P;
112
- $.guardMount = q;
113
- const xt = {
109
+ g.getSpec = G;
110
+ g.configSpec = $;
111
+ g.guardSpec = P;
112
+ g.guardMount = q;
113
+ const Pt = {
114
+ version: "v10",
115
+ description: "JSON-to-DOM engine with SVG namespace support, mixed text content, and centralized traversal"
116
+ }, At = (t) => {
117
+ if (typeof globalThis > "u" || !t) return;
118
+ globalThis.ks ?? (globalThis.ks = {});
119
+ const a = {
120
+ meta: Pt,
121
+ buildSpecElement: t
122
+ };
123
+ globalThis.ks["json-to-tag"] = a, globalThis.ks.jsonToTag = a;
124
+ }, kt = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : typeof t == "object" && (t.nodeType === 3 || t.tagName === "#text" || !t.tagName && (t.textContent !== void 0 || t.text !== void 0)) ? document.createTextNode(t.textContent ?? t.text ?? "") : U(t), z = (t) => Array.isArray(t) ? t.map(kt).flat(1 / 0).filter(Boolean) : [], It = (t) => (t == null, t), Bt = "http://www.w3.org/2000/svg", Ft = /* @__PURE__ */ new Set([
125
+ "svg",
126
+ "path",
127
+ "symbol",
128
+ "use",
129
+ "g",
130
+ "circle",
131
+ "ellipse",
132
+ "rect",
133
+ "line",
134
+ "polyline",
135
+ "polygon",
136
+ "text",
137
+ "tspan",
138
+ "defs",
139
+ "clippath",
140
+ "mask",
141
+ "pattern",
142
+ "marker",
143
+ "lineargradient",
144
+ "radialgradient",
145
+ "stop",
146
+ "image",
147
+ "filter",
148
+ "fegaussianblur",
149
+ "femerge",
150
+ "femergenode"
151
+ ]), jt = ({ inTagName: t }) => {
152
+ const a = t == null ? void 0 : t.toLowerCase();
153
+ if (!a) return null;
154
+ if (a === "checkbox") {
155
+ const e = document.createElement("input");
156
+ return e.type = "checkbox", e;
157
+ }
158
+ return Ft.has(a) ? document.createElementNS(Bt, a) : document.createElement(a);
159
+ }, St = ({ inElement: t, inTextContent: a }) => (!t || a === void 0 || a === null || (t.textContent = a), t), Rt = ({ inElement: t, inProperties: a }) => (t && a && typeof a == "object" && Object.assign(t, a), t), vt = "http://www.w3.org/1999/xlink", Et = ({ inElement: t, inAttributes: a }) => {
160
+ const e = t, o = a;
161
+ if (!e || !o || typeof o != "object")
162
+ return e;
163
+ const n = typeof SVGElement < "u" ? e instanceof SVGElement : e.namespaceURI === "http://www.w3.org/2000/svg";
164
+ return Object.entries(o).forEach(([s, r]) => {
165
+ if (s === "class") {
166
+ n ? e.setAttribute("class", String(r)) : e.className = r;
167
+ return;
168
+ }
169
+ if (s === "xlink:href" || s === "href") {
170
+ if (r != null) {
171
+ const i = String(r);
172
+ if (n)
173
+ try {
174
+ e.setAttributeNS(vt, "href", i);
175
+ } catch {
176
+ }
177
+ e.setAttribute("href", i), e.setAttribute("xlink:href", i);
178
+ }
179
+ return;
180
+ }
181
+ if (typeof r == "boolean") {
182
+ r ? e.setAttribute(s, "") : e.removeAttribute(s);
183
+ return;
184
+ }
185
+ r != null && e.setAttribute(s, String(r));
186
+ }), e;
187
+ }, Ot = ({ inElement: t, inClassList: a }) => {
188
+ if (!t || !a) return t;
189
+ const e = typeof a == "string" ? a.split(/\s+/).filter(Boolean) : Array.isArray(a) ? a.filter((o) => typeof o == "string" && o.trim()) : [];
190
+ return e.length && t.classList.add(...e), t;
191
+ }, Dt = (t) => {
192
+ if (!t || typeof t != "object" || Array.isArray(t) || !t.tagName) return null;
193
+ const a = jt({ inTagName: t.tagName });
194
+ if (!a) return null;
195
+ if (St({
196
+ inElement: a,
197
+ inTextContent: It(t.textContent),
198
+ inTagName: t.tagName
199
+ }), Rt({
200
+ inElement: a,
201
+ inProperties: t.properties
202
+ }), Et({
203
+ inElement: a,
204
+ inAttributes: t.attributes
205
+ }), Ot({
206
+ inElement: a,
207
+ inClassList: t.classList
208
+ }), Array.isArray(t.children)) {
209
+ const e = z(t.children);
210
+ e.length && a.append(...e);
211
+ }
212
+ return a;
213
+ }, U = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? z(t) : typeof t == "object" ? Dt(t) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : null, J = (t = {}) => {
214
+ const a = (t == null ? void 0 : t.spec) ?? (t == null ? void 0 : t.inSpec) ?? t;
215
+ return U(a);
216
+ };
217
+ At(J);
218
+ const Lt = {
219
+ version: "1.41.0",
220
+ name: "json-to-dom"
221
+ }, Kt = (t) => {
222
+ t && (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonToDom = {
223
+ meta: Lt,
224
+ appendToDom: t
225
+ });
226
+ }, _ = ({ buildSpec: t, targetHtmlId: a, appendPosition: e, showLog: o }) => {
227
+ const n = t, s = a, r = e, i = o;
228
+ i && console.log("renderToDom 1 (content):", n);
229
+ const l = document.getElementById(s);
230
+ return l ? (Array.isArray(n) || n instanceof NodeList || n instanceof HTMLCollection ? r === "prepend" ? l.prepend(...n) : l.append(...n) : r === "prepend" ? l.prepend(n) : (l.innerHTML = "", l.append(n)), i && console.log("renderToDom 2 (mounted):", l), l) : null;
231
+ };
232
+ Kt(_);
233
+ const Vt = {
114
234
  version: "1.22.0",
115
235
  name: "json-renderers-build"
116
- }, Pt = (t) => {
236
+ }, Ht = (t) => {
117
237
  t && (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuild = {
118
- meta: xt,
238
+ meta: Vt,
119
239
  render: t
120
240
  });
121
- }, At = (t) => typeof t == "object" && t !== null && !Array.isArray(t), It = (t, a) => {
122
- if (!At(t)) return;
241
+ }, Mt = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Wt = (t, a) => {
242
+ if (!Mt(t)) return;
123
243
  let e = {};
124
244
  for (const [o, n] of Object.entries(t))
125
245
  e[o] = p(a, n);
126
246
  return e;
127
- }, kt = (t, a) => {
247
+ }, qt = (t, a) => {
128
248
  const e = structuredClone(t);
129
249
  return Array.isArray(e) ? e.map((n) => p(a, n)) : void 0;
130
- }, z = (t, a, e) => {
250
+ }, X = (t, a, e) => {
131
251
  if (t === "${agg:count}" && "rowData" in a) {
132
252
  if (Array.isArray(a == null ? void 0 : a.rowData))
133
253
  return a == null ? void 0 : a.rowData.length;
134
254
  } else
135
255
  return t === "${rowValue}" && "rowData" in a ? a == null ? void 0 : a.rowData : t.replace(/\$\{(\w+)\}/g, (o, n) => a[n] !== void 0 ? a[n] : o);
136
- }, Bt = (t, a) => z(t, a), Ft = (t, a, e) => {
256
+ }, Gt = (t, a) => X(t, a), zt = (t, a, e) => {
137
257
  if (e && console.log("inElement : ", t), e && console.log("inTemplate : ", a), a == null)
138
258
  throw new TypeError("inTemplate is required");
139
259
  if (typeof a != "object" && typeof a != "string")
@@ -141,23 +261,23 @@ const xt = {
141
261
  if (!t || typeof t != "object" || Array.isArray(t))
142
262
  throw new TypeError("inElement must be an object");
143
263
  return !0;
144
- }, St = {
264
+ }, Ut = {
145
265
  name: "json-transformer-funcs-primitive",
146
266
  version: "1.9.0"
147
- }, jt = (t) => {
267
+ }, Jt = (t) => {
148
268
  var a, e;
149
269
  typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), (a = globalThis.ks).applyTemplate ?? (a.applyTemplate = t), (e = globalThis.ks).transformerFuncs ?? (e.transformerFuncs = {}), globalThis.ks.transformerFuncs.primitive = {
150
- meta: St,
270
+ meta: Ut,
151
271
  applyTemplate: t
152
272
  });
153
273
  }, p = (t, a, e) => {
154
274
  const o = t, n = a;
155
- Ft(o, n, e);
275
+ zt(o, n, e);
156
276
  const s = structuredClone(n);
157
- return typeof s == "string" ? z(s, o) : (s === null || typeof s != "object" || ("textContent" in s && (s.textContent = Bt(s == null ? void 0 : s.textContent, o)), "attributes" in s && (s.attributes = It(s == null ? void 0 : s.attributes, o)), "children" in s && (s.children = kt(s == null ? void 0 : s.children, o))), s);
277
+ return typeof s == "string" ? X(s, o) : (s === null || typeof s != "object" || ("textContent" in s && (s.textContent = Gt(s == null ? void 0 : s.textContent, o)), "attributes" in s && (s.attributes = Wt(s == null ? void 0 : s.attributes, o)), "children" in s && (s.children = qt(s == null ? void 0 : s.children, o))), s);
158
278
  };
159
- jt(p);
160
- const Rt = (t, a) => {
279
+ Jt(p);
280
+ const _t = (t, a) => {
161
281
  if (!Array.isArray(t))
162
282
  throw new TypeError("inSource must be an Array");
163
283
  if (t.length === 0)
@@ -170,71 +290,71 @@ const Rt = (t, a) => {
170
290
  return !0;
171
291
  }, m = (t, a) => {
172
292
  const e = t, o = a;
173
- return Rt(e, o), e.map((n) => p(n, o));
174
- }, vt = (t, a) => t.map((o) => ({
293
+ return _t(e, o), e.map((n) => p(n, o));
294
+ }, Xt = (t, a) => t.map((o) => ({
175
295
  ...o,
176
296
  rowData: a[o.columnName]
177
- })), Et = (t, a, e) => {
178
- var n, s, r, i, l, c;
297
+ })), Qt = (t, a, e) => {
298
+ var n, s, r, i, l, u;
179
299
  if (!Array.isArray(t))
180
300
  throw new TypeError("inColumns must be an Array");
181
301
  if (t.length === 0)
182
302
  throw new Error("inColumns cannot be empty");
183
- for (let u = 0; u < t.length; u++) {
184
- const d = t[u];
303
+ for (let c = 0; c < t.length; c++) {
304
+ const d = t[c];
185
305
  if (!d || typeof d != "object")
186
- throw new TypeError(`inColumns[${u}] must be an object`);
306
+ throw new TypeError(`inColumns[${c}] must be an object`);
187
307
  if (typeof d.columnName != "string" || !d.columnName.trim())
188
- throw new TypeError(`inColumns[${u}].columnName must be a non-empty string`);
308
+ throw new TypeError(`inColumns[${c}].columnName must be a non-empty string`);
189
309
  }
190
310
  if (!Array.isArray(a))
191
311
  throw new TypeError("inData must be an Array");
192
- for (let u = 0; u < a.length; u++) {
193
- const d = a[u];
312
+ for (let c = 0; c < a.length; c++) {
313
+ const d = a[c];
194
314
  if (!d || typeof d != "object")
195
- throw new TypeError(`inData[${u}] must be an object`);
315
+ throw new TypeError(`inData[${c}] must be an object`);
196
316
  }
197
317
  if (!e || typeof e != "object" || Array.isArray(e))
198
318
  throw new TypeError("inSpec must be an object");
199
319
  const o = ((r = (s = (n = t[0]) == null ? void 0 : n.template) == null ? void 0 : s.body) == null ? void 0 : r.tr) || "buildBodyTr";
200
320
  if (!(o in e))
201
321
  throw new Error(`Row template "${o}" not found in inSpec`);
202
- for (let u = 0; u < t.length; u++) {
203
- const d = t[u], h = ((l = (i = d.template) == null ? void 0 : i.body) == null ? void 0 : l.cell) || ((c = d.template) == null ? void 0 : c.bodyCell) || "buildBodyCell";
322
+ for (let c = 0; c < t.length; c++) {
323
+ const d = t[c], h = ((l = (i = d.template) == null ? void 0 : i.body) == null ? void 0 : l.cell) || ((u = d.template) == null ? void 0 : u.bodyCell) || "buildBodyCell";
204
324
  if (!(h in e))
205
325
  throw new Error(`Cell template "${h}" for column "${d.columnName}" not found in inSpec`);
206
326
  }
207
327
  return !0;
208
- }, Ot = (t, a) => t.map((o) => {
209
- var i, l, c;
210
- const n = ((l = (i = o.template) == null ? void 0 : i.body) == null ? void 0 : l.cell) || ((c = o.template) == null ? void 0 : c.bodyCell) || "buildBodyCell", s = a[n];
328
+ }, Yt = (t, a) => t.map((o) => {
329
+ var i, l, u;
330
+ const n = ((l = (i = o.template) == null ? void 0 : i.body) == null ? void 0 : l.cell) || ((u = o.template) == null ? void 0 : u.bodyCell) || "buildBodyCell", s = a[n];
211
331
  return p(o, s);
212
332
  }), N = (t, a, e) => {
213
- var c, u, d;
214
- Et(t, a, e);
215
- const o = t, n = a, s = e, r = ((d = (u = (c = o[0]) == null ? void 0 : c.template) == null ? void 0 : u.body) == null ? void 0 : d.tr) || "buildBodyTr", i = s[r];
333
+ var u, c, d;
334
+ Qt(t, a, e);
335
+ const o = t, n = a, s = e, r = ((d = (c = (u = o[0]) == null ? void 0 : u.template) == null ? void 0 : c.body) == null ? void 0 : d.tr) || "buildBodyTr", i = s[r];
216
336
  return n.map((h) => {
217
- const w = p(h, i), rt = vt(o, h), lt = Ot(rt, s);
218
- return w.children = lt, w;
337
+ const w = p(h, i), lt = Xt(o, h), it = Yt(lt, s);
338
+ return w.children = it, w;
219
339
  });
220
- }, Dt = {
340
+ }, Zt = {
221
341
  tagName: "tr",
222
342
  attributes: {
223
343
  class: "align-middle"
224
344
  },
225
345
  children: []
226
- }, Lt = {
346
+ }, te = {
227
347
  tagName: "col",
228
348
  attributes: {
229
349
  width: "${width}"
230
350
  }
231
- }, Kt = {
351
+ }, ee = {
232
352
  tagName: "th",
233
353
  textContent: "${columnName}",
234
354
  attributes: {
235
355
  class: "py-3 px-3 fw-semibold text-uppercase small"
236
356
  }
237
- }, Vt = {
357
+ }, ae = {
238
358
  tagName: "td",
239
359
  children: [
240
360
  {
@@ -249,19 +369,19 @@ const Rt = (t, a) => {
249
369
  }
250
370
  }
251
371
  ]
252
- }, Ht = {
372
+ }, oe = {
253
373
  tagName: "td",
254
374
  textContent: "${rowValue}",
255
375
  attributes: {
256
376
  class: "py-3 px-3 text-secondary"
257
377
  }
258
- }, Mt = {
378
+ }, ne = {
259
379
  tagName: "button",
260
380
  textContent: "${columnName}",
261
381
  attributes: {
262
382
  class: "btn btn-primary btn-sm"
263
383
  }
264
- }, Wt = {
384
+ }, se = {
265
385
  tagName: "td",
266
386
  attributes: {
267
387
  class: "py-2 px-3 text-center"
@@ -275,7 +395,7 @@ const Rt = (t, a) => {
275
395
  }
276
396
  }
277
397
  ]
278
- }, qt = {
398
+ }, re = {
279
399
  tagName: "td",
280
400
  attributes: {
281
401
  class: "py-2 px-3 text-center"
@@ -289,43 +409,43 @@ const Rt = (t, a) => {
289
409
  }
290
410
  }
291
411
  ]
292
- }, Gt = {
412
+ }, le = {
293
413
  tagName: "option",
294
414
  textContent: "${rowValue}",
295
415
  attributes: {
296
416
  value: "${rowValue}"
297
417
  }
298
- }, zt = {
418
+ }, ie = {
299
419
  tagName: "select",
300
420
  attributes: {
301
421
  id: "LedgerName"
302
422
  },
303
423
  children: []
304
- }, Ut = {
424
+ }, ce = {
305
425
  tagName: "datalist",
306
426
  attributes: {
307
427
  "data-name": "${columnName}"
308
428
  },
309
429
  children: []
310
- }, Jt = {
430
+ }, ue = {
311
431
  tagName: "td",
312
432
  children: []
313
433
  }, b = {
314
- buildBodyTr: Dt,
315
- buildColGroup: Lt,
316
- buildHeader: Kt,
317
- buildFooter: Vt,
318
- buildBodyCell: Ht,
319
- button: Mt,
320
- buttonCell: Wt,
321
- optionsButtonCell: qt,
322
- buildOption: Gt,
323
- buildSelect: zt,
324
- buildDataList: Ut,
325
- emptyCell: Jt
326
- }, _t = "table", Xt = {
434
+ buildBodyTr: Zt,
435
+ buildColGroup: te,
436
+ buildHeader: ee,
437
+ buildFooter: ae,
438
+ buildBodyCell: oe,
439
+ button: ne,
440
+ buttonCell: se,
441
+ optionsButtonCell: re,
442
+ buildOption: le,
443
+ buildSelect: ie,
444
+ buildDataList: ce,
445
+ emptyCell: ue
446
+ }, de = "table", be = {
327
447
  class: "table table-hover table-striped align-middle border mb-0"
328
- }, Qt = [
448
+ }, pe = [
329
449
  {
330
450
  tagName: "colgroup",
331
451
  attributes: {
@@ -371,11 +491,11 @@ const Rt = (t, a) => {
371
491
  }
372
492
  ]
373
493
  }
374
- ], Yt = {
375
- tagName: _t,
376
- attributes: Xt,
377
- children: Qt
378
- }, Zt = [
494
+ ], me = {
495
+ tagName: de,
496
+ attributes: be,
497
+ children: pe
498
+ }, he = [
379
499
  {
380
500
  narration: "Build the column widths for the table using the configured columns.",
381
501
  destinationPath: {
@@ -412,7 +532,7 @@ const Rt = (t, a) => {
412
532
  templateKey: "buildHeader",
413
533
  func: "fromCollection"
414
534
  }
415
- ], te = [
535
+ ], fe = [
416
536
  {
417
537
  narration: "Build the table body rows for the table using the configured columns and data.",
418
538
  destinationPath: {
@@ -438,92 +558,92 @@ const Rt = (t, a) => {
438
558
  if (n) return n;
439
559
  }
440
560
  return null;
441
- }, ee = (t, a) => {
561
+ }, ye = (t, a) => {
442
562
  const e = t[a.fileName], o = a.dataRole ? C(e, a.dataRole) : e;
443
563
  return (a.filePath ?? []).reduce((n, s) => n[s], o);
444
- }, A = (t) => Array.isArray(t) ? t : [t], U = (t, a, e) => {
564
+ }, A = (t) => Array.isArray(t) ? t : [t], Q = (t, a, e) => {
445
565
  t[a] = e;
446
- }, ae = (t, a, e) => {
566
+ }, Ce = (t, a, e) => {
447
567
  t[a].push(...A(e));
448
- }, oe = (t, a, e) => {
568
+ }, we = (t, a, e) => {
449
569
  t[a].unshift(...A(e));
450
- }, ne = (t, a, e) => {
570
+ }, $e = (t, a, e) => {
451
571
  t[a].forEach((o) => {
452
572
  o.children.push(...structuredClone(A(e)));
453
573
  });
454
- }, se = (t, a, e) => {
574
+ }, ge = (t, a, e) => {
455
575
  t[a].forEach((o) => {
456
576
  o.children.unshift(...structuredClone(A(e)));
457
577
  });
458
- }, re = (t, a, e) => {
578
+ }, Ne = (t, a, e) => {
459
579
  t[a].forEach((o, n) => {
460
580
  const s = structuredClone(e);
461
581
  s.textContent = n + 1, o.children.unshift(s);
462
582
  });
463
- }, le = {
464
- set: U,
465
- push: ae,
466
- unshift: oe,
467
- pushToRows: ne,
468
- unshiftToRows: se,
469
- unshiftSerialToRows: re
470
- }, ie = (t, a) => {
583
+ }, Te = {
584
+ set: Q,
585
+ push: Ce,
586
+ unshift: we,
587
+ pushToRows: $e,
588
+ unshiftToRows: ge,
589
+ unshiftSerialToRows: Ne
590
+ }, xe = (t, a) => {
471
591
  const e = a.dataRole ? C(t[a.fileName], a.dataRole) : t[a.fileName], o = [...a.filePath ?? []], n = o.pop();
472
592
  return { parent: o.reduce((r, i) => r[i], e), key: n };
473
- }, J = (t, a, e) => {
474
- const { parent: o, key: n } = ie(t, a);
475
- (le[a.action] || U)(o, n, e);
476
- }, ce = (t, a, e) => {
593
+ }, Y = (t, a, e) => {
594
+ const { parent: o, key: n } = xe(t, a);
595
+ (Te[a.action] || Q)(o, n, e);
596
+ }, Pe = (t, a, e) => {
477
597
  var s, r;
478
598
  const o = !!((s = t.sourcePath) != null && s.fileName && Array.isArray((r = t.sourcePath) == null ? void 0 : r.filePath)), n = `structure/sourcePath: ${o ? "passed" : "failed"}`;
479
599
  return e.push(n), a && console.log(n), o;
480
- }, ue = (t, a, e) => {
600
+ }, Ae = (t, a, e) => {
481
601
  var s, r;
482
602
  const o = !!((s = t.destinationPath) != null && s.fileName && Array.isArray((r = t.destinationPath) == null ? void 0 : r.filePath)), n = `structure/destinationPath: ${o ? "passed" : "failed"}`;
483
603
  return e.push(n), a && console.log(n), o;
484
- }, de = (t, a, e) => {
604
+ }, ke = (t, a, e) => {
485
605
  const o = t.templateKey === void 0 || typeof t.templateKey == "string" && t.templateKey.length > 0, n = `structure/templateKey: ${o ? "passed" : "failed"}`;
486
606
  return e.push(n), a && console.log(n), o;
487
- }, be = (t, a, e) => {
607
+ }, Ie = (t, a, e) => {
488
608
  const o = typeof t.func == "string" && t.func.length > 0, n = `structure/func: ${o ? "passed" : "failed"}`;
489
609
  return e.push(n), a && console.log(n), o;
490
- }, pe = (t, a, e) => [
491
- ce(t, a, e),
492
- ue(t, a, e),
493
- de(t, a, e),
494
- be(t, a, e)
495
- ].every(Boolean), me = (t, a, e, o) => {
610
+ }, Be = (t, a, e) => [
611
+ Pe(t, a, e),
612
+ Ae(t, a, e),
613
+ ke(t, a, e),
614
+ Ie(t, a, e)
615
+ ].every(Boolean), Fe = (t, a, e, o) => {
496
616
  const n = typeof a[t.func] == "function", s = `references/func (${t.func}): ${n ? "passed" : "failed"}`;
497
617
  return o.push(s), e && console.log(s), n;
498
- }, he = (t, a, e, o) => {
618
+ }, je = (t, a, e, o) => {
499
619
  const n = t.templateKey === void 0 || Object.hasOwn(a, t.templateKey), s = `references/templateKey${t.templateKey === void 0 ? " (not used)" : ` (${t.templateKey})`}: ${n ? "passed" : "failed"}`;
500
620
  return o.push(s), e && console.log(s), n;
501
- }, fe = (t, a, e, o, n) => {
502
- const s = me(t, a, o, n), r = he(t, e, o, n);
621
+ }, Se = (t, a, e, o, n) => {
622
+ const s = Fe(t, a, o, n), r = je(t, e, o, n);
503
623
  return s && r;
504
- }, _ = (t, a, e, o, n) => pe(t, o, n) ? fe(t, a, e, o, n) : !1, ye = (t, a, e, o, n, s) => {
505
- if (!_(t, e, o, n, s)) return;
506
- const r = n, i = o, l = t.templateKey, c = i[l];
507
- r && console.log("singleInstruction ; ", l, c);
508
- const u = ee(a, t.sourcePath), d = e[t.func](u, c);
509
- J(a, t.destinationPath, d);
624
+ }, Z = (t, a, e, o, n) => Be(t, o, n) ? Se(t, a, e, o, n) : !1, Re = (t, a, e, o, n, s) => {
625
+ if (!Z(t, e, o, n, s)) return;
626
+ const r = n, i = o, l = t.templateKey, u = i[l];
627
+ r && console.log("singleInstruction ; ", l, u);
628
+ const c = ye(a, t.sourcePath), d = e[t.func](c, u);
629
+ Y(a, t.destinationPath, d);
510
630
  }, f = (t, a, e, o, n, s) => {
511
631
  t.forEach((r) => {
512
- ye(r, a, e, o, n, s);
632
+ Re(r, a, e, o, n, s);
513
633
  });
514
- }, Ce = (t, a, e, o, n, s) => {
515
- if (!_(t, e, o, n, s)) return;
634
+ }, ve = (t, a, e, o, n, s) => {
635
+ if (!Z(t, e, o, n, s)) return;
516
636
  const r = e[t.func](
517
637
  a.data.columns,
518
638
  a.data.data,
519
639
  o
520
640
  );
521
- J(a, t.destinationPath, r);
522
- }, S = (t, a, e, o, n, s) => {
641
+ Y(a, t.destinationPath, r);
642
+ }, j = (t, a, e, o, n, s) => {
523
643
  t.forEach((r) => {
524
- Ce(r, a, e, o, n, s);
644
+ ve(r, a, e, o, n, s);
525
645
  });
526
- }, we = [
646
+ }, Ee = [
527
647
  {
528
648
  narration: "Prepend the serial column width to the table colgroup.",
529
649
  destinationPath: {
@@ -584,7 +704,7 @@ const Rt = (t, a) => {
584
704
  templateKey: "buildBodyCell",
585
705
  func: "applyTemplate"
586
706
  }
587
- ], ge = [
707
+ ], Oe = [
588
708
  {
589
709
  narration: "Prepend an empty cell into the table footer row if footer row is present.",
590
710
  destinationPath: {
@@ -605,7 +725,7 @@ const Rt = (t, a) => {
605
725
  templateKey: "emptyCell",
606
726
  func: "applyTemplate"
607
727
  }
608
- ], R = { applyTemplate: p }, $e = (t = {}, a = {}, e = !1, o = []) => {
728
+ ], R = { applyTemplate: p }, De = (t = {}, a = {}, e = !1, o = []) => {
609
729
  let n = t, s = a;
610
730
  t && typeof t == "object" && "inTableSpec" in t && (n = t.inTableSpec, s = t.inSerial || a);
611
731
  const i = {
@@ -621,10 +741,10 @@ const Rt = (t, a) => {
621
741
  base: n,
622
742
  spec: b
623
743
  };
624
- f(we, i, R, b, e, o);
744
+ f(Ee, i, R, b, e, o);
625
745
  const l = C(n, "table-footer-row");
626
- return l && Array.isArray(l.children) && l.children.length > 0 && f(ge, i, R, b, e, o), n;
627
- }, Ne = [
746
+ return l && Array.isArray(l.children) && l.children.length > 0 && f(Oe, i, R, b, e, o), n;
747
+ }, Le = [
628
748
  {
629
749
  narration: "Append the options column width to the table colgroup.",
630
750
  destinationPath: {
@@ -685,7 +805,7 @@ const Rt = (t, a) => {
685
805
  templateKey: "optionsButtonCell",
686
806
  func: "applyTemplate"
687
807
  }
688
- ], Te = [
808
+ ], Ke = [
689
809
  {
690
810
  narration: "Append an empty cell into the table footer row if footer row is present.",
691
811
  destinationPath: {
@@ -706,7 +826,7 @@ const Rt = (t, a) => {
706
826
  templateKey: "emptyCell",
707
827
  func: "applyTemplate"
708
828
  }
709
- ], v = { applyTemplate: p }, xe = (t = {}, a = {}, e = !1, o = []) => {
829
+ ], v = { applyTemplate: p }, Ve = (t = {}, a = {}, e = !1, o = []) => {
710
830
  let n = t, s = a;
711
831
  t && typeof t == "object" && "inTableSpec" in t && (n = t.inTableSpec, s = t.inOptions || a);
712
832
  const i = {
@@ -722,14 +842,14 @@ const Rt = (t, a) => {
722
842
  base: n,
723
843
  spec: b
724
844
  };
725
- f(Ne, i, v, b, e, o);
845
+ f(Le, i, v, b, e, o);
726
846
  const l = C(n, "table-footer-row");
727
- return l && Array.isArray(l.children) && l.children.length > 0 && f(Te, i, v, b, e, o), n;
728
- }, X = ({ inOptions: t = {}, inBase: a, showLog: e = !1, returnLog: o = [] }) => {
847
+ return l && Array.isArray(l.children) && l.children.length > 0 && f(Ke, i, v, b, e, o), n;
848
+ }, tt = ({ inOptions: t = {}, inBase: a, showLog: e = !1, returnLog: o = [] }) => {
729
849
  const n = t, s = a;
730
- return (n.showSerial || n.serial) && $e(s, n.serial || {}, e, o), (n.showOptions || n.options) && xe(s, n.options || {}, e, o), s;
731
- }, E = { fromCollection: m, twoDimensional: N }, Pe = (t = {}, a = !1, e = []) => {
732
- const o = t, n = o.columns || [], s = o.data || [], r = o.options, i = structuredClone(Yt), l = {
850
+ return (n.showSerial || n.serial) && De(s, n.serial || {}, e, o), (n.showOptions || n.options) && Ve(s, n.options || {}, e, o), s;
851
+ }, E = { fromCollection: m, twoDimensional: N }, He = (t = {}, a = !1, e = []) => {
852
+ const o = t, n = o.columns || [], s = o.data || [], r = o.options, i = structuredClone(me), l = {
733
853
  data: {
734
854
  columns: n,
735
855
  data: s
@@ -737,10 +857,10 @@ const Rt = (t, a) => {
737
857
  base: i,
738
858
  spec: b
739
859
  };
740
- return f(Zt, l, E, b, a, e), S(te, l, E, b, a, e), X({ inOptions: r, inBase: i }), i;
741
- }, Ae = "table", Ie = {
860
+ return f(he, l, E, b, a, e), j(fe, l, E, b, a, e), tt({ inOptions: r, inBase: i }), i;
861
+ }, Me = "table", We = {
742
862
  class: "table table-hover table-striped align-middle border mb-0"
743
- }, ke = [
863
+ }, qe = [
744
864
  {
745
865
  tagName: "colgroup",
746
866
  attributes: {
@@ -786,11 +906,11 @@ const Rt = (t, a) => {
786
906
  }
787
907
  ]
788
908
  }
789
- ], Q = {
790
- tagName: Ae,
791
- attributes: Ie,
792
- children: ke
793
- }, Be = [
909
+ ], et = {
910
+ tagName: Me,
911
+ attributes: We,
912
+ children: qe
913
+ }, Ge = [
794
914
  {
795
915
  narration: "Build the column widths for the table using the configured columns.",
796
916
  destinationPath: {
@@ -827,9 +947,9 @@ const Rt = (t, a) => {
827
947
  templateKey: "buildHeader",
828
948
  func: "fromCollection"
829
949
  }
830
- ], O = { data: {}, base: Q, spec: b }, Fe = { fromCollection: m }, Se = (t, a = !1, e = []) => (O.data = t, f(Be, O, Fe, b, a, e), Q), je = [], Y = {
831
- children: je
832
- }, Re = [
950
+ ], O = { data: {}, base: et, spec: b }, ze = { fromCollection: m }, Ue = (t, a = !1, e = []) => (O.data = t, f(Ge, O, ze, b, a, e), et), Je = [], at = {
951
+ children: Je
952
+ }, _e = [
833
953
  {
834
954
  narration: "Build the table body rows for the table using the configured columns and data.",
835
955
  destinationPath: {
@@ -846,9 +966,9 @@ const Rt = (t, a) => {
846
966
  },
847
967
  func: "twoDimensional"
848
968
  }
849
- ], D = { data: {}, base: Y, spec: b }, ve = { twoDimensional: N }, Ee = (t, a = !1, e = []) => (D.data = t, S(Re, D, ve, b, a, e), Y.children), Oe = "table", De = {
969
+ ], D = { data: {}, base: at, spec: b }, Xe = { twoDimensional: N }, Qe = (t, a = !1, e = []) => (D.data = t, j(_e, D, Xe, b, a, e), at.children), Ye = "table", Ze = {
850
970
  class: "table table-hover table-striped align-middle border mb-0"
851
- }, Le = [
971
+ }, ta = [
852
972
  {
853
973
  tagName: "colgroup",
854
974
  attributes: {
@@ -894,11 +1014,11 @@ const Rt = (t, a) => {
894
1014
  }
895
1015
  ]
896
1016
  }
897
- ], Ke = {
898
- tagName: Oe,
899
- attributes: De,
900
- children: Le
901
- }, Ve = [
1017
+ ], ea = {
1018
+ tagName: Ye,
1019
+ attributes: Ze,
1020
+ children: ta
1021
+ }, aa = [
902
1022
  {
903
1023
  narration: "Build the column widths for the table using the configured columns.",
904
1024
  destinationPath: {
@@ -953,7 +1073,7 @@ const Rt = (t, a) => {
953
1073
  templateKey: "buildFooter",
954
1074
  func: "fromCollection"
955
1075
  }
956
- ], He = [
1076
+ ], oa = [
957
1077
  {
958
1078
  narration: "Build the table body rows for the table using the configured columns and data.",
959
1079
  destinationPath: {
@@ -971,8 +1091,8 @@ const Rt = (t, a) => {
971
1091
  },
972
1092
  func: "twoDimensional"
973
1093
  }
974
- ], L = { fromCollection: m, twoDimensional: N }, Me = (t = {}, a = !1, e = []) => {
975
- const o = t, n = o.inColumns || o.columns || [], s = o.inData || o.data || [], r = o.inOptions || o.options || {}, i = structuredClone(Ke), l = {
1094
+ ], L = { fromCollection: m, twoDimensional: N }, na = (t = {}, a = !1, e = []) => {
1095
+ const o = t, n = o.inColumns || o.columns || [], s = o.inData || o.data || [], r = o.inOptions || o.options || {}, i = structuredClone(ea), l = {
976
1096
  data: {
977
1097
  columns: n,
978
1098
  data: s
@@ -980,10 +1100,10 @@ const Rt = (t, a) => {
980
1100
  base: i,
981
1101
  spec: b
982
1102
  };
983
- return f(Ve, l, L, b, a, e), S(He, l, L, b, a, e), X({ inOptions: r, inBase: i }), i;
984
- }, We = [], T = {
985
- children: We
986
- }, qe = [
1103
+ return f(aa, l, L, b, a, e), j(oa, l, L, b, a, e), tt({ inOptions: r, inBase: i }), i;
1104
+ }, sa = [], T = {
1105
+ children: sa
1106
+ }, ra = [
987
1107
  {
988
1108
  narration: "Build the footer row for the table using the configured columns.",
989
1109
  destinationPath: {
@@ -1001,12 +1121,12 @@ const Rt = (t, a) => {
1001
1121
  templateKey: "buildFooter",
1002
1122
  func: "fromCollection"
1003
1123
  }
1004
- ], K = { data: {}, base: T, spec: b }, Ge = { fromCollection: m, twoDimensional: N }, ze = (t, a = !1, e = []) => (K.data = t, f(qe, K, Ge, b, a, e), T == null ? void 0 : T.children), Ue = {
1005
- simple: Pe,
1006
- headerOnly: Se,
1007
- bodyOnly: Ee,
1008
- withFooter: Me,
1009
- footerOnly: ze
1124
+ ], K = { data: {}, base: T, spec: b }, la = { fromCollection: m, twoDimensional: N }, ia = (t, a = !1, e = []) => (K.data = t, f(ra, K, la, b, a, e), T == null ? void 0 : T.children), ca = {
1125
+ simple: He,
1126
+ headerOnly: Ue,
1127
+ bodyOnly: Qe,
1128
+ withFooter: na,
1129
+ footerOnly: ia
1010
1130
  }, V = ({
1011
1131
  inData: t,
1012
1132
  inColumns: a,
@@ -1015,102 +1135,102 @@ const Rt = (t, a) => {
1015
1135
  inOptions: n,
1016
1136
  inShowLog: s
1017
1137
  } = {}) => {
1018
- const r = e, i = Ue[r], l = n, c = s;
1019
- return c && console.log("table : ", r, l), i({
1138
+ const r = e, i = ca[r], l = n, u = s;
1139
+ return u && console.log("table : ", r, l), i({
1020
1140
  columns: a,
1021
1141
  data: t,
1022
1142
  options: l,
1023
- showLog: c
1143
+ showLog: u
1024
1144
  });
1025
- }, Je = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1145
+ }, ua = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1026
1146
  data: t,
1027
1147
  columns: a
1028
- }), _e = {
1148
+ }), da = {
1029
1149
  tagName: "option",
1030
1150
  textContent: "${rowValue}",
1031
1151
  attributes: {
1032
1152
  value: "${rowValue}"
1033
1153
  }
1034
- }, Xe = {
1154
+ }, ba = {
1035
1155
  tagName: "select",
1036
1156
  attributes: {
1037
1157
  id: "LedgerName"
1038
1158
  },
1039
1159
  children: []
1040
- }, Qe = {
1160
+ }, pa = {
1041
1161
  tagName: "datalist",
1042
1162
  attributes: {
1043
1163
  "data-name": "${columnName}"
1044
1164
  },
1045
1165
  children: []
1046
1166
  }, y = {
1047
- buildOption: _e,
1048
- buildSelect: Xe,
1049
- buildDataList: Qe
1050
- }, Ye = (t, a = y.buildOption) => {
1167
+ buildOption: da,
1168
+ buildSelect: ba,
1169
+ buildDataList: pa
1170
+ }, ma = (t, a = y.buildOption) => {
1051
1171
  const e = structuredClone(a);
1052
1172
  return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
1053
- }, Ze = (t, a) => {
1173
+ }, ha = (t, a) => {
1054
1174
  const e = a == null ? void 0 : a.columnName, o = structuredClone(y.buildSelect);
1055
1175
  o.attributes.id = e, o.attributes["data-name"] = e;
1056
- const n = Ye(e, y.buildOption);
1176
+ const n = ma(e, y.buildOption);
1057
1177
  return o.children = m(t, n), o;
1058
- }, ta = ({ data: t, columns: a }) => a.map((e) => Ze(t, e)), ea = (t = {}) => {
1059
- const { data: a, columns: e } = Je(t);
1060
- return ta({ data: a, columns: e });
1061
- }, aa = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1178
+ }, fa = ({ data: t, columns: a }) => a.map((e) => ha(t, e)), ya = (t = {}) => {
1179
+ const { data: a, columns: e } = ua(t);
1180
+ return fa({ data: a, columns: e });
1181
+ }, Ca = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1062
1182
  data: t,
1063
1183
  columns: a
1064
- }), oa = (t, a = y.buildOption) => {
1184
+ }), wa = (t, a = y.buildOption) => {
1065
1185
  const e = structuredClone(a);
1066
1186
  return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
1067
- }, na = (t, a) => {
1068
- const e = a == null ? void 0 : a.columnName, o = oa(e, y.buildOption);
1187
+ }, $a = (t, a) => {
1188
+ const e = a == null ? void 0 : a.columnName, o = wa(e, y.buildOption);
1069
1189
  return m(t, o);
1070
- }, sa = ({ data: t, columns: a }) => a.map((e) => na(t, e)), ra = (t = {}) => {
1071
- const { data: a, columns: e } = aa(t);
1072
- return sa({ data: a, columns: e });
1073
- }, la = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1190
+ }, ga = ({ data: t, columns: a }) => a.map((e) => $a(t, e)), Na = (t = {}) => {
1191
+ const { data: a, columns: e } = Ca(t);
1192
+ return ga({ data: a, columns: e });
1193
+ }, Ta = ({ inData: t = [], inColumns: a = [] } = {}) => ({
1074
1194
  data: t,
1075
1195
  columns: a
1076
- }), ia = (t, a = y.buildOption) => {
1196
+ }), xa = (t, a = y.buildOption) => {
1077
1197
  const e = structuredClone(a);
1078
1198
  return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
1079
- }, ca = (t, a) => {
1199
+ }, Pa = (t, a) => {
1080
1200
  const e = a == null ? void 0 : a.columnName, o = structuredClone(y.buildDataList);
1081
1201
  o.attributes.id = e, o.attributes["data-name"] = e;
1082
- const n = ia(e, y.buildOption);
1202
+ const n = xa(e, y.buildOption);
1083
1203
  return o.children = m(t, n), o;
1084
- }, ua = ({ data: t, columns: a }) => a.map((e) => ca(t, e)), H = (t = {}) => {
1085
- const { data: a, columns: e } = la(t);
1086
- return ua({ data: a, columns: e });
1087
- }, da = {
1204
+ }, Aa = ({ data: t, columns: a }) => a.map((e) => Pa(t, e)), H = (t = {}) => {
1205
+ const { data: a, columns: e } = Ta(t);
1206
+ return Aa({ data: a, columns: e });
1207
+ }, ka = {
1088
1208
  version: "1.2.0",
1089
1209
  name: "json-renderers-build-input-row"
1090
- }, ba = (t) => {
1210
+ }, Ia = (t) => {
1091
1211
  const a = t;
1092
1212
  if (typeof globalThis > "u" || !a) return;
1093
1213
  globalThis.ks ?? (globalThis.ks = {});
1094
1214
  const e = typeof a == "function" ? a : a.render;
1095
1215
  globalThis.ks.jsonRenderersBuildInputRow = {
1096
- meta: da,
1216
+ meta: ka,
1097
1217
  render: e,
1098
1218
  ...typeof a == "object" ? a : {}
1099
1219
  };
1100
- }, pa = "input", ma = {
1220
+ }, Ba = "input", Fa = {
1101
1221
  type: "search",
1102
1222
  placeholder: "Search...",
1103
1223
  class: "form-control",
1104
1224
  id: "searchInputId"
1105
- }, ha = {
1106
- tagName: pa,
1107
- attributes: ma
1225
+ }, ja = {
1226
+ tagName: Ba,
1227
+ attributes: Fa
1108
1228
  }, x = ({ inOptions: t = {}, options: a = {} } = {}) => {
1109
- const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(ha);
1229
+ const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(ja);
1110
1230
  return e.placeholder && (o.attributes.placeholder = e.placeholder), e.class && (o.attributes.class = e.class), e.id && (o.attributes.id = e.id), e.name && (o.attributes.name = e.name), e.type && (o.attributes.type = e.type), e.value && (o.attributes.value = e.value), o;
1111
- }, fa = "div", ya = {
1231
+ }, Sa = "div", Ra = {
1112
1232
  class: "d-flex align-items-center gap-2"
1113
- }, Ca = [
1233
+ }, va = [
1114
1234
  {
1115
1235
  tagName: "label",
1116
1236
  textContent: "Search:",
@@ -1128,16 +1248,16 @@ const Rt = (t, a) => {
1128
1248
  id: "searchInputId"
1129
1249
  }
1130
1250
  }
1131
- ], wa = {
1132
- tagName: fa,
1133
- attributes: ya,
1134
- children: Ca
1135
- }, I = ({ inOptions: t = {}, options: a = {} } = {}) => {
1136
- const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(wa), n = o.children[0], s = o.children[1];
1251
+ ], Ea = {
1252
+ tagName: Sa,
1253
+ attributes: Ra,
1254
+ children: va
1255
+ }, k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1256
+ const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(Ea), n = o.children[0], s = o.children[1];
1137
1257
  return e.label && (n.textContent = e.label), e.id && (n.attributes.for = e.id, s.attributes.id = e.id), e.placeholder && (s.attributes.placeholder = e.placeholder), e.class && (s.attributes.class = e.class), e.name && (s.attributes.name = e.name), e.type && (s.attributes.type = e.type), e.wrapperClass && (o.attributes.class = e.wrapperClass), e.labelClass && (n.attributes.class = e.labelClass), o;
1138
- }, ga = "div", $a = {
1258
+ }, Oa = "div", Da = {
1139
1259
  class: "d-flex align-items-center gap-2"
1140
- }, Na = [
1260
+ }, La = [
1141
1261
  {
1142
1262
  tagName: "label",
1143
1263
  textContent: "Search:",
@@ -1164,45 +1284,45 @@ const Rt = (t, a) => {
1164
1284
  id: "searchButtonId"
1165
1285
  }
1166
1286
  }
1167
- ], Ta = {
1168
- tagName: ga,
1169
- attributes: $a,
1170
- children: Na
1171
- }, j = ({ inOptions: t = {}, options: a = {} } = {}) => {
1172
- const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(Ta), n = o.children[0], s = o.children[1], r = o.children[2];
1287
+ ], Ka = {
1288
+ tagName: Oa,
1289
+ attributes: Da,
1290
+ children: La
1291
+ }, S = ({ inOptions: t = {}, options: a = {} } = {}) => {
1292
+ const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(Ka), n = o.children[0], s = o.children[1], r = o.children[2];
1173
1293
  return e.label && (n.textContent = e.label), e.id && (n.attributes.for = e.id, s.attributes.id = e.id), e.placeholder && (s.attributes.placeholder = e.placeholder), e.class && (s.attributes.class = e.class), e.name && (s.attributes.name = e.name), e.type && (s.attributes.type = e.type), e.buttonText && (r.textContent = e.buttonText), e.buttonClass && (r.attributes.class = e.buttonClass), e.buttonId && (r.attributes.id = e.buttonId), e.wrapperClass && (o.attributes.class = e.wrapperClass), e.labelClass && (n.attributes.class = e.labelClass), o;
1174
- }, xa = {
1294
+ }, Va = {
1175
1295
  input: x,
1176
1296
  inputOnly: x,
1177
- inputWithLabel: I,
1178
- inputWithLabelButton: j
1179
- }, Pa = ({
1297
+ inputWithLabel: k,
1298
+ inputWithLabelButton: S
1299
+ }, Ha = ({
1180
1300
  type: t = "inputWithLabel",
1181
1301
  options: a = {},
1182
1302
  inType: e,
1183
1303
  inOptions: o
1184
1304
  } = {}) => {
1185
1305
  const n = e ?? t, s = o ?? a;
1186
- return (xa[n] || I)({ inOptions: s, options: s });
1306
+ return (Va[n] || k)({ inOptions: s, options: s });
1187
1307
  };
1188
- ba({
1189
- render: Pa,
1308
+ Ia({
1309
+ render: Ha,
1190
1310
  inputOnly: x,
1191
- inputWithLabel: I,
1192
- inputWithLabelButton: j
1311
+ inputWithLabel: k,
1312
+ inputWithLabelButton: S
1193
1313
  });
1194
- const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1314
+ const I = ({ inOptions: t = {}, options: a = {} } = {}) => {
1195
1315
  const e = t && Object.keys(t).length > 0 ? t : a;
1196
- return (e == null ? void 0 : e.label) === !1 || (e == null ? void 0 : e.flavour) === "inputOnly" ? x({ inOptions: e }) : (e == null ? void 0 : e.flavour) === "inputWithLabelButton" || e != null && e.button || e != null && e.buttonText ? j({ inOptions: e }) : I({ inOptions: e });
1197
- }, Aa = {
1316
+ return (e == null ? void 0 : e.label) === !1 || (e == null ? void 0 : e.flavour) === "inputOnly" ? x({ inOptions: e }) : (e == null ? void 0 : e.flavour) === "inputWithLabelButton" || e != null && e.button || e != null && e.buttonText ? S({ inOptions: e }) : k({ inOptions: e });
1317
+ }, Ma = {
1198
1318
  version: "1.2.0",
1199
1319
  name: "json-renderers-build-form"
1200
- }, Ia = (t) => {
1201
- typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuildForm = { meta: Aa, render: t });
1202
- }, ka = "div", Ba = {
1320
+ }, Wa = (t) => {
1321
+ typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuildForm = { meta: Ma, render: t });
1322
+ }, qa = "div", Ga = {
1203
1323
  class: "${cardClass}",
1204
1324
  "data-role": "form-card"
1205
- }, Fa = [
1325
+ }, za = [
1206
1326
  {
1207
1327
  tagName: "header",
1208
1328
  attributes: {
@@ -1283,14 +1403,14 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1283
1403
  }
1284
1404
  ]
1285
1405
  }
1286
- ], Sa = {
1287
- tagName: ka,
1288
- attributes: Ba,
1289
- children: Fa
1290
- }, ja = () => structuredClone(Sa), Ra = "header-actions", va = "button", M = {
1291
- destinationRole: Ra,
1292
- template: va
1293
- }, Ea = {
1406
+ ], Ua = {
1407
+ tagName: qa,
1408
+ attributes: Ga,
1409
+ children: za
1410
+ }, Ja = () => structuredClone(Ua), _a = "header-actions", Xa = "button", M = {
1411
+ destinationRole: _a,
1412
+ template: Xa
1413
+ }, Qa = {
1294
1414
  tagName: "button",
1295
1415
  textContent: "${label}",
1296
1416
  attributes: {
@@ -1298,20 +1418,20 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1298
1418
  form: "${formId}",
1299
1419
  class: "${buttonClass} ${buttonSizeClass} ${buttonPaddingClass}"
1300
1420
  }
1301
- }, Oa = {
1302
- button: Ea
1303
- }, Da = (t, a) => {
1304
- const e = structuredClone(t), o = m(a.header.actions, Oa[M.template]);
1421
+ }, Ya = {
1422
+ button: Qa
1423
+ }, Za = (t, a) => {
1424
+ const e = structuredClone(t), o = m(a.header.actions, Ya[M.template]);
1305
1425
  return C(e, M.destinationRole).children.push(...o), e;
1306
- }, La = "form-body", Ka = {
1307
- destinationRole: La
1308
- }, Va = {
1426
+ }, to = "form-body", eo = {
1427
+ destinationRole: to
1428
+ }, ao = {
1309
1429
  tagName: "div",
1310
1430
  attributes: {
1311
1431
  class: "${rowClass}"
1312
1432
  },
1313
1433
  children: []
1314
- }, Ha = {
1434
+ }, oo = {
1315
1435
  tagName: "div",
1316
1436
  attributes: {
1317
1437
  class: "${fieldClass}"
@@ -1337,7 +1457,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1337
1457
  }
1338
1458
  }
1339
1459
  ]
1340
- }, Ma = {
1460
+ }, no = {
1341
1461
  tagName: "div",
1342
1462
  attributes: {
1343
1463
  class: "${fieldClass}"
@@ -1364,7 +1484,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1364
1484
  }
1365
1485
  }
1366
1486
  ]
1367
- }, Wa = {
1487
+ }, so = {
1368
1488
  tagName: "div",
1369
1489
  attributes: {
1370
1490
  class: "${fieldClass}"
@@ -1390,7 +1510,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1390
1510
  }
1391
1511
  }
1392
1512
  ]
1393
- }, qa = {
1513
+ }, ro = {
1394
1514
  tagName: "div",
1395
1515
  attributes: {
1396
1516
  class: "${checkboxWrapperClass} ${fieldClass}"
@@ -1415,7 +1535,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1415
1535
  }
1416
1536
  }
1417
1537
  ]
1418
- }, Ga = {
1538
+ }, lo = {
1419
1539
  tagName: "div",
1420
1540
  attributes: {
1421
1541
  class: "${fieldClass}"
@@ -1441,7 +1561,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1441
1561
  }
1442
1562
  }
1443
1563
  ]
1444
- }, za = {
1564
+ }, io = {
1445
1565
  tagName: "div",
1446
1566
  attributes: {
1447
1567
  class: "${fieldClass}"
@@ -1468,7 +1588,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1468
1588
  }
1469
1589
  }
1470
1590
  ]
1471
- }, Ua = {
1591
+ }, co = {
1472
1592
  tagName: "div",
1473
1593
  attributes: {
1474
1594
  class: "${fieldClass}"
@@ -1502,7 +1622,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1502
1622
  }
1503
1623
  }
1504
1624
  ]
1505
- }, Ja = {
1625
+ }, uo = {
1506
1626
  tagName: "div",
1507
1627
  attributes: {
1508
1628
  class: "${fieldClass}"
@@ -1537,7 +1657,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1537
1657
  }
1538
1658
  }
1539
1659
  ]
1540
- }, _a = {
1660
+ }, bo = {
1541
1661
  tagName: "div",
1542
1662
  attributes: {
1543
1663
  class: "${fieldClass}"
@@ -1563,7 +1683,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1563
1683
  }
1564
1684
  }
1565
1685
  ]
1566
- }, Xa = {
1686
+ }, po = {
1567
1687
  tagName: "div",
1568
1688
  attributes: {
1569
1689
  class: "${inlineCheckboxWrapperClass}"
@@ -1588,22 +1708,22 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1588
1708
  }
1589
1709
  }
1590
1710
  ]
1591
- }, Qa = {
1592
- buildBodyTr: Va,
1593
- buildBodyCell: Ha,
1594
- buildRequiredField: Ma,
1595
- buildTextareaField: Wa,
1596
- buildCheckboxField: qa,
1597
- buildInlineField: Ga,
1598
- buildInlineRequiredField: za,
1599
- buildInlineFieldWithButton: Ua,
1600
- buildInlineRequiredFieldWithButton: Ja,
1601
- buildInlineTextareaField: _a,
1602
- buildInlineCheckboxField: Xa
1603
- }, Ya = (t, a, e) => {
1711
+ }, mo = {
1712
+ buildBodyTr: ao,
1713
+ buildBodyCell: oo,
1714
+ buildRequiredField: no,
1715
+ buildTextareaField: so,
1716
+ buildCheckboxField: ro,
1717
+ buildInlineField: lo,
1718
+ buildInlineRequiredField: io,
1719
+ buildInlineFieldWithButton: co,
1720
+ buildInlineRequiredFieldWithButton: uo,
1721
+ buildInlineTextareaField: bo,
1722
+ buildInlineCheckboxField: po
1723
+ }, ho = (t, a, e) => {
1604
1724
  const o = t.map((r) => {
1605
- var c, u, d, h, w;
1606
- const i = ((u = (c = r.template) == null ? void 0 : c.body) == null ? void 0 : u.cell) ?? (r.required ? "buildRequiredField" : "buildBodyCell");
1725
+ var u, c, d, h, w;
1726
+ const i = ((c = (u = r.template) == null ? void 0 : u.body) == null ? void 0 : c.cell) ?? (r.required ? "buildRequiredField" : "buildBodyCell");
1607
1727
  let l = ((d = e.fieldTemplates) == null ? void 0 : d[i]) ?? i;
1608
1728
  return r.buttonText && (l = ((h = e.buttonFieldTemplates) == null ? void 0 : h[l]) ?? l), {
1609
1729
  ...r,
@@ -1618,13 +1738,13 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1618
1738
  n[r.columnName] ?? r.value ?? ""
1619
1739
  ]));
1620
1740
  return { columns: o, rows: [s] };
1621
- }, Za = (t, a, e) => {
1622
- const o = Ya(a.columns, a.records, e.body), n = N(o.columns, o.rows, Qa), s = structuredClone(t);
1623
- return C(s, Ka.destinationRole).children.push(...Array.isArray(n) ? n : [n]), s;
1624
- }, to = "footer-actions", eo = "button", W = {
1625
- destinationRole: to,
1626
- template: eo
1627
- }, ao = {
1741
+ }, fo = (t, a, e) => {
1742
+ const o = ho(a.columns, a.records, e.body), n = N(o.columns, o.rows, mo), s = structuredClone(t);
1743
+ return C(s, eo.destinationRole).children.push(...Array.isArray(n) ? n : [n]), s;
1744
+ }, yo = "footer-actions", Co = "button", W = {
1745
+ destinationRole: yo,
1746
+ template: Co
1747
+ }, wo = {
1628
1748
  tagName: "button",
1629
1749
  textContent: "${label}",
1630
1750
  attributes: {
@@ -1632,28 +1752,28 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1632
1752
  form: "${formId}",
1633
1753
  class: "${buttonClass} ${buttonSizeClass} ${buttonPaddingClass}"
1634
1754
  }
1635
- }, oo = {
1636
- button: ao
1637
- }, no = (t, a) => {
1638
- const e = structuredClone(t), o = m(a.footer.actions, oo[W.template]);
1755
+ }, $o = {
1756
+ button: wo
1757
+ }, go = (t, a) => {
1758
+ const e = structuredClone(t), o = m(a.footer.actions, $o[W.template]);
1639
1759
  return C(e, W.destinationRole).children.push(...o), e;
1640
- }, Z = ({ inColumns: t, inData: a, inOptions: e, columns: o, data: n, options: s } = {}) => ({
1760
+ }, ot = ({ inColumns: t, inData: a, inOptions: e, columns: o, data: n, options: s } = {}) => ({
1641
1761
  columns: Array.isArray(t) && t.length > 0 ? t : Array.isArray(o) ? o : [],
1642
1762
  records: Array.isArray(a) && a.length > 0 ? a : Array.isArray(n) ? n : [],
1643
1763
  options: e && Object.keys(e).length > 0 ? e : s ?? {}
1644
- }), so = "bigButtonsForm", ro = "Account details", lo = "Update your profile information.", io = "", co = "label", uo = "stacked", bo = "saveCancel", po = {
1645
- formId: so,
1646
- title: ro,
1647
- description: lo,
1648
- recordId: io,
1649
- header: co,
1650
- body: uo,
1651
- footer: bo
1652
- }, mo = {
1764
+ }), No = "bigButtonsForm", To = "Account details", xo = "Update your profile information.", Po = "", Ao = "label", ko = "stacked", Io = "saveCancel", Bo = {
1765
+ formId: No,
1766
+ title: To,
1767
+ description: xo,
1768
+ recordId: Po,
1769
+ header: Ao,
1770
+ body: ko,
1771
+ footer: Io
1772
+ }, Fo = {
1653
1773
  actions: []
1654
- }, ho = {
1774
+ }, jo = {
1655
1775
  actions: []
1656
- }, fo = {
1776
+ }, So = {
1657
1777
  actions: [
1658
1778
  {
1659
1779
  label: "Refresh",
@@ -1661,14 +1781,14 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1661
1781
  buttonClass: "${headerButtonClass}"
1662
1782
  }
1663
1783
  ]
1664
- }, yo = {
1784
+ }, Ro = {
1665
1785
  actions: []
1666
- }, Co = {
1667
- none: mo,
1668
- label: ho,
1669
- labelWithRefresh: fo,
1670
- labelWithId: yo
1671
- }, wo = {
1786
+ }, vo = {
1787
+ none: Fo,
1788
+ label: jo,
1789
+ labelWithRefresh: So,
1790
+ labelWithId: Ro
1791
+ }, Eo = {
1672
1792
  fieldTemplates: {
1673
1793
  buildBodyCell: "buildInlineField",
1674
1794
  buildRequiredField: "buildInlineRequiredField",
@@ -1679,19 +1799,19 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1679
1799
  buildInlineField: "buildInlineFieldWithButton",
1680
1800
  buildInlineRequiredField: "buildInlineRequiredFieldWithButton"
1681
1801
  }
1682
- }, go = {
1802
+ }, Oo = {
1683
1803
  fieldTemplates: {},
1684
1804
  buttonFieldTemplates: {}
1685
- }, $o = {
1805
+ }, Do = {
1686
1806
  fieldTemplates: {},
1687
1807
  buttonFieldTemplates: {}
1688
- }, No = {
1689
- inline: wo,
1690
- stacked: go,
1691
- threeColumns: $o
1692
- }, To = {
1808
+ }, Lo = {
1809
+ inline: Eo,
1810
+ stacked: Oo,
1811
+ threeColumns: Do
1812
+ }, Ko = {
1693
1813
  actions: []
1694
- }, xo = {
1814
+ }, Vo = {
1695
1815
  actions: [
1696
1816
  {
1697
1817
  label: "Save",
@@ -1704,7 +1824,7 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1704
1824
  buttonClass: "${secondaryButtonClass}"
1705
1825
  }
1706
1826
  ]
1707
- }, Po = {
1827
+ }, Ho = {
1708
1828
  actions: [
1709
1829
  {
1710
1830
  label: "Edit",
@@ -1712,31 +1832,31 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1712
1832
  buttonClass: "${infoButtonClass}"
1713
1833
  }
1714
1834
  ]
1715
- }, Ao = {
1716
- none: To,
1717
- saveCancel: xo,
1718
- edit: Po
1835
+ }, Mo = {
1836
+ none: Ko,
1837
+ saveCancel: Vo,
1838
+ edit: Ho
1719
1839
  }, B = (t, a, e) => {
1720
1840
  const o = t[a];
1721
1841
  if (!o) throw new RangeError("Unknown bigButtons " + e + ": " + a);
1722
1842
  return o;
1723
- }, tt = (t) => {
1843
+ }, nt = (t) => {
1724
1844
  if (typeof t != "object" || t === null || Array.isArray(t))
1725
1845
  throw new TypeError("bigButtons options must be an object keyed by renderer type");
1726
1846
  const a = t["form.bigButtons"] ?? {};
1727
1847
  if (typeof a != "object" || a === null || Array.isArray(a))
1728
1848
  throw new TypeError('options["form.bigButtons"] must be an object');
1729
- const e = { ...po, ...a };
1849
+ const e = { ...Bo, ...a };
1730
1850
  return {
1731
1851
  options: e,
1732
- header: B(Co, e.header, "header"),
1733
- body: B(No, e.body, "body"),
1734
- footer: B(Ao, e.footer, "footer")
1852
+ header: B(vo, e.header, "header"),
1853
+ body: B(Lo, e.body, "body"),
1854
+ footer: B(Mo, e.footer, "footer")
1735
1855
  };
1736
- }, Io = (t, a = {}) => {
1737
- const e = Z(a), o = tt(e.options), n = Da(t, o), s = Za(n, e, o);
1738
- return no(s, o);
1739
- }, ko = {
1856
+ }, Wo = (t, a = {}) => {
1857
+ const e = ot(a), o = nt(e.options), n = Za(t, o), s = fo(n, e, o);
1858
+ return go(s, o);
1859
+ }, qo = {
1740
1860
  none: {
1741
1861
  headerClass: "d-none",
1742
1862
  headerActionsClass: "d-none"
@@ -1768,14 +1888,14 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1768
1888
  headerActionsClass: "d-none",
1769
1889
  headerButtonClass: "btn btn-outline-secondary text-nowrap"
1770
1890
  }
1771
- }, Bo = {
1772
- bootstrap: ko
1773
- }, Fo = (t, a) => {
1891
+ }, Go = {
1892
+ bootstrap: qo
1893
+ }, zo = (t, a) => {
1774
1894
  var o;
1775
- const e = (o = Bo[a]) == null ? void 0 : o[t.header];
1895
+ const e = (o = Go[a]) == null ? void 0 : o[t.header];
1776
1896
  if (!e) throw new RangeError("Unknown bigButtons header: " + t.header);
1777
1897
  return e;
1778
- }, So = "bootstrap", jo = {
1898
+ }, Uo = "bootstrap", Jo = {
1779
1899
  bootstrap: {
1780
1900
  base: {
1781
1901
  cardClass: "card border-0 shadow-sm w-100",
@@ -1806,15 +1926,15 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1806
1926
  }
1807
1927
  }
1808
1928
  }, F = {
1809
- defaultFramework: So,
1810
- frameworks: jo
1811
- }, Ro = (t, a) => {
1929
+ defaultFramework: Uo,
1930
+ frameworks: Jo
1931
+ }, _o = (t, a) => {
1812
1932
  const e = F.frameworks[a];
1813
1933
  if (!e) throw new RangeError("Unknown bigButtons framework: " + a);
1814
1934
  const o = e.bodies[t.body];
1815
1935
  if (!o) throw new RangeError("Unknown bigButtons body: " + t.body);
1816
1936
  return { ...e.base, ...o };
1817
- }, vo = {
1937
+ }, Xo = {
1818
1938
  base: {
1819
1939
  footerClass: "card-footer bg-transparent",
1820
1940
  footerActionsClass: "d-flex flex-wrap justify-content-end gap-2",
@@ -1832,52 +1952,52 @@ const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
1832
1952
  saveCancel: {},
1833
1953
  edit: {}
1834
1954
  }
1835
- }, Eo = {
1836
- bootstrap: vo
1837
- }, Oo = (t, a) => {
1838
- const e = Eo[a], o = e == null ? void 0 : e.footers[t.footer];
1955
+ }, Qo = {
1956
+ bootstrap: Xo
1957
+ }, Yo = (t, a) => {
1958
+ const e = Qo[a], o = e == null ? void 0 : e.footers[t.footer];
1839
1959
  if (!e) throw new RangeError("Unknown bigButtons framework: " + a);
1840
1960
  if (!o) throw new RangeError("Unknown bigButtons footer: " + t.footer);
1841
1961
  return { ...e.base, ...o };
1842
- }, Do = (t, a = {}) => {
1843
- const e = tt(Z(a).options), { options: o } = e, n = o.framework ?? F.defaultFramework;
1962
+ }, Zo = (t, a = {}) => {
1963
+ const e = nt(ot(a).options), { options: o } = e, n = o.framework ?? F.defaultFramework;
1844
1964
  if (!F.frameworks[n]) throw new RangeError("Unknown bigButtons framework: " + n);
1845
1965
  const r = Object.assign(
1846
1966
  {},
1847
1967
  o,
1848
- Ro(o, n),
1849
- Fo(o, n),
1850
- Oo(o, n)
1968
+ _o(o, n),
1969
+ zo(o, n),
1970
+ Yo(o, n)
1851
1971
  );
1852
1972
  return p(r, structuredClone(t));
1853
- }, Lo = (t = {}) => {
1854
- const a = ja(), e = Io(a, t);
1855
- return Do(e, t);
1856
- }, et = (t = {}) => {
1973
+ }, tn = (t = {}) => {
1974
+ const a = Ja(), e = Wo(a, t);
1975
+ return Zo(e, t);
1976
+ }, st = (t = {}) => {
1857
1977
  const a = { ...t, type: t.type ?? "form.bigButtons" };
1858
- return P(a), Lo(a);
1978
+ return P(a), tn(a);
1859
1979
  };
1860
- Ia(et);
1861
- const Ko = ({
1980
+ Wa(st);
1981
+ const en = ({
1862
1982
  inType: t = "stacked",
1863
1983
  inData: a,
1864
1984
  inColumns: e
1865
- } = {}) => et({
1985
+ } = {}) => st({
1866
1986
  type: t,
1867
1987
  columns: e,
1868
1988
  data: a
1869
- }), Vo = {
1989
+ }), an = {
1870
1990
  table: V,
1871
1991
  tableFromSpec: V,
1872
- select: ea,
1873
- selectOptionsOnly: ra,
1992
+ select: ya,
1993
+ selectOptionsOnly: Na,
1874
1994
  dataList: H,
1875
1995
  datalist: H,
1876
- searchInput: k,
1877
- search: k,
1878
- inputRow: k,
1879
- form: Ko
1880
- }, at = (t = {}) => {
1996
+ searchInput: I,
1997
+ search: I,
1998
+ inputRow: I,
1999
+ form: en
2000
+ }, rt = (t = {}) => {
1881
2001
  P(t);
1882
2002
  const a = t == null ? void 0 : t.showLog;
1883
2003
  console.log("localShowLog : ", a);
@@ -1888,7 +2008,7 @@ const Ko = ({
1888
2008
  n = l[0], s = l[1];
1889
2009
  }
1890
2010
  a && console.log("localMainType : ", n, s);
1891
- const r = Vo[n];
2011
+ const r = an[n];
1892
2012
  if (!r)
1893
2013
  throw new Error(`Renderer for type "${n}" not found.`);
1894
2014
  const i = r({
@@ -1901,149 +2021,39 @@ const Ko = ({
1901
2021
  });
1902
2022
  return a && console.log("json-renderers-build output:", i), i;
1903
2023
  };
1904
- Pt(at);
1905
- const Ho = ({
2024
+ Ht(rt);
2025
+ const on = ({
1906
2026
  inColumns: t,
1907
2027
  inType: a = "table",
1908
2028
  inData: e,
1909
- inShowLog: o = !1
1910
- } = {}) => at({
2029
+ inShowLog: o = !1,
2030
+ inOptions: n
2031
+ } = {}) => rt({
1911
2032
  type: a,
1912
2033
  data: e ?? [],
1913
2034
  columns: t,
1914
- showLog: o
1915
- }), Mo = {
1916
- version: "v10",
1917
- description: "JSON-to-DOM engine with SVG namespace support, mixed text content, and centralized traversal"
1918
- }, Wo = (t) => {
1919
- if (typeof globalThis > "u" || !t) return;
1920
- globalThis.ks ?? (globalThis.ks = {});
1921
- const a = {
1922
- meta: Mo,
1923
- buildSpecElement: t
1924
- };
1925
- globalThis.ks["json-to-tag"] = a, globalThis.ks.jsonToTag = a;
1926
- }, qo = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : typeof t == "object" && (t.nodeType === 3 || t.tagName === "#text" || !t.tagName && (t.textContent !== void 0 || t.text !== void 0)) ? document.createTextNode(t.textContent ?? t.text ?? "") : nt(t), ot = (t) => Array.isArray(t) ? t.map(qo).flat(1 / 0).filter(Boolean) : [], Go = (t) => (t == null, t), zo = "http://www.w3.org/2000/svg", Uo = /* @__PURE__ */ new Set([
1927
- "svg",
1928
- "path",
1929
- "symbol",
1930
- "use",
1931
- "g",
1932
- "circle",
1933
- "ellipse",
1934
- "rect",
1935
- "line",
1936
- "polyline",
1937
- "polygon",
1938
- "text",
1939
- "tspan",
1940
- "defs",
1941
- "clippath",
1942
- "mask",
1943
- "pattern",
1944
- "marker",
1945
- "lineargradient",
1946
- "radialgradient",
1947
- "stop",
1948
- "image",
1949
- "filter",
1950
- "fegaussianblur",
1951
- "femerge",
1952
- "femergenode"
1953
- ]), Jo = ({ inTagName: t }) => {
1954
- const a = t == null ? void 0 : t.toLowerCase();
1955
- if (!a) return null;
1956
- if (a === "checkbox") {
1957
- const e = document.createElement("input");
1958
- return e.type = "checkbox", e;
1959
- }
1960
- return Uo.has(a) ? document.createElementNS(zo, a) : document.createElement(a);
1961
- }, _o = ({ inElement: t, inTextContent: a }) => (!t || a === void 0 || a === null || (t.textContent = a), t), Xo = ({ inElement: t, inProperties: a }) => (t && a && typeof a == "object" && Object.assign(t, a), t), Qo = "http://www.w3.org/1999/xlink", Yo = ({ inElement: t, inAttributes: a }) => {
1962
- const e = t, o = a;
1963
- if (!e || !o || typeof o != "object")
1964
- return e;
1965
- const n = typeof SVGElement < "u" ? e instanceof SVGElement : e.namespaceURI === "http://www.w3.org/2000/svg";
1966
- return Object.entries(o).forEach(([s, r]) => {
1967
- if (s === "class") {
1968
- n ? e.setAttribute("class", String(r)) : e.className = r;
1969
- return;
1970
- }
1971
- if (s === "xlink:href" || s === "href") {
1972
- if (r != null) {
1973
- const i = String(r);
1974
- if (n)
1975
- try {
1976
- e.setAttributeNS(Qo, "href", i);
1977
- } catch {
1978
- }
1979
- e.setAttribute("href", i), e.setAttribute("xlink:href", i);
1980
- }
1981
- return;
1982
- }
1983
- if (typeof r == "boolean") {
1984
- r ? e.setAttribute(s, "") : e.removeAttribute(s);
1985
- return;
1986
- }
1987
- r != null && e.setAttribute(s, String(r));
1988
- }), e;
1989
- }, Zo = ({ inElement: t, inClassList: a }) => {
1990
- if (!t || !a) return t;
1991
- const e = typeof a == "string" ? a.split(/\s+/).filter(Boolean) : Array.isArray(a) ? a.filter((o) => typeof o == "string" && o.trim()) : [];
1992
- return e.length && t.classList.add(...e), t;
1993
- }, tn = (t) => {
1994
- if (!t || typeof t != "object" || Array.isArray(t) || !t.tagName) return null;
1995
- const a = Jo({ inTagName: t.tagName });
1996
- if (!a) return null;
1997
- if (_o({
1998
- inElement: a,
1999
- inTextContent: Go(t.textContent),
2000
- inTagName: t.tagName
2001
- }), Xo({
2002
- inElement: a,
2003
- inProperties: t.properties
2004
- }), Yo({
2005
- inElement: a,
2006
- inAttributes: t.attributes
2007
- }), Zo({
2008
- inElement: a,
2009
- inClassList: t.classList
2010
- }), Array.isArray(t.children)) {
2011
- const e = ot(t.children);
2012
- e.length && a.append(...e);
2013
- }
2014
- return a;
2015
- }, nt = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? ot(t) : typeof t == "object" ? tn(t) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : null, st = (t = {}) => {
2016
- const a = (t == null ? void 0 : t.spec) ?? (t == null ? void 0 : t.inSpec) ?? t;
2017
- return nt(a);
2018
- };
2019
- Wo(st);
2020
- const en = ({
2021
- inSpec: t,
2022
- inTargetHtmlId: a,
2023
- inAppendPosition: e,
2024
- inShowLog: o = !1
2025
- } = {}) => {
2026
- const n = t, s = a, r = e, i = o, l = st(n);
2027
- i && console.log("renderToDom 1 (content):", l);
2028
- const c = document.getElementById(s);
2029
- return c ? (Array.isArray(l) || l instanceof NodeList || l instanceof HTMLCollection ? r === "prepend" ? c.prepend(...l) : c.append(...l) : r === "prepend" ? c.prepend(l) : (c.innerHTML = "", c.append(l)), i && console.log("renderToDom 2 (mounted):", c), c) : null;
2030
- }, an = (t = {}) => {
2031
- $(t), (t == null ? void 0 : t.showLog) && console.log("first : ", t == null ? void 0 : t.columns, t == null ? void 0 : t.data, t == null ? void 0 : t.appendPosition);
2032
- const e = Ho({
2035
+ showLog: o,
2036
+ options: n
2037
+ }), nn = (t = {}) => {
2038
+ g(t);
2039
+ const a = t == null ? void 0 : t.showLog, e = t == null ? void 0 : t.options;
2040
+ a && console.log("first : ", t == null ? void 0 : t.options, t == null ? void 0 : t.columns, t == null ? void 0 : t.data, t == null ? void 0 : t.appendPosition);
2041
+ const o = on({
2033
2042
  inColumns: t.columns,
2034
2043
  inData: t.data,
2035
2044
  inType: t.type,
2036
- inShowLog: t.showLog
2037
- });
2038
- return en({
2039
- inSpec: e,
2040
- inTargetHtmlId: t.targetHtmlId,
2041
- inAppendPosition: t.appendPosition,
2042
- inShowLog: t.showLog
2045
+ inShowLog: t.showLog,
2046
+ inOptions: e
2047
+ }), n = J(o);
2048
+ return _({
2049
+ buildSpec: n,
2050
+ targetHtmlId: t.targetHtmlId,
2051
+ appendPosition: t.appendPosition,
2052
+ showLog: t.showLog
2043
2053
  });
2044
2054
  };
2045
- ct(an);
2055
+ ut(nn);
2046
2056
  export {
2047
- an as default,
2048
- an as render
2057
+ nn as default,
2058
+ nn as render
2049
2059
  };