json-renderers 1.18.7 → 1.19.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 +724 -471
- package/docs/dist/v18/min.js +719 -471
- package/docs/dist/v19/min.js +2054 -0
- package/package.json +3 -3
- package/src/index.js +2 -2
- package/src/v19/buildSpec/index.js +28 -0
- package/src/v19/index.js +35 -0
- package/src/{v16 → v19}/meta.js +1 -1
- package/src/v19/registerGlobal.js +16 -0
- package/src/v19/renderToDom/index.js +47 -0
- package/src/v14/buildSpec/index.js +0 -39
- package/src/v14/index.js +0 -81
- package/src/v14/meta.js +0 -6
- package/src/v14/registerGlobal.js +0 -14
- package/src/v15/buildSpec/index.js +0 -39
- package/src/v15/common/deriveColumnsFromData.js +0 -20
- package/src/v15/guard.js +0 -35
- package/src/v15/index.js +0 -70
- package/src/v15/meta.js +0 -6
- package/src/v15/registerGlobal.js +0 -14
- package/src/v16/buildSpec/index.js +0 -40
- package/src/v16/common/deriveColumnsFromData.js +0 -20
- package/src/v16/guard.js +0 -38
- package/src/v16/index.js +0 -106
- package/src/v16/registerGlobal.js +0 -27
- /package/src/{v14 → v19}/common/deriveColumnsFromData.js +0 -0
package/docs/dist/min.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
version: "
|
|
1
|
+
const it = {
|
|
2
|
+
version: "v19.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
|
-
},
|
|
4
|
+
}, ct = (t) => {
|
|
5
5
|
const a = t;
|
|
6
6
|
typeof globalThis > "u" || !a || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderers = {
|
|
7
|
-
meta:
|
|
7
|
+
meta: it,
|
|
8
8
|
render: a
|
|
9
9
|
});
|
|
10
|
-
},
|
|
10
|
+
}, ut = (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 ct = {
|
|
|
17
17
|
if (typeof e != "string")
|
|
18
18
|
throw new TypeError("type must be a string");
|
|
19
19
|
return !0;
|
|
20
|
-
},
|
|
20
|
+
}, dt = (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 ct = {
|
|
|
27
27
|
if (!Array.isArray(e))
|
|
28
28
|
throw new TypeError("data must be an Array");
|
|
29
29
|
return !0;
|
|
30
|
-
},
|
|
30
|
+
}, bt = (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 ct = {
|
|
|
37
37
|
if (!Array.isArray(e))
|
|
38
38
|
throw new TypeError("columns must be an Array");
|
|
39
39
|
return !0;
|
|
40
|
-
},
|
|
40
|
+
}, pt = (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");
|
|
@@ -45,12 +45,12 @@ const ct = {
|
|
|
45
45
|
if (e !== void 0 && typeof e != "boolean")
|
|
46
46
|
throw new TypeError("showLog must be a boolean");
|
|
47
47
|
return !0;
|
|
48
|
-
},
|
|
48
|
+
}, P = (t) => {
|
|
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
|
|
53
|
-
},
|
|
52
|
+
return ut(a), dt(a), bt(a), pt(a), !0;
|
|
53
|
+
}, mt = (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");
|
|
@@ -72,7 +72,7 @@ const ct = {
|
|
|
72
72
|
if (typeof e != "string")
|
|
73
73
|
throw new TypeError("appendPosition must be a string");
|
|
74
74
|
return !0;
|
|
75
|
-
},
|
|
75
|
+
}, ft = (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");
|
|
@@ -82,18 +82,18 @@ const ct = {
|
|
|
82
82
|
if (typeof e != "string")
|
|
83
83
|
throw new TypeError("classToApply must be a string");
|
|
84
84
|
return !0;
|
|
85
|
-
},
|
|
85
|
+
}, q = (t) => {
|
|
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
|
|
90
|
-
},
|
|
91
|
-
type:
|
|
92
|
-
targetHtmlId:
|
|
93
|
-
data:
|
|
94
|
-
columns:
|
|
95
|
-
classToApply:
|
|
96
|
-
appendPosition:
|
|
89
|
+
return mt(a), ht(a), ft(a), !0;
|
|
90
|
+
}, yt = "table", Ct = "", wt = [], $t = [], gt = "", Nt = "replace", Tt = !1, $ = {
|
|
91
|
+
type: yt,
|
|
92
|
+
targetHtmlId: Ct,
|
|
93
|
+
data: wt,
|
|
94
|
+
columns: $t,
|
|
95
|
+
classToApply: gt,
|
|
96
|
+
appendPosition: Nt,
|
|
97
97
|
showLog: Tt
|
|
98
98
|
}, G = (t) => {
|
|
99
99
|
const a = typeof t == "object" && t !== null ? t.inKey ?? t.key : t;
|
|
@@ -104,36 +104,36 @@ 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
|
-
return
|
|
107
|
+
return P(a), q(a), !0;
|
|
108
108
|
};
|
|
109
109
|
g.getSpec = G;
|
|
110
110
|
g.configSpec = $;
|
|
111
|
-
g.guardSpec =
|
|
112
|
-
g.guardMount =
|
|
113
|
-
const
|
|
111
|
+
g.guardSpec = P;
|
|
112
|
+
g.guardMount = q;
|
|
113
|
+
const xt = {
|
|
114
114
|
version: "1.22.0",
|
|
115
115
|
name: "json-renderers-build"
|
|
116
|
-
},
|
|
116
|
+
}, Pt = (t) => {
|
|
117
117
|
t && (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuild = {
|
|
118
|
-
meta:
|
|
118
|
+
meta: xt,
|
|
119
119
|
render: t
|
|
120
120
|
});
|
|
121
|
-
},
|
|
122
|
-
if (!
|
|
121
|
+
}, At = (t) => typeof t == "object" && t !== null && !Array.isArray(t), It = (t, a) => {
|
|
122
|
+
if (!At(t)) return;
|
|
123
123
|
let e = {};
|
|
124
124
|
for (const [o, n] of Object.entries(t))
|
|
125
|
-
e[o] =
|
|
125
|
+
e[o] = p(a, n);
|
|
126
126
|
return e;
|
|
127
|
-
},
|
|
127
|
+
}, kt = (t, a) => {
|
|
128
128
|
const e = structuredClone(t);
|
|
129
|
-
return Array.isArray(e) ? e.map((n) =>
|
|
130
|
-
},
|
|
129
|
+
return Array.isArray(e) ? e.map((n) => p(a, n)) : void 0;
|
|
130
|
+
}, z = (t, a, e) => {
|
|
131
131
|
if (t === "${agg:count}" && "rowData" in a) {
|
|
132
132
|
if (Array.isArray(a == null ? void 0 : a.rowData))
|
|
133
133
|
return a == null ? void 0 : a.rowData.length;
|
|
134
134
|
} else
|
|
135
135
|
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
|
-
},
|
|
136
|
+
}, Bt = (t, a) => z(t, a), Ft = (t, a, e) => {
|
|
137
137
|
if (e && console.log("inElement : ", t), e && console.log("inTemplate : ", a), a == null)
|
|
138
138
|
throw new TypeError("inTemplate is required");
|
|
139
139
|
if (typeof a != "object" && typeof a != "string")
|
|
@@ -141,22 +141,22 @@ const At = {
|
|
|
141
141
|
if (!t || typeof t != "object" || Array.isArray(t))
|
|
142
142
|
throw new TypeError("inElement must be an object");
|
|
143
143
|
return !0;
|
|
144
|
-
},
|
|
144
|
+
}, St = {
|
|
145
145
|
name: "json-transformer-funcs-primitive",
|
|
146
146
|
version: "1.9.0"
|
|
147
|
-
},
|
|
147
|
+
}, jt = (t) => {
|
|
148
148
|
var a, e;
|
|
149
149
|
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:
|
|
150
|
+
meta: St,
|
|
151
151
|
applyTemplate: t
|
|
152
152
|
});
|
|
153
|
-
},
|
|
153
|
+
}, p = (t, a, e) => {
|
|
154
154
|
const o = t, n = a;
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
return typeof
|
|
155
|
+
Ft(o, n, e);
|
|
156
|
+
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);
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
jt(p);
|
|
160
160
|
const Rt = (t, a) => {
|
|
161
161
|
if (!Array.isArray(t))
|
|
162
162
|
throw new TypeError("inSource must be an Array");
|
|
@@ -168,73 +168,73 @@ const Rt = (t, a) => {
|
|
|
168
168
|
if (!a || typeof a != "object" && typeof a != "string")
|
|
169
169
|
throw new TypeError("inTemplate must be an object or string");
|
|
170
170
|
return !0;
|
|
171
|
-
},
|
|
171
|
+
}, m = (t, a) => {
|
|
172
172
|
const e = t, o = a;
|
|
173
|
-
return Rt(e, o), e.map((n) =>
|
|
174
|
-
},
|
|
173
|
+
return Rt(e, o), e.map((n) => p(n, o));
|
|
174
|
+
}, vt = (t, a) => t.map((o) => ({
|
|
175
175
|
...o,
|
|
176
176
|
rowData: a[o.columnName]
|
|
177
|
-
})),
|
|
178
|
-
var n, r,
|
|
177
|
+
})), Et = (t, a, e) => {
|
|
178
|
+
var n, s, r, i, l, c;
|
|
179
179
|
if (!Array.isArray(t))
|
|
180
180
|
throw new TypeError("inColumns must be an Array");
|
|
181
181
|
if (t.length === 0)
|
|
182
182
|
throw new Error("inColumns cannot be empty");
|
|
183
|
-
for (let
|
|
184
|
-
const d = t[
|
|
183
|
+
for (let u = 0; u < t.length; u++) {
|
|
184
|
+
const d = t[u];
|
|
185
185
|
if (!d || typeof d != "object")
|
|
186
|
-
throw new TypeError(`inColumns[${
|
|
186
|
+
throw new TypeError(`inColumns[${u}] must be an object`);
|
|
187
187
|
if (typeof d.columnName != "string" || !d.columnName.trim())
|
|
188
|
-
throw new TypeError(`inColumns[${
|
|
188
|
+
throw new TypeError(`inColumns[${u}].columnName must be a non-empty string`);
|
|
189
189
|
}
|
|
190
190
|
if (!Array.isArray(a))
|
|
191
191
|
throw new TypeError("inData must be an Array");
|
|
192
|
-
for (let
|
|
193
|
-
const d = a[
|
|
192
|
+
for (let u = 0; u < a.length; u++) {
|
|
193
|
+
const d = a[u];
|
|
194
194
|
if (!d || typeof d != "object")
|
|
195
|
-
throw new TypeError(`inData[${
|
|
195
|
+
throw new TypeError(`inData[${u}] must be an object`);
|
|
196
196
|
}
|
|
197
197
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
198
198
|
throw new TypeError("inSpec must be an object");
|
|
199
|
-
const o = ((
|
|
199
|
+
const o = ((r = (s = (n = t[0]) == null ? void 0 : n.template) == null ? void 0 : s.body) == null ? void 0 : r.tr) || "buildBodyTr";
|
|
200
200
|
if (!(o in e))
|
|
201
201
|
throw new Error(`Row template "${o}" not found in inSpec`);
|
|
202
|
-
for (let
|
|
203
|
-
const d = t[
|
|
204
|
-
if (!(
|
|
205
|
-
throw new Error(`Cell template "${
|
|
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";
|
|
204
|
+
if (!(h in e))
|
|
205
|
+
throw new Error(`Cell template "${h}" for column "${d.columnName}" not found in inSpec`);
|
|
206
206
|
}
|
|
207
207
|
return !0;
|
|
208
|
-
},
|
|
209
|
-
var
|
|
210
|
-
const n = ((
|
|
211
|
-
return
|
|
212
|
-
}),
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
const o = t, n = a,
|
|
216
|
-
return n.map((
|
|
217
|
-
const
|
|
218
|
-
return
|
|
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];
|
|
211
|
+
return p(o, s);
|
|
212
|
+
}), 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];
|
|
216
|
+
return n.map((h) => {
|
|
217
|
+
const w = p(h, i), rt = vt(o, h), lt = Ot(rt, s);
|
|
218
|
+
return w.children = lt, w;
|
|
219
219
|
});
|
|
220
|
-
},
|
|
220
|
+
}, Dt = {
|
|
221
221
|
tagName: "tr",
|
|
222
222
|
attributes: {
|
|
223
223
|
class: "align-middle"
|
|
224
224
|
},
|
|
225
225
|
children: []
|
|
226
|
-
},
|
|
226
|
+
}, Lt = {
|
|
227
227
|
tagName: "col",
|
|
228
228
|
attributes: {
|
|
229
229
|
width: "${width}"
|
|
230
230
|
}
|
|
231
|
-
},
|
|
231
|
+
}, Kt = {
|
|
232
232
|
tagName: "th",
|
|
233
233
|
textContent: "${columnName}",
|
|
234
234
|
attributes: {
|
|
235
235
|
class: "py-3 px-3 fw-semibold text-uppercase small"
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, Vt = {
|
|
238
238
|
tagName: "td",
|
|
239
239
|
children: [
|
|
240
240
|
{
|
|
@@ -249,19 +249,19 @@ const Rt = (t, a) => {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
]
|
|
252
|
-
},
|
|
252
|
+
}, Ht = {
|
|
253
253
|
tagName: "td",
|
|
254
254
|
textContent: "${rowValue}",
|
|
255
255
|
attributes: {
|
|
256
256
|
class: "py-3 px-3 text-secondary"
|
|
257
257
|
}
|
|
258
|
-
},
|
|
258
|
+
}, Mt = {
|
|
259
259
|
tagName: "button",
|
|
260
260
|
textContent: "${columnName}",
|
|
261
261
|
attributes: {
|
|
262
262
|
class: "btn btn-primary btn-sm"
|
|
263
263
|
}
|
|
264
|
-
},
|
|
264
|
+
}, Wt = {
|
|
265
265
|
tagName: "td",
|
|
266
266
|
attributes: {
|
|
267
267
|
class: "py-2 px-3 text-center"
|
|
@@ -275,13 +275,27 @@ const Rt = (t, a) => {
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
]
|
|
278
|
+
}, qt = {
|
|
279
|
+
tagName: "td",
|
|
280
|
+
attributes: {
|
|
281
|
+
class: "py-2 px-3 text-center"
|
|
282
|
+
},
|
|
283
|
+
children: [
|
|
284
|
+
{
|
|
285
|
+
tagName: "button",
|
|
286
|
+
textContent: "${columnName}",
|
|
287
|
+
attributes: {
|
|
288
|
+
class: "btn btn-primary btn-sm"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
]
|
|
278
292
|
}, Gt = {
|
|
279
293
|
tagName: "option",
|
|
280
294
|
textContent: "${rowValue}",
|
|
281
295
|
attributes: {
|
|
282
296
|
value: "${rowValue}"
|
|
283
297
|
}
|
|
284
|
-
},
|
|
298
|
+
}, zt = {
|
|
285
299
|
tagName: "select",
|
|
286
300
|
attributes: {
|
|
287
301
|
id: "LedgerName"
|
|
@@ -293,20 +307,25 @@ const Rt = (t, a) => {
|
|
|
293
307
|
"data-name": "${columnName}"
|
|
294
308
|
},
|
|
295
309
|
children: []
|
|
310
|
+
}, Jt = {
|
|
311
|
+
tagName: "td",
|
|
312
|
+
children: []
|
|
296
313
|
}, b = {
|
|
297
|
-
buildBodyTr:
|
|
298
|
-
buildColGroup:
|
|
299
|
-
buildHeader:
|
|
300
|
-
buildFooter:
|
|
301
|
-
buildBodyCell:
|
|
302
|
-
button:
|
|
303
|
-
buttonCell:
|
|
314
|
+
buildBodyTr: Dt,
|
|
315
|
+
buildColGroup: Lt,
|
|
316
|
+
buildHeader: Kt,
|
|
317
|
+
buildFooter: Vt,
|
|
318
|
+
buildBodyCell: Ht,
|
|
319
|
+
button: Mt,
|
|
320
|
+
buttonCell: Wt,
|
|
321
|
+
optionsButtonCell: qt,
|
|
304
322
|
buildOption: Gt,
|
|
305
|
-
buildSelect:
|
|
306
|
-
buildDataList: Ut
|
|
307
|
-
|
|
323
|
+
buildSelect: zt,
|
|
324
|
+
buildDataList: Ut,
|
|
325
|
+
emptyCell: Jt
|
|
326
|
+
}, _t = "table", Xt = {
|
|
308
327
|
class: "table table-hover table-striped align-middle border mb-0"
|
|
309
|
-
},
|
|
328
|
+
}, Qt = [
|
|
310
329
|
{
|
|
311
330
|
tagName: "colgroup",
|
|
312
331
|
attributes: {
|
|
@@ -352,11 +371,11 @@ const Rt = (t, a) => {
|
|
|
352
371
|
}
|
|
353
372
|
]
|
|
354
373
|
}
|
|
355
|
-
],
|
|
356
|
-
tagName:
|
|
357
|
-
attributes:
|
|
358
|
-
children:
|
|
359
|
-
},
|
|
374
|
+
], Yt = {
|
|
375
|
+
tagName: _t,
|
|
376
|
+
attributes: Xt,
|
|
377
|
+
children: Qt
|
|
378
|
+
}, Zt = [
|
|
360
379
|
{
|
|
361
380
|
narration: "Build the column widths for the table using the configured columns.",
|
|
362
381
|
destinationPath: {
|
|
@@ -393,7 +412,7 @@ const Rt = (t, a) => {
|
|
|
393
412
|
templateKey: "buildHeader",
|
|
394
413
|
func: "fromCollection"
|
|
395
414
|
}
|
|
396
|
-
],
|
|
415
|
+
], te = [
|
|
397
416
|
{
|
|
398
417
|
narration: "Build the table body rows for the table using the configured columns and data.",
|
|
399
418
|
destinationPath: {
|
|
@@ -411,102 +430,317 @@ const Rt = (t, a) => {
|
|
|
411
430
|
},
|
|
412
431
|
func: "twoDimensional"
|
|
413
432
|
}
|
|
414
|
-
],
|
|
433
|
+
], C = (t, a) => {
|
|
415
434
|
var e;
|
|
416
435
|
if (((e = t == null ? void 0 : t.attributes) == null ? void 0 : e["data-role"]) === a) return t;
|
|
417
436
|
for (const o of (t == null ? void 0 : t.children) ?? []) {
|
|
418
|
-
const n =
|
|
437
|
+
const n = C(o, a);
|
|
419
438
|
if (n) return n;
|
|
420
439
|
}
|
|
421
440
|
return null;
|
|
422
|
-
},
|
|
423
|
-
const e = t[a.fileName], o = a.dataRole ?
|
|
424
|
-
return (a.filePath ?? []).reduce((n,
|
|
425
|
-
}, A = (t) => Array.isArray(t) ? t : [t],
|
|
441
|
+
}, ee = (t, a) => {
|
|
442
|
+
const e = t[a.fileName], o = a.dataRole ? C(e, a.dataRole) : e;
|
|
443
|
+
return (a.filePath ?? []).reduce((n, s) => n[s], o);
|
|
444
|
+
}, A = (t) => Array.isArray(t) ? t : [t], U = (t, a, e) => {
|
|
426
445
|
t[a] = e;
|
|
427
|
-
},
|
|
446
|
+
}, ae = (t, a, e) => {
|
|
428
447
|
t[a].push(...A(e));
|
|
429
|
-
},
|
|
448
|
+
}, oe = (t, a, e) => {
|
|
430
449
|
t[a].unshift(...A(e));
|
|
431
|
-
},
|
|
450
|
+
}, ne = (t, a, e) => {
|
|
432
451
|
t[a].forEach((o) => {
|
|
433
452
|
o.children.push(...structuredClone(A(e)));
|
|
434
453
|
});
|
|
435
|
-
},
|
|
454
|
+
}, se = (t, a, e) => {
|
|
436
455
|
t[a].forEach((o) => {
|
|
437
456
|
o.children.unshift(...structuredClone(A(e)));
|
|
438
457
|
});
|
|
439
|
-
},
|
|
458
|
+
}, re = (t, a, e) => {
|
|
440
459
|
t[a].forEach((o, n) => {
|
|
441
|
-
const
|
|
442
|
-
|
|
460
|
+
const s = structuredClone(e);
|
|
461
|
+
s.textContent = n + 1, o.children.unshift(s);
|
|
443
462
|
});
|
|
444
|
-
},
|
|
445
|
-
set:
|
|
446
|
-
push:
|
|
447
|
-
unshift:
|
|
448
|
-
pushToRows:
|
|
449
|
-
unshiftToRows:
|
|
450
|
-
unshiftSerialToRows:
|
|
451
|
-
},
|
|
452
|
-
const e = a.dataRole ?
|
|
453
|
-
return { parent: o.reduce((
|
|
454
|
-
},
|
|
455
|
-
const { parent: o, key: n } =
|
|
456
|
-
(
|
|
457
|
-
},
|
|
458
|
-
var
|
|
459
|
-
const o = !!((
|
|
463
|
+
}, le = {
|
|
464
|
+
set: U,
|
|
465
|
+
push: ae,
|
|
466
|
+
unshift: oe,
|
|
467
|
+
pushToRows: ne,
|
|
468
|
+
unshiftToRows: se,
|
|
469
|
+
unshiftSerialToRows: re
|
|
470
|
+
}, ie = (t, a) => {
|
|
471
|
+
const e = a.dataRole ? C(t[a.fileName], a.dataRole) : t[a.fileName], o = [...a.filePath ?? []], n = o.pop();
|
|
472
|
+
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) => {
|
|
477
|
+
var s, r;
|
|
478
|
+
const o = !!((s = t.sourcePath) != null && s.fileName && Array.isArray((r = t.sourcePath) == null ? void 0 : r.filePath)), n = `structure/sourcePath: ${o ? "passed" : "failed"}`;
|
|
460
479
|
return e.push(n), a && console.log(n), o;
|
|
461
|
-
},
|
|
462
|
-
var
|
|
463
|
-
const o = !!((
|
|
480
|
+
}, ue = (t, a, e) => {
|
|
481
|
+
var s, r;
|
|
482
|
+
const o = !!((s = t.destinationPath) != null && s.fileName && Array.isArray((r = t.destinationPath) == null ? void 0 : r.filePath)), n = `structure/destinationPath: ${o ? "passed" : "failed"}`;
|
|
464
483
|
return e.push(n), a && console.log(n), o;
|
|
465
|
-
},
|
|
484
|
+
}, de = (t, a, e) => {
|
|
466
485
|
const o = t.templateKey === void 0 || typeof t.templateKey == "string" && t.templateKey.length > 0, n = `structure/templateKey: ${o ? "passed" : "failed"}`;
|
|
467
486
|
return e.push(n), a && console.log(n), o;
|
|
468
|
-
},
|
|
487
|
+
}, be = (t, a, e) => {
|
|
469
488
|
const o = typeof t.func == "string" && t.func.length > 0, n = `structure/func: ${o ? "passed" : "failed"}`;
|
|
470
489
|
return e.push(n), a && console.log(n), o;
|
|
471
|
-
},
|
|
472
|
-
le(t, a, e),
|
|
473
|
-
ie(t, a, e),
|
|
490
|
+
}, pe = (t, a, e) => [
|
|
474
491
|
ce(t, a, e),
|
|
475
|
-
ue(t, a, e)
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
t.
|
|
493
|
-
|
|
492
|
+
ue(t, a, e),
|
|
493
|
+
de(t, a, e),
|
|
494
|
+
be(t, a, e)
|
|
495
|
+
].every(Boolean), me = (t, a, e, o) => {
|
|
496
|
+
const n = typeof a[t.func] == "function", s = `references/func (${t.func}): ${n ? "passed" : "failed"}`;
|
|
497
|
+
return o.push(s), e && console.log(s), n;
|
|
498
|
+
}, he = (t, a, e, o) => {
|
|
499
|
+
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
|
+
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);
|
|
503
|
+
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);
|
|
510
|
+
}, f = (t, a, e, o, n, s) => {
|
|
511
|
+
t.forEach((r) => {
|
|
512
|
+
ye(r, a, e, o, n, s);
|
|
494
513
|
});
|
|
495
|
-
},
|
|
496
|
-
if (!
|
|
497
|
-
const
|
|
514
|
+
}, Ce = (t, a, e, o, n, s) => {
|
|
515
|
+
if (!_(t, e, o, n, s)) return;
|
|
516
|
+
const r = e[t.func](
|
|
498
517
|
a.data.columns,
|
|
499
518
|
a.data.data,
|
|
500
519
|
o
|
|
501
520
|
);
|
|
502
|
-
|
|
503
|
-
}, S = (t, a, e, o, n,
|
|
504
|
-
t.forEach((
|
|
505
|
-
|
|
521
|
+
J(a, t.destinationPath, r);
|
|
522
|
+
}, S = (t, a, e, o, n, s) => {
|
|
523
|
+
t.forEach((r) => {
|
|
524
|
+
Ce(r, a, e, o, n, s);
|
|
506
525
|
});
|
|
507
|
-
},
|
|
526
|
+
}, we = [
|
|
527
|
+
{
|
|
528
|
+
narration: "Prepend the serial column width to the table colgroup.",
|
|
529
|
+
destinationPath: {
|
|
530
|
+
fileName: "base",
|
|
531
|
+
dataRole: "table-colgroup",
|
|
532
|
+
filePath: [
|
|
533
|
+
"children"
|
|
534
|
+
],
|
|
535
|
+
action: "unshift"
|
|
536
|
+
},
|
|
537
|
+
sourcePath: {
|
|
538
|
+
fileName: "data",
|
|
539
|
+
filePath: [
|
|
540
|
+
"serial",
|
|
541
|
+
"col"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
templateKey: "buildColGroup",
|
|
545
|
+
func: "applyTemplate"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
narration: "Prepend the serial header cell to the table header row.",
|
|
549
|
+
destinationPath: {
|
|
550
|
+
fileName: "base",
|
|
551
|
+
dataRole: "table-header-row",
|
|
552
|
+
filePath: [
|
|
553
|
+
"children"
|
|
554
|
+
],
|
|
555
|
+
action: "unshift"
|
|
556
|
+
},
|
|
557
|
+
sourcePath: {
|
|
558
|
+
fileName: "data",
|
|
559
|
+
filePath: [
|
|
560
|
+
"serial",
|
|
561
|
+
"header"
|
|
562
|
+
]
|
|
563
|
+
},
|
|
564
|
+
templateKey: "buildHeader",
|
|
565
|
+
func: "applyTemplate"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
narration: "Prepend the serial number cell into each table body row.",
|
|
569
|
+
destinationPath: {
|
|
570
|
+
fileName: "base",
|
|
571
|
+
dataRole: "table-body",
|
|
572
|
+
filePath: [
|
|
573
|
+
"children"
|
|
574
|
+
],
|
|
575
|
+
action: "unshiftSerialToRows"
|
|
576
|
+
},
|
|
577
|
+
sourcePath: {
|
|
578
|
+
fileName: "data",
|
|
579
|
+
filePath: [
|
|
580
|
+
"serial",
|
|
581
|
+
"body"
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
templateKey: "buildBodyCell",
|
|
585
|
+
func: "applyTemplate"
|
|
586
|
+
}
|
|
587
|
+
], $e = [
|
|
588
|
+
{
|
|
589
|
+
narration: "Prepend an empty cell into the table footer row if footer row is present.",
|
|
590
|
+
destinationPath: {
|
|
591
|
+
fileName: "base",
|
|
592
|
+
dataRole: "table-footer-row",
|
|
593
|
+
filePath: [
|
|
594
|
+
"children"
|
|
595
|
+
],
|
|
596
|
+
action: "unshift"
|
|
597
|
+
},
|
|
598
|
+
sourcePath: {
|
|
599
|
+
fileName: "data",
|
|
600
|
+
filePath: [
|
|
601
|
+
"serial",
|
|
602
|
+
"footer"
|
|
603
|
+
]
|
|
604
|
+
},
|
|
605
|
+
templateKey: "emptyCell",
|
|
606
|
+
func: "applyTemplate"
|
|
607
|
+
}
|
|
608
|
+
], R = { applyTemplate: p }, ge = (t = {}, a = {}, e = !1, o = []) => {
|
|
609
|
+
let n = t, s = a;
|
|
610
|
+
t && typeof t == "object" && "inTableSpec" in t && (n = t.inTableSpec, s = t.inSerial || a);
|
|
611
|
+
const i = {
|
|
612
|
+
data: {
|
|
613
|
+
serial: {
|
|
614
|
+
col: { width: "50px" },
|
|
615
|
+
header: { columnName: "#" },
|
|
616
|
+
body: {},
|
|
617
|
+
footer: {},
|
|
618
|
+
...s
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
base: n,
|
|
622
|
+
spec: b
|
|
623
|
+
};
|
|
624
|
+
f(we, i, R, b, e, o);
|
|
625
|
+
const l = C(n, "table-footer-row");
|
|
626
|
+
return l && Array.isArray(l.children) && l.children.length > 0 && f($e, i, R, b, e, o), n;
|
|
627
|
+
}, Ne = [
|
|
628
|
+
{
|
|
629
|
+
narration: "Append the options column width to the table colgroup.",
|
|
630
|
+
destinationPath: {
|
|
631
|
+
fileName: "base",
|
|
632
|
+
dataRole: "table-colgroup",
|
|
633
|
+
filePath: [
|
|
634
|
+
"children"
|
|
635
|
+
],
|
|
636
|
+
action: "push"
|
|
637
|
+
},
|
|
638
|
+
sourcePath: {
|
|
639
|
+
fileName: "data",
|
|
640
|
+
filePath: [
|
|
641
|
+
"options",
|
|
642
|
+
"col"
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
templateKey: "buildColGroup",
|
|
646
|
+
func: "applyTemplate"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
narration: "Append the options header cell to the table header row.",
|
|
650
|
+
destinationPath: {
|
|
651
|
+
fileName: "base",
|
|
652
|
+
dataRole: "table-header-row",
|
|
653
|
+
filePath: [
|
|
654
|
+
"children"
|
|
655
|
+
],
|
|
656
|
+
action: "push"
|
|
657
|
+
},
|
|
658
|
+
sourcePath: {
|
|
659
|
+
fileName: "data",
|
|
660
|
+
filePath: [
|
|
661
|
+
"options",
|
|
662
|
+
"header"
|
|
663
|
+
]
|
|
664
|
+
},
|
|
665
|
+
templateKey: "buildHeader",
|
|
666
|
+
func: "applyTemplate"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
narration: "Append the options button cell into each table body row.",
|
|
670
|
+
destinationPath: {
|
|
671
|
+
fileName: "base",
|
|
672
|
+
dataRole: "table-body",
|
|
673
|
+
filePath: [
|
|
674
|
+
"children"
|
|
675
|
+
],
|
|
676
|
+
action: "pushToRows"
|
|
677
|
+
},
|
|
678
|
+
sourcePath: {
|
|
679
|
+
fileName: "data",
|
|
680
|
+
filePath: [
|
|
681
|
+
"options",
|
|
682
|
+
"body"
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
templateKey: "optionsButtonCell",
|
|
686
|
+
func: "applyTemplate"
|
|
687
|
+
}
|
|
688
|
+
], Te = [
|
|
689
|
+
{
|
|
690
|
+
narration: "Append an empty cell into the table footer row if footer row is present.",
|
|
691
|
+
destinationPath: {
|
|
692
|
+
fileName: "base",
|
|
693
|
+
dataRole: "table-footer-row",
|
|
694
|
+
filePath: [
|
|
695
|
+
"children"
|
|
696
|
+
],
|
|
697
|
+
action: "push"
|
|
698
|
+
},
|
|
699
|
+
sourcePath: {
|
|
700
|
+
fileName: "data",
|
|
701
|
+
filePath: [
|
|
702
|
+
"options",
|
|
703
|
+
"footer"
|
|
704
|
+
]
|
|
705
|
+
},
|
|
706
|
+
templateKey: "emptyCell",
|
|
707
|
+
func: "applyTemplate"
|
|
708
|
+
}
|
|
709
|
+
], v = { applyTemplate: p }, xe = (t = {}, a = {}, e = !1, o = []) => {
|
|
710
|
+
let n = t, s = a;
|
|
711
|
+
t && typeof t == "object" && "inTableSpec" in t && (n = t.inTableSpec, s = t.inOptions || a);
|
|
712
|
+
const i = {
|
|
713
|
+
data: {
|
|
714
|
+
options: {
|
|
715
|
+
col: { width: "100px" },
|
|
716
|
+
header: { columnName: "options" },
|
|
717
|
+
body: { columnName: "show" },
|
|
718
|
+
footer: {},
|
|
719
|
+
...s
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
base: n,
|
|
723
|
+
spec: b
|
|
724
|
+
};
|
|
725
|
+
f(Ne, i, v, b, e, o);
|
|
726
|
+
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 = [] }) => {
|
|
729
|
+
const n = t, s = a;
|
|
730
|
+
return (n.showSerial || n.serial) && ge(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 = {
|
|
733
|
+
data: {
|
|
734
|
+
columns: n,
|
|
735
|
+
data: s
|
|
736
|
+
},
|
|
737
|
+
base: i,
|
|
738
|
+
spec: b
|
|
739
|
+
};
|
|
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 = {
|
|
508
742
|
class: "table table-hover table-striped align-middle border mb-0"
|
|
509
|
-
},
|
|
743
|
+
}, ke = [
|
|
510
744
|
{
|
|
511
745
|
tagName: "colgroup",
|
|
512
746
|
attributes: {
|
|
@@ -553,10 +787,10 @@ const Rt = (t, a) => {
|
|
|
553
787
|
]
|
|
554
788
|
}
|
|
555
789
|
], Q = {
|
|
556
|
-
tagName:
|
|
557
|
-
attributes:
|
|
558
|
-
children:
|
|
559
|
-
},
|
|
790
|
+
tagName: Ae,
|
|
791
|
+
attributes: Ie,
|
|
792
|
+
children: ke
|
|
793
|
+
}, Be = [
|
|
560
794
|
{
|
|
561
795
|
narration: "Build the column widths for the table using the configured columns.",
|
|
562
796
|
destinationPath: {
|
|
@@ -593,9 +827,9 @@ const Rt = (t, a) => {
|
|
|
593
827
|
templateKey: "buildHeader",
|
|
594
828
|
func: "fromCollection"
|
|
595
829
|
}
|
|
596
|
-
],
|
|
597
|
-
children:
|
|
598
|
-
},
|
|
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 = [
|
|
599
833
|
{
|
|
600
834
|
narration: "Build the table body rows for the table using the configured columns and data.",
|
|
601
835
|
destinationPath: {
|
|
@@ -612,9 +846,9 @@ const Rt = (t, a) => {
|
|
|
612
846
|
},
|
|
613
847
|
func: "twoDimensional"
|
|
614
848
|
}
|
|
615
|
-
], D = { data: {}, base: Y, spec: b },
|
|
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 = {
|
|
616
850
|
class: "table table-hover table-striped align-middle border mb-0"
|
|
617
|
-
},
|
|
851
|
+
}, Le = [
|
|
618
852
|
{
|
|
619
853
|
tagName: "colgroup",
|
|
620
854
|
attributes: {
|
|
@@ -660,11 +894,11 @@ const Rt = (t, a) => {
|
|
|
660
894
|
}
|
|
661
895
|
]
|
|
662
896
|
}
|
|
663
|
-
],
|
|
664
|
-
tagName:
|
|
665
|
-
attributes:
|
|
666
|
-
children:
|
|
667
|
-
},
|
|
897
|
+
], Ke = {
|
|
898
|
+
tagName: Oe,
|
|
899
|
+
attributes: De,
|
|
900
|
+
children: Le
|
|
901
|
+
}, Ve = [
|
|
668
902
|
{
|
|
669
903
|
narration: "Build the column widths for the table using the configured columns.",
|
|
670
904
|
destinationPath: {
|
|
@@ -719,7 +953,7 @@ const Rt = (t, a) => {
|
|
|
719
953
|
templateKey: "buildFooter",
|
|
720
954
|
func: "fromCollection"
|
|
721
955
|
}
|
|
722
|
-
],
|
|
956
|
+
], He = [
|
|
723
957
|
{
|
|
724
958
|
narration: "Build the table body rows for the table using the configured columns and data.",
|
|
725
959
|
destinationPath: {
|
|
@@ -737,9 +971,19 @@ const Rt = (t, a) => {
|
|
|
737
971
|
},
|
|
738
972
|
func: "twoDimensional"
|
|
739
973
|
}
|
|
740
|
-
],
|
|
741
|
-
|
|
742
|
-
|
|
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 = {
|
|
976
|
+
data: {
|
|
977
|
+
columns: n,
|
|
978
|
+
data: s
|
|
979
|
+
},
|
|
980
|
+
base: i,
|
|
981
|
+
spec: b
|
|
982
|
+
};
|
|
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 = [
|
|
743
987
|
{
|
|
744
988
|
narration: "Build the footer row for the table using the configured columns.",
|
|
745
989
|
destinationPath: {
|
|
@@ -757,115 +1001,116 @@ const Rt = (t, a) => {
|
|
|
757
1001
|
templateKey: "buildFooter",
|
|
758
1002
|
func: "fromCollection"
|
|
759
1003
|
}
|
|
760
|
-
], K = { data: {}, base:
|
|
761
|
-
simple:
|
|
762
|
-
headerOnly:
|
|
763
|
-
bodyOnly:
|
|
764
|
-
withFooter:
|
|
765
|
-
footerOnly:
|
|
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
|
|
766
1010
|
}, V = ({
|
|
767
1011
|
inData: t,
|
|
768
1012
|
inColumns: a,
|
|
769
1013
|
inType: e,
|
|
770
1014
|
footer: o = [],
|
|
771
|
-
|
|
772
|
-
inShowLog:
|
|
1015
|
+
inOptions: n,
|
|
1016
|
+
inShowLog: s
|
|
773
1017
|
} = {}) => {
|
|
774
|
-
const
|
|
775
|
-
return l({
|
|
1018
|
+
const r = e, i = Ue[r], l = n, c = s;
|
|
1019
|
+
return c && console.log("table : ", r, l), i({
|
|
776
1020
|
columns: a,
|
|
777
1021
|
data: t,
|
|
778
|
-
|
|
1022
|
+
options: l,
|
|
1023
|
+
showLog: c
|
|
779
1024
|
});
|
|
780
|
-
},
|
|
1025
|
+
}, Je = ({ inData: t = [], inColumns: a = [] } = {}) => ({
|
|
781
1026
|
data: t,
|
|
782
1027
|
columns: a
|
|
783
|
-
}),
|
|
1028
|
+
}), _e = {
|
|
784
1029
|
tagName: "option",
|
|
785
1030
|
textContent: "${rowValue}",
|
|
786
1031
|
attributes: {
|
|
787
1032
|
value: "${rowValue}"
|
|
788
1033
|
}
|
|
789
|
-
},
|
|
1034
|
+
}, Xe = {
|
|
790
1035
|
tagName: "select",
|
|
791
1036
|
attributes: {
|
|
792
1037
|
id: "LedgerName"
|
|
793
1038
|
},
|
|
794
1039
|
children: []
|
|
795
|
-
},
|
|
1040
|
+
}, Qe = {
|
|
796
1041
|
tagName: "datalist",
|
|
797
1042
|
attributes: {
|
|
798
1043
|
"data-name": "${columnName}"
|
|
799
1044
|
},
|
|
800
1045
|
children: []
|
|
801
|
-
},
|
|
802
|
-
buildOption:
|
|
803
|
-
buildSelect:
|
|
804
|
-
buildDataList:
|
|
805
|
-
},
|
|
1046
|
+
}, y = {
|
|
1047
|
+
buildOption: _e,
|
|
1048
|
+
buildSelect: Xe,
|
|
1049
|
+
buildDataList: Qe
|
|
1050
|
+
}, Ye = (t, a = y.buildOption) => {
|
|
806
1051
|
const e = structuredClone(a);
|
|
807
1052
|
return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
|
|
808
|
-
},
|
|
809
|
-
const e = a == null ? void 0 : a.columnName, o = structuredClone(
|
|
1053
|
+
}, Ze = (t, a) => {
|
|
1054
|
+
const e = a == null ? void 0 : a.columnName, o = structuredClone(y.buildSelect);
|
|
810
1055
|
o.attributes.id = e, o.attributes["data-name"] = e;
|
|
811
|
-
const n =
|
|
812
|
-
return o.children =
|
|
813
|
-
},
|
|
814
|
-
const { data: a, columns: e } =
|
|
815
|
-
return
|
|
816
|
-
},
|
|
1056
|
+
const n = Ye(e, y.buildOption);
|
|
1057
|
+
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 = [] } = {}) => ({
|
|
817
1062
|
data: t,
|
|
818
1063
|
columns: a
|
|
819
|
-
}),
|
|
1064
|
+
}), oa = (t, a = y.buildOption) => {
|
|
820
1065
|
const e = structuredClone(a);
|
|
821
1066
|
return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
|
|
822
|
-
},
|
|
823
|
-
const e = a == null ? void 0 : a.columnName, o =
|
|
824
|
-
return
|
|
825
|
-
},
|
|
826
|
-
const { data: a, columns: e } =
|
|
827
|
-
return
|
|
828
|
-
},
|
|
1067
|
+
}, na = (t, a) => {
|
|
1068
|
+
const e = a == null ? void 0 : a.columnName, o = oa(e, y.buildOption);
|
|
1069
|
+
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 = [] } = {}) => ({
|
|
829
1074
|
data: t,
|
|
830
1075
|
columns: a
|
|
831
|
-
}),
|
|
1076
|
+
}), ia = (t, a = y.buildOption) => {
|
|
832
1077
|
const e = structuredClone(a);
|
|
833
1078
|
return e.textContent = e.textContent.replace("rowValue", t), e.attributes.value = e.attributes.value.replace("rowValue", t), e;
|
|
834
|
-
},
|
|
835
|
-
const e = a == null ? void 0 : a.columnName, o = structuredClone(
|
|
1079
|
+
}, ca = (t, a) => {
|
|
1080
|
+
const e = a == null ? void 0 : a.columnName, o = structuredClone(y.buildDataList);
|
|
836
1081
|
o.attributes.id = e, o.attributes["data-name"] = e;
|
|
837
|
-
const n =
|
|
838
|
-
return o.children =
|
|
839
|
-
},
|
|
840
|
-
const { data: a, columns: e } =
|
|
841
|
-
return
|
|
842
|
-
},
|
|
1082
|
+
const n = ia(e, y.buildOption);
|
|
1083
|
+
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 = {
|
|
843
1088
|
version: "1.2.0",
|
|
844
1089
|
name: "json-renderers-build-input-row"
|
|
845
|
-
},
|
|
1090
|
+
}, ba = (t) => {
|
|
846
1091
|
const a = t;
|
|
847
1092
|
if (typeof globalThis > "u" || !a) return;
|
|
848
1093
|
globalThis.ks ?? (globalThis.ks = {});
|
|
849
1094
|
const e = typeof a == "function" ? a : a.render;
|
|
850
1095
|
globalThis.ks.jsonRenderersBuildInputRow = {
|
|
851
|
-
meta:
|
|
1096
|
+
meta: da,
|
|
852
1097
|
render: e,
|
|
853
1098
|
...typeof a == "object" ? a : {}
|
|
854
1099
|
};
|
|
855
|
-
},
|
|
1100
|
+
}, pa = "input", ma = {
|
|
856
1101
|
type: "search",
|
|
857
1102
|
placeholder: "Search...",
|
|
858
1103
|
class: "form-control",
|
|
859
1104
|
id: "searchInputId"
|
|
860
|
-
},
|
|
861
|
-
tagName:
|
|
862
|
-
attributes:
|
|
1105
|
+
}, ha = {
|
|
1106
|
+
tagName: pa,
|
|
1107
|
+
attributes: ma
|
|
863
1108
|
}, x = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
864
|
-
const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(
|
|
1109
|
+
const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(ha);
|
|
865
1110
|
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;
|
|
866
|
-
},
|
|
1111
|
+
}, fa = "div", ya = {
|
|
867
1112
|
class: "d-flex align-items-center gap-2"
|
|
868
|
-
},
|
|
1113
|
+
}, Ca = [
|
|
869
1114
|
{
|
|
870
1115
|
tagName: "label",
|
|
871
1116
|
textContent: "Search:",
|
|
@@ -883,16 +1128,16 @@ const Rt = (t, a) => {
|
|
|
883
1128
|
id: "searchInputId"
|
|
884
1129
|
}
|
|
885
1130
|
}
|
|
886
|
-
],
|
|
887
|
-
tagName:
|
|
888
|
-
attributes:
|
|
889
|
-
children:
|
|
1131
|
+
], wa = {
|
|
1132
|
+
tagName: fa,
|
|
1133
|
+
attributes: ya,
|
|
1134
|
+
children: Ca
|
|
890
1135
|
}, I = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
891
|
-
const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(
|
|
892
|
-
return e.label && (n.textContent = e.label), e.id && (n.attributes.for = e.id,
|
|
893
|
-
},
|
|
1136
|
+
const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(wa), n = o.children[0], s = o.children[1];
|
|
1137
|
+
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
|
+
}, $a = "div", ga = {
|
|
894
1139
|
class: "d-flex align-items-center gap-2"
|
|
895
|
-
},
|
|
1140
|
+
}, Na = [
|
|
896
1141
|
{
|
|
897
1142
|
tagName: "label",
|
|
898
1143
|
textContent: "Search:",
|
|
@@ -919,45 +1164,45 @@ const Rt = (t, a) => {
|
|
|
919
1164
|
id: "searchButtonId"
|
|
920
1165
|
}
|
|
921
1166
|
}
|
|
922
|
-
],
|
|
923
|
-
tagName:
|
|
924
|
-
attributes:
|
|
925
|
-
children:
|
|
926
|
-
},
|
|
927
|
-
const e = t && Object.keys(t).length > 0 ? t : a, o = structuredClone(
|
|
928
|
-
return e.label && (n.textContent = e.label), e.id && (n.attributes.for = e.id,
|
|
929
|
-
},
|
|
1167
|
+
], Ta = {
|
|
1168
|
+
tagName: $a,
|
|
1169
|
+
attributes: ga,
|
|
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];
|
|
1173
|
+
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 = {
|
|
930
1175
|
input: x,
|
|
931
1176
|
inputOnly: x,
|
|
932
1177
|
inputWithLabel: I,
|
|
933
|
-
inputWithLabelButton:
|
|
934
|
-
},
|
|
1178
|
+
inputWithLabelButton: j
|
|
1179
|
+
}, Pa = ({
|
|
935
1180
|
type: t = "inputWithLabel",
|
|
936
1181
|
options: a = {},
|
|
937
1182
|
inType: e,
|
|
938
1183
|
inOptions: o
|
|
939
1184
|
} = {}) => {
|
|
940
|
-
const n = e ?? t,
|
|
941
|
-
return (
|
|
1185
|
+
const n = e ?? t, s = o ?? a;
|
|
1186
|
+
return (xa[n] || I)({ inOptions: s, options: s });
|
|
942
1187
|
};
|
|
943
|
-
|
|
944
|
-
render:
|
|
1188
|
+
ba({
|
|
1189
|
+
render: Pa,
|
|
945
1190
|
inputOnly: x,
|
|
946
1191
|
inputWithLabel: I,
|
|
947
|
-
inputWithLabelButton:
|
|
1192
|
+
inputWithLabelButton: j
|
|
948
1193
|
});
|
|
949
|
-
const
|
|
1194
|
+
const k = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
950
1195
|
const e = t && Object.keys(t).length > 0 ? t : a;
|
|
951
|
-
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 ?
|
|
952
|
-
},
|
|
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 = {
|
|
953
1198
|
version: "1.2.0",
|
|
954
1199
|
name: "json-renderers-build-form"
|
|
955
|
-
},
|
|
956
|
-
typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuildForm = { meta:
|
|
957
|
-
},
|
|
1200
|
+
}, Ia = (t) => {
|
|
1201
|
+
typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), globalThis.ks.jsonRenderersBuildForm = { meta: Aa, render: t });
|
|
1202
|
+
}, ka = "div", Ba = {
|
|
958
1203
|
class: "${cardClass}",
|
|
959
1204
|
"data-role": "form-card"
|
|
960
|
-
},
|
|
1205
|
+
}, Fa = [
|
|
961
1206
|
{
|
|
962
1207
|
tagName: "header",
|
|
963
1208
|
attributes: {
|
|
@@ -1038,14 +1283,14 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1038
1283
|
}
|
|
1039
1284
|
]
|
|
1040
1285
|
}
|
|
1041
|
-
],
|
|
1042
|
-
tagName:
|
|
1043
|
-
attributes:
|
|
1044
|
-
children:
|
|
1045
|
-
},
|
|
1046
|
-
destinationRole:
|
|
1047
|
-
template:
|
|
1048
|
-
},
|
|
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 = {
|
|
1049
1294
|
tagName: "button",
|
|
1050
1295
|
textContent: "${label}",
|
|
1051
1296
|
attributes: {
|
|
@@ -1053,20 +1298,20 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1053
1298
|
form: "${formId}",
|
|
1054
1299
|
class: "${buttonClass} ${buttonSizeClass} ${buttonPaddingClass}"
|
|
1055
1300
|
}
|
|
1056
|
-
},
|
|
1057
|
-
button:
|
|
1058
|
-
},
|
|
1059
|
-
const e = structuredClone(t), o =
|
|
1060
|
-
return
|
|
1061
|
-
},
|
|
1062
|
-
destinationRole:
|
|
1063
|
-
},
|
|
1301
|
+
}, Oa = {
|
|
1302
|
+
button: Ea
|
|
1303
|
+
}, Da = (t, a) => {
|
|
1304
|
+
const e = structuredClone(t), o = m(a.header.actions, Oa[M.template]);
|
|
1305
|
+
return C(e, M.destinationRole).children.push(...o), e;
|
|
1306
|
+
}, La = "form-body", Ka = {
|
|
1307
|
+
destinationRole: La
|
|
1308
|
+
}, Va = {
|
|
1064
1309
|
tagName: "div",
|
|
1065
1310
|
attributes: {
|
|
1066
1311
|
class: "${rowClass}"
|
|
1067
1312
|
},
|
|
1068
1313
|
children: []
|
|
1069
|
-
},
|
|
1314
|
+
}, Ha = {
|
|
1070
1315
|
tagName: "div",
|
|
1071
1316
|
attributes: {
|
|
1072
1317
|
class: "${fieldClass}"
|
|
@@ -1092,7 +1337,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1092
1337
|
}
|
|
1093
1338
|
}
|
|
1094
1339
|
]
|
|
1095
|
-
},
|
|
1340
|
+
}, Ma = {
|
|
1096
1341
|
tagName: "div",
|
|
1097
1342
|
attributes: {
|
|
1098
1343
|
class: "${fieldClass}"
|
|
@@ -1119,7 +1364,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1119
1364
|
}
|
|
1120
1365
|
}
|
|
1121
1366
|
]
|
|
1122
|
-
},
|
|
1367
|
+
}, Wa = {
|
|
1123
1368
|
tagName: "div",
|
|
1124
1369
|
attributes: {
|
|
1125
1370
|
class: "${fieldClass}"
|
|
@@ -1145,7 +1390,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1145
1390
|
}
|
|
1146
1391
|
}
|
|
1147
1392
|
]
|
|
1148
|
-
},
|
|
1393
|
+
}, qa = {
|
|
1149
1394
|
tagName: "div",
|
|
1150
1395
|
attributes: {
|
|
1151
1396
|
class: "${checkboxWrapperClass} ${fieldClass}"
|
|
@@ -1170,7 +1415,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1170
1415
|
}
|
|
1171
1416
|
}
|
|
1172
1417
|
]
|
|
1173
|
-
},
|
|
1418
|
+
}, Ga = {
|
|
1174
1419
|
tagName: "div",
|
|
1175
1420
|
attributes: {
|
|
1176
1421
|
class: "${fieldClass}"
|
|
@@ -1196,7 +1441,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1196
1441
|
}
|
|
1197
1442
|
}
|
|
1198
1443
|
]
|
|
1199
|
-
},
|
|
1444
|
+
}, za = {
|
|
1200
1445
|
tagName: "div",
|
|
1201
1446
|
attributes: {
|
|
1202
1447
|
class: "${fieldClass}"
|
|
@@ -1223,7 +1468,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1223
1468
|
}
|
|
1224
1469
|
}
|
|
1225
1470
|
]
|
|
1226
|
-
},
|
|
1471
|
+
}, Ua = {
|
|
1227
1472
|
tagName: "div",
|
|
1228
1473
|
attributes: {
|
|
1229
1474
|
class: "${fieldClass}"
|
|
@@ -1257,7 +1502,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1257
1502
|
}
|
|
1258
1503
|
}
|
|
1259
1504
|
]
|
|
1260
|
-
},
|
|
1505
|
+
}, Ja = {
|
|
1261
1506
|
tagName: "div",
|
|
1262
1507
|
attributes: {
|
|
1263
1508
|
class: "${fieldClass}"
|
|
@@ -1292,7 +1537,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1292
1537
|
}
|
|
1293
1538
|
}
|
|
1294
1539
|
]
|
|
1295
|
-
},
|
|
1540
|
+
}, _a = {
|
|
1296
1541
|
tagName: "div",
|
|
1297
1542
|
attributes: {
|
|
1298
1543
|
class: "${fieldClass}"
|
|
@@ -1318,7 +1563,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1318
1563
|
}
|
|
1319
1564
|
}
|
|
1320
1565
|
]
|
|
1321
|
-
},
|
|
1566
|
+
}, Xa = {
|
|
1322
1567
|
tagName: "div",
|
|
1323
1568
|
attributes: {
|
|
1324
1569
|
class: "${inlineCheckboxWrapperClass}"
|
|
@@ -1343,43 +1588,43 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1343
1588
|
}
|
|
1344
1589
|
}
|
|
1345
1590
|
]
|
|
1346
|
-
},
|
|
1347
|
-
buildBodyTr:
|
|
1348
|
-
buildBodyCell:
|
|
1349
|
-
buildRequiredField:
|
|
1350
|
-
buildTextareaField:
|
|
1351
|
-
buildCheckboxField:
|
|
1352
|
-
buildInlineField:
|
|
1353
|
-
buildInlineRequiredField:
|
|
1354
|
-
buildInlineFieldWithButton:
|
|
1355
|
-
buildInlineRequiredFieldWithButton:
|
|
1356
|
-
buildInlineTextareaField:
|
|
1357
|
-
buildInlineCheckboxField:
|
|
1358
|
-
},
|
|
1359
|
-
const o = t.map((
|
|
1360
|
-
var
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
return
|
|
1364
|
-
...
|
|
1365
|
-
label:
|
|
1366
|
-
type:
|
|
1367
|
-
placeholder:
|
|
1368
|
-
buttonType:
|
|
1369
|
-
template: { ...
|
|
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) => {
|
|
1604
|
+
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");
|
|
1607
|
+
let l = ((d = e.fieldTemplates) == null ? void 0 : d[i]) ?? i;
|
|
1608
|
+
return r.buttonText && (l = ((h = e.buttonFieldTemplates) == null ? void 0 : h[l]) ?? l), {
|
|
1609
|
+
...r,
|
|
1610
|
+
label: r.label ?? r.title ?? r.columnName,
|
|
1611
|
+
type: r.type ?? "text",
|
|
1612
|
+
placeholder: r.placeholder ?? "",
|
|
1613
|
+
buttonType: r.buttonType ?? "button",
|
|
1614
|
+
template: { ...r.template, body: { ...(w = r.template) == null ? void 0 : w.body, cell: l } }
|
|
1370
1615
|
};
|
|
1371
|
-
}), n = a[0] ?? {},
|
|
1372
|
-
|
|
1373
|
-
n[
|
|
1616
|
+
}), n = a[0] ?? {}, s = Object.fromEntries(o.map((r) => [
|
|
1617
|
+
r.columnName,
|
|
1618
|
+
n[r.columnName] ?? r.value ?? ""
|
|
1374
1619
|
]));
|
|
1375
|
-
return { columns: o, rows: [
|
|
1376
|
-
},
|
|
1377
|
-
const o =
|
|
1378
|
-
return
|
|
1379
|
-
},
|
|
1380
|
-
destinationRole:
|
|
1381
|
-
template:
|
|
1382
|
-
},
|
|
1620
|
+
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 = {
|
|
1383
1628
|
tagName: "button",
|
|
1384
1629
|
textContent: "${label}",
|
|
1385
1630
|
attributes: {
|
|
@@ -1387,28 +1632,28 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1387
1632
|
form: "${formId}",
|
|
1388
1633
|
class: "${buttonClass} ${buttonSizeClass} ${buttonPaddingClass}"
|
|
1389
1634
|
}
|
|
1390
|
-
},
|
|
1391
|
-
button:
|
|
1392
|
-
},
|
|
1393
|
-
const e = structuredClone(t), o =
|
|
1394
|
-
return
|
|
1395
|
-
},
|
|
1635
|
+
}, oo = {
|
|
1636
|
+
button: ao
|
|
1637
|
+
}, no = (t, a) => {
|
|
1638
|
+
const e = structuredClone(t), o = m(a.footer.actions, oo[W.template]);
|
|
1639
|
+
return C(e, W.destinationRole).children.push(...o), e;
|
|
1640
|
+
}, Z = ({ inColumns: t, inData: a, inOptions: e, columns: o, data: n, options: s } = {}) => ({
|
|
1396
1641
|
columns: Array.isArray(t) && t.length > 0 ? t : Array.isArray(o) ? o : [],
|
|
1397
1642
|
records: Array.isArray(a) && a.length > 0 ? a : Array.isArray(n) ? n : [],
|
|
1398
|
-
options: e && Object.keys(e).length > 0 ? e :
|
|
1399
|
-
}),
|
|
1400
|
-
formId:
|
|
1401
|
-
title:
|
|
1402
|
-
description:
|
|
1403
|
-
recordId:
|
|
1404
|
-
header:
|
|
1405
|
-
body:
|
|
1406
|
-
footer:
|
|
1407
|
-
},
|
|
1643
|
+
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 = {
|
|
1408
1653
|
actions: []
|
|
1409
|
-
},
|
|
1654
|
+
}, ho = {
|
|
1410
1655
|
actions: []
|
|
1411
|
-
},
|
|
1656
|
+
}, fo = {
|
|
1412
1657
|
actions: [
|
|
1413
1658
|
{
|
|
1414
1659
|
label: "Refresh",
|
|
@@ -1416,14 +1661,14 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1416
1661
|
buttonClass: "${headerButtonClass}"
|
|
1417
1662
|
}
|
|
1418
1663
|
]
|
|
1419
|
-
},
|
|
1664
|
+
}, yo = {
|
|
1420
1665
|
actions: []
|
|
1421
|
-
},
|
|
1422
|
-
none:
|
|
1423
|
-
label:
|
|
1424
|
-
labelWithRefresh:
|
|
1425
|
-
labelWithId:
|
|
1426
|
-
},
|
|
1666
|
+
}, Co = {
|
|
1667
|
+
none: mo,
|
|
1668
|
+
label: ho,
|
|
1669
|
+
labelWithRefresh: fo,
|
|
1670
|
+
labelWithId: yo
|
|
1671
|
+
}, wo = {
|
|
1427
1672
|
fieldTemplates: {
|
|
1428
1673
|
buildBodyCell: "buildInlineField",
|
|
1429
1674
|
buildRequiredField: "buildInlineRequiredField",
|
|
@@ -1434,19 +1679,19 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1434
1679
|
buildInlineField: "buildInlineFieldWithButton",
|
|
1435
1680
|
buildInlineRequiredField: "buildInlineRequiredFieldWithButton"
|
|
1436
1681
|
}
|
|
1437
|
-
},
|
|
1682
|
+
}, $o = {
|
|
1438
1683
|
fieldTemplates: {},
|
|
1439
1684
|
buttonFieldTemplates: {}
|
|
1440
|
-
},
|
|
1685
|
+
}, go = {
|
|
1441
1686
|
fieldTemplates: {},
|
|
1442
1687
|
buttonFieldTemplates: {}
|
|
1443
|
-
},
|
|
1444
|
-
inline:
|
|
1445
|
-
stacked:
|
|
1446
|
-
threeColumns:
|
|
1447
|
-
},
|
|
1688
|
+
}, No = {
|
|
1689
|
+
inline: wo,
|
|
1690
|
+
stacked: $o,
|
|
1691
|
+
threeColumns: go
|
|
1692
|
+
}, To = {
|
|
1448
1693
|
actions: []
|
|
1449
|
-
},
|
|
1694
|
+
}, xo = {
|
|
1450
1695
|
actions: [
|
|
1451
1696
|
{
|
|
1452
1697
|
label: "Save",
|
|
@@ -1459,7 +1704,7 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1459
1704
|
buttonClass: "${secondaryButtonClass}"
|
|
1460
1705
|
}
|
|
1461
1706
|
]
|
|
1462
|
-
},
|
|
1707
|
+
}, Po = {
|
|
1463
1708
|
actions: [
|
|
1464
1709
|
{
|
|
1465
1710
|
label: "Edit",
|
|
@@ -1467,31 +1712,31 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1467
1712
|
buttonClass: "${infoButtonClass}"
|
|
1468
1713
|
}
|
|
1469
1714
|
]
|
|
1470
|
-
},
|
|
1471
|
-
none:
|
|
1472
|
-
saveCancel:
|
|
1473
|
-
edit:
|
|
1715
|
+
}, Ao = {
|
|
1716
|
+
none: To,
|
|
1717
|
+
saveCancel: xo,
|
|
1718
|
+
edit: Po
|
|
1474
1719
|
}, B = (t, a, e) => {
|
|
1475
1720
|
const o = t[a];
|
|
1476
1721
|
if (!o) throw new RangeError("Unknown bigButtons " + e + ": " + a);
|
|
1477
1722
|
return o;
|
|
1478
|
-
},
|
|
1723
|
+
}, tt = (t) => {
|
|
1479
1724
|
if (typeof t != "object" || t === null || Array.isArray(t))
|
|
1480
1725
|
throw new TypeError("bigButtons options must be an object keyed by renderer type");
|
|
1481
1726
|
const a = t["form.bigButtons"] ?? {};
|
|
1482
1727
|
if (typeof a != "object" || a === null || Array.isArray(a))
|
|
1483
1728
|
throw new TypeError('options["form.bigButtons"] must be an object');
|
|
1484
|
-
const e = { ...
|
|
1729
|
+
const e = { ...po, ...a };
|
|
1485
1730
|
return {
|
|
1486
1731
|
options: e,
|
|
1487
|
-
header: B(
|
|
1488
|
-
body: B(
|
|
1489
|
-
footer: B(
|
|
1732
|
+
header: B(Co, e.header, "header"),
|
|
1733
|
+
body: B(No, e.body, "body"),
|
|
1734
|
+
footer: B(Ao, e.footer, "footer")
|
|
1490
1735
|
};
|
|
1491
|
-
},
|
|
1492
|
-
const e =
|
|
1493
|
-
return
|
|
1494
|
-
},
|
|
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 = {
|
|
1495
1740
|
none: {
|
|
1496
1741
|
headerClass: "d-none",
|
|
1497
1742
|
headerActionsClass: "d-none"
|
|
@@ -1523,14 +1768,14 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1523
1768
|
headerActionsClass: "d-none",
|
|
1524
1769
|
headerButtonClass: "btn btn-outline-secondary text-nowrap"
|
|
1525
1770
|
}
|
|
1526
|
-
},
|
|
1527
|
-
bootstrap:
|
|
1528
|
-
},
|
|
1771
|
+
}, Bo = {
|
|
1772
|
+
bootstrap: ko
|
|
1773
|
+
}, Fo = (t, a) => {
|
|
1529
1774
|
var o;
|
|
1530
|
-
const e = (o =
|
|
1775
|
+
const e = (o = Bo[a]) == null ? void 0 : o[t.header];
|
|
1531
1776
|
if (!e) throw new RangeError("Unknown bigButtons header: " + t.header);
|
|
1532
1777
|
return e;
|
|
1533
|
-
},
|
|
1778
|
+
}, So = "bootstrap", jo = {
|
|
1534
1779
|
bootstrap: {
|
|
1535
1780
|
base: {
|
|
1536
1781
|
cardClass: "card border-0 shadow-sm w-100",
|
|
@@ -1560,16 +1805,16 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1560
1805
|
}
|
|
1561
1806
|
}
|
|
1562
1807
|
}
|
|
1563
|
-
},
|
|
1564
|
-
defaultFramework:
|
|
1565
|
-
frameworks:
|
|
1566
|
-
},
|
|
1567
|
-
const e =
|
|
1808
|
+
}, F = {
|
|
1809
|
+
defaultFramework: So,
|
|
1810
|
+
frameworks: jo
|
|
1811
|
+
}, Ro = (t, a) => {
|
|
1812
|
+
const e = F.frameworks[a];
|
|
1568
1813
|
if (!e) throw new RangeError("Unknown bigButtons framework: " + a);
|
|
1569
1814
|
const o = e.bodies[t.body];
|
|
1570
1815
|
if (!o) throw new RangeError("Unknown bigButtons body: " + t.body);
|
|
1571
1816
|
return { ...e.base, ...o };
|
|
1572
|
-
},
|
|
1817
|
+
}, vo = {
|
|
1573
1818
|
base: {
|
|
1574
1819
|
footerClass: "card-footer bg-transparent",
|
|
1575
1820
|
footerActionsClass: "d-flex flex-wrap justify-content-end gap-2",
|
|
@@ -1587,95 +1832,100 @@ const j = ({ inOptions: t = {}, options: a = {} } = {}) => {
|
|
|
1587
1832
|
saveCancel: {},
|
|
1588
1833
|
edit: {}
|
|
1589
1834
|
}
|
|
1590
|
-
},
|
|
1591
|
-
bootstrap:
|
|
1592
|
-
},
|
|
1593
|
-
const e =
|
|
1835
|
+
}, Eo = {
|
|
1836
|
+
bootstrap: vo
|
|
1837
|
+
}, Oo = (t, a) => {
|
|
1838
|
+
const e = Eo[a], o = e == null ? void 0 : e.footers[t.footer];
|
|
1594
1839
|
if (!e) throw new RangeError("Unknown bigButtons framework: " + a);
|
|
1595
1840
|
if (!o) throw new RangeError("Unknown bigButtons footer: " + t.footer);
|
|
1596
1841
|
return { ...e.base, ...o };
|
|
1597
|
-
},
|
|
1598
|
-
const e =
|
|
1599
|
-
if (!
|
|
1600
|
-
const
|
|
1842
|
+
}, Do = (t, a = {}) => {
|
|
1843
|
+
const e = tt(Z(a).options), { options: o } = e, n = o.framework ?? F.defaultFramework;
|
|
1844
|
+
if (!F.frameworks[n]) throw new RangeError("Unknown bigButtons framework: " + n);
|
|
1845
|
+
const r = Object.assign(
|
|
1601
1846
|
{},
|
|
1602
1847
|
o,
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1848
|
+
Ro(o, n),
|
|
1849
|
+
Fo(o, n),
|
|
1850
|
+
Oo(o, n)
|
|
1606
1851
|
);
|
|
1607
|
-
return
|
|
1608
|
-
},
|
|
1609
|
-
const a =
|
|
1610
|
-
return
|
|
1611
|
-
},
|
|
1852
|
+
return p(r, structuredClone(t));
|
|
1853
|
+
}, Lo = (t = {}) => {
|
|
1854
|
+
const a = ja(), e = Io(a, t);
|
|
1855
|
+
return Do(e, t);
|
|
1856
|
+
}, et = (t = {}) => {
|
|
1612
1857
|
const a = { ...t, type: t.type ?? "form.bigButtons" };
|
|
1613
|
-
return
|
|
1858
|
+
return P(a), Lo(a);
|
|
1614
1859
|
};
|
|
1615
|
-
|
|
1616
|
-
const
|
|
1860
|
+
Ia(et);
|
|
1861
|
+
const Ko = ({
|
|
1617
1862
|
inType: t = "stacked",
|
|
1618
1863
|
inData: a,
|
|
1619
1864
|
inColumns: e
|
|
1620
|
-
} = {}) =>
|
|
1865
|
+
} = {}) => et({
|
|
1621
1866
|
type: t,
|
|
1622
1867
|
columns: e,
|
|
1623
1868
|
data: a
|
|
1624
|
-
}),
|
|
1869
|
+
}), Vo = {
|
|
1625
1870
|
table: V,
|
|
1626
1871
|
tableFromSpec: V,
|
|
1627
|
-
select:
|
|
1628
|
-
selectOptionsOnly:
|
|
1629
|
-
dataList:
|
|
1630
|
-
datalist:
|
|
1631
|
-
searchInput:
|
|
1632
|
-
search:
|
|
1633
|
-
inputRow:
|
|
1634
|
-
form:
|
|
1635
|
-
},
|
|
1636
|
-
|
|
1637
|
-
const a = t == null ? void 0 : t.showLog
|
|
1638
|
-
|
|
1872
|
+
select: ea,
|
|
1873
|
+
selectOptionsOnly: ra,
|
|
1874
|
+
dataList: H,
|
|
1875
|
+
datalist: H,
|
|
1876
|
+
searchInput: k,
|
|
1877
|
+
search: k,
|
|
1878
|
+
inputRow: k,
|
|
1879
|
+
form: Ko
|
|
1880
|
+
}, at = (t = {}) => {
|
|
1881
|
+
P(t);
|
|
1882
|
+
const a = t == null ? void 0 : t.showLog;
|
|
1883
|
+
console.log("localShowLog : ", a);
|
|
1884
|
+
const e = t.type, o = t == null ? void 0 : t.options;
|
|
1885
|
+
let n = e, s = e;
|
|
1639
1886
|
if (e.includes(".")) {
|
|
1640
1887
|
const l = e.split(".");
|
|
1641
|
-
|
|
1888
|
+
n = l[0], s = l[1];
|
|
1642
1889
|
}
|
|
1643
|
-
|
|
1890
|
+
a && console.log("localMainType : ", n, s);
|
|
1891
|
+
const r = Vo[n];
|
|
1644
1892
|
if (!r)
|
|
1645
|
-
throw new Error(`Renderer for type "${
|
|
1646
|
-
const
|
|
1647
|
-
inType:
|
|
1893
|
+
throw new Error(`Renderer for type "${n}" not found.`);
|
|
1894
|
+
const i = r({
|
|
1895
|
+
inType: s,
|
|
1648
1896
|
inColumns: t.columns,
|
|
1649
1897
|
inData: t.data,
|
|
1650
|
-
inOptions:
|
|
1898
|
+
inOptions: o,
|
|
1651
1899
|
options: t.options,
|
|
1652
1900
|
inShowLog: a
|
|
1653
1901
|
});
|
|
1654
|
-
return a && console.log("json-renderers-build output:",
|
|
1902
|
+
return a && console.log("json-renderers-build output:", i), i;
|
|
1655
1903
|
};
|
|
1656
|
-
|
|
1657
|
-
const
|
|
1904
|
+
Pt(at);
|
|
1905
|
+
const Ho = ({
|
|
1658
1906
|
inColumns: t,
|
|
1659
1907
|
inType: a = "table",
|
|
1660
1908
|
inData: e,
|
|
1661
|
-
inShowLog: o = !1
|
|
1662
|
-
|
|
1909
|
+
inShowLog: o = !1,
|
|
1910
|
+
inOptions: n
|
|
1911
|
+
} = {}) => at({
|
|
1663
1912
|
type: a,
|
|
1664
1913
|
data: e ?? [],
|
|
1665
1914
|
columns: t,
|
|
1666
|
-
showLog: o
|
|
1667
|
-
|
|
1668
|
-
|
|
1915
|
+
showLog: o,
|
|
1916
|
+
options: n
|
|
1917
|
+
}), Mo = {
|
|
1918
|
+
version: "v10",
|
|
1669
1919
|
description: "JSON-to-DOM engine with SVG namespace support, mixed text content, and centralized traversal"
|
|
1670
|
-
},
|
|
1920
|
+
}, Wo = (t) => {
|
|
1671
1921
|
if (typeof globalThis > "u" || !t) return;
|
|
1672
1922
|
globalThis.ks ?? (globalThis.ks = {});
|
|
1673
1923
|
const a = {
|
|
1674
|
-
meta:
|
|
1924
|
+
meta: Mo,
|
|
1675
1925
|
buildSpecElement: t
|
|
1676
1926
|
};
|
|
1677
1927
|
globalThis.ks["json-to-tag"] = a, globalThis.ks.jsonToTag = a;
|
|
1678
|
-
},
|
|
1928
|
+
}, 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([
|
|
1679
1929
|
"svg",
|
|
1680
1930
|
"path",
|
|
1681
1931
|
"symbol",
|
|
@@ -1702,100 +1952,103 @@ const vo = ({
|
|
|
1702
1952
|
"fegaussianblur",
|
|
1703
1953
|
"femerge",
|
|
1704
1954
|
"femergenode"
|
|
1705
|
-
]),
|
|
1955
|
+
]), Jo = ({ inTagName: t }) => {
|
|
1706
1956
|
const a = t == null ? void 0 : t.toLowerCase();
|
|
1707
1957
|
if (!a) return null;
|
|
1708
1958
|
if (a === "checkbox") {
|
|
1709
1959
|
const e = document.createElement("input");
|
|
1710
1960
|
return e.type = "checkbox", e;
|
|
1711
1961
|
}
|
|
1712
|
-
return
|
|
1713
|
-
},
|
|
1962
|
+
return Uo.has(a) ? document.createElementNS(zo, a) : document.createElement(a);
|
|
1963
|
+
}, _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 }) => {
|
|
1714
1964
|
const e = t, o = a;
|
|
1715
1965
|
if (!e || !o || typeof o != "object")
|
|
1716
1966
|
return e;
|
|
1717
1967
|
const n = typeof SVGElement < "u" ? e instanceof SVGElement : e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1718
|
-
return Object.entries(o).forEach(([
|
|
1719
|
-
if (
|
|
1720
|
-
n ? e.setAttribute("class", String(
|
|
1968
|
+
return Object.entries(o).forEach(([s, r]) => {
|
|
1969
|
+
if (s === "class") {
|
|
1970
|
+
n ? e.setAttribute("class", String(r)) : e.className = r;
|
|
1721
1971
|
return;
|
|
1722
1972
|
}
|
|
1723
|
-
if (
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1973
|
+
if (s === "xlink:href" || s === "href") {
|
|
1974
|
+
if (r != null) {
|
|
1975
|
+
const i = String(r);
|
|
1726
1976
|
if (n)
|
|
1727
1977
|
try {
|
|
1728
|
-
e.setAttributeNS(
|
|
1978
|
+
e.setAttributeNS(Qo, "href", i);
|
|
1729
1979
|
} catch {
|
|
1730
1980
|
}
|
|
1731
|
-
e.setAttribute("href",
|
|
1981
|
+
e.setAttribute("href", i), e.setAttribute("xlink:href", i);
|
|
1732
1982
|
}
|
|
1733
1983
|
return;
|
|
1734
1984
|
}
|
|
1735
|
-
if (typeof
|
|
1736
|
-
|
|
1985
|
+
if (typeof r == "boolean") {
|
|
1986
|
+
r ? e.setAttribute(s, "") : e.removeAttribute(s);
|
|
1737
1987
|
return;
|
|
1738
1988
|
}
|
|
1739
|
-
|
|
1989
|
+
r != null && e.setAttribute(s, String(r));
|
|
1740
1990
|
}), e;
|
|
1741
|
-
},
|
|
1991
|
+
}, Zo = ({ inElement: t, inClassList: a }) => {
|
|
1742
1992
|
if (!t || !a) return t;
|
|
1743
1993
|
const e = typeof a == "string" ? a.split(/\s+/).filter(Boolean) : Array.isArray(a) ? a.filter((o) => typeof o == "string" && o.trim()) : [];
|
|
1744
1994
|
return e.length && t.classList.add(...e), t;
|
|
1745
|
-
},
|
|
1995
|
+
}, tn = (t) => {
|
|
1746
1996
|
if (!t || typeof t != "object" || Array.isArray(t) || !t.tagName) return null;
|
|
1747
|
-
const a =
|
|
1997
|
+
const a = Jo({ inTagName: t.tagName });
|
|
1748
1998
|
if (!a) return null;
|
|
1749
|
-
if (
|
|
1999
|
+
if (_o({
|
|
1750
2000
|
inElement: a,
|
|
1751
|
-
inTextContent:
|
|
2001
|
+
inTextContent: Go(t.textContent),
|
|
1752
2002
|
inTagName: t.tagName
|
|
1753
|
-
}),
|
|
2003
|
+
}), Xo({
|
|
1754
2004
|
inElement: a,
|
|
1755
2005
|
inProperties: t.properties
|
|
1756
|
-
}),
|
|
2006
|
+
}), Yo({
|
|
1757
2007
|
inElement: a,
|
|
1758
2008
|
inAttributes: t.attributes
|
|
1759
|
-
}),
|
|
2009
|
+
}), Zo({
|
|
1760
2010
|
inElement: a,
|
|
1761
2011
|
inClassList: t.classList
|
|
1762
2012
|
}), Array.isArray(t.children)) {
|
|
1763
|
-
const e =
|
|
2013
|
+
const e = ot(t.children);
|
|
1764
2014
|
e.length && a.append(...e);
|
|
1765
2015
|
}
|
|
1766
2016
|
return a;
|
|
1767
|
-
},
|
|
2017
|
+
}, 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 = {}) => {
|
|
1768
2018
|
const a = (t == null ? void 0 : t.spec) ?? (t == null ? void 0 : t.inSpec) ?? t;
|
|
1769
|
-
return
|
|
2019
|
+
return nt(a);
|
|
1770
2020
|
};
|
|
1771
|
-
|
|
1772
|
-
const
|
|
2021
|
+
Wo(st);
|
|
2022
|
+
const en = ({
|
|
1773
2023
|
inSpec: t,
|
|
1774
2024
|
inTargetHtmlId: a,
|
|
1775
2025
|
inAppendPosition: e,
|
|
1776
2026
|
inShowLog: o = !1
|
|
1777
2027
|
} = {}) => {
|
|
1778
|
-
const n = t,
|
|
1779
|
-
|
|
1780
|
-
const
|
|
1781
|
-
return
|
|
1782
|
-
},
|
|
1783
|
-
g(t)
|
|
1784
|
-
const e =
|
|
2028
|
+
const n = t, s = a, r = e, i = o, l = st(n);
|
|
2029
|
+
i && console.log("renderToDom 1 (content):", l);
|
|
2030
|
+
const c = document.getElementById(s);
|
|
2031
|
+
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;
|
|
2032
|
+
}, an = (t = {}) => {
|
|
2033
|
+
g(t);
|
|
2034
|
+
const a = t == null ? void 0 : t.showLog, e = t == null ? void 0 : t.options;
|
|
2035
|
+
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);
|
|
2036
|
+
const o = Ho({
|
|
1785
2037
|
inColumns: t.columns,
|
|
1786
2038
|
inData: t.data,
|
|
1787
2039
|
inType: t.type,
|
|
1788
|
-
inShowLog: t.showLog
|
|
2040
|
+
inShowLog: t.showLog,
|
|
2041
|
+
inOptions: e
|
|
1789
2042
|
});
|
|
1790
|
-
return
|
|
1791
|
-
inSpec:
|
|
2043
|
+
return en({
|
|
2044
|
+
inSpec: o,
|
|
1792
2045
|
inTargetHtmlId: t.targetHtmlId,
|
|
1793
2046
|
inAppendPosition: t.appendPosition,
|
|
1794
2047
|
inShowLog: t.showLog
|
|
1795
2048
|
});
|
|
1796
2049
|
};
|
|
1797
|
-
|
|
2050
|
+
ct(an);
|
|
1798
2051
|
export {
|
|
1799
|
-
|
|
1800
|
-
|
|
2052
|
+
an as default,
|
|
2053
|
+
an as render
|
|
1801
2054
|
};
|