dynamic-html-helpers 1.5.8 → 1.5.9
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.
|
@@ -2299,7 +2299,7 @@ ${r}`), m;
|
|
|
2299
2299
|
}
|
|
2300
2300
|
function j3(e, t) {
|
|
2301
2301
|
let r = t?.length ? t.filter((o) => S2(o)).map((o, c2) => b(e, { ...o, index: c2 + 1 })).join("") : e;
|
|
2302
|
-
return typeof n != "string" ? r : r.replace(/\{
|
|
2302
|
+
return typeof n != "string" ? r : r.replace(/\{.+}/gmi, n ?? "");
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
2305
|
function v3() {
|
|
@@ -2328,26 +2328,29 @@ ${r}`), m;
|
|
|
2328
2328
|
}
|
|
2329
2329
|
function logFactory(formatJSON = true) {
|
|
2330
2330
|
const logContainer = En(`<ul id="log2screen">`).first();
|
|
2331
|
+
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
2332
|
+
return {
|
|
2333
|
+
log: (...txt) => txt.forEach(logLamda),
|
|
2334
|
+
logTop: (...txt) => txt.forEach(logTopLambda)
|
|
2335
|
+
};
|
|
2331
2336
|
function logItem(top2 = false) {
|
|
2332
2337
|
const where2PutIt = top2 ? En.at.start : En.at.end;
|
|
2333
2338
|
return (content) => {
|
|
2334
2339
|
if (content?.isJQx) {
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2340
|
+
const item2 = En.li().append(content);
|
|
2341
|
+
if (content.data.get(`header`)) {
|
|
2342
|
+
item2.addClass(`head`);
|
|
2343
|
+
}
|
|
2344
|
+
return item2.renderTo(logContainer, where2PutIt);
|
|
2339
2345
|
}
|
|
2340
2346
|
content = !En.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2341
2347
|
const isHead = content.startsWith(`!!`);
|
|
2342
2348
|
content = isHead ? content.slice(2) : content;
|
|
2343
|
-
En.li(
|
|
2349
|
+
const item = En.li(content);
|
|
2350
|
+
isHead && item.addClass(`head`);
|
|
2351
|
+
item.renderTo(logContainer, where2PutIt);
|
|
2344
2352
|
};
|
|
2345
2353
|
}
|
|
2346
|
-
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
2347
|
-
return {
|
|
2348
|
-
log: (...txt) => txt.forEach(logLamda),
|
|
2349
|
-
logTop: (...txt) => txt.forEach(logTopLambda)
|
|
2350
|
-
};
|
|
2351
2354
|
}
|
|
2352
2355
|
function tryJSON(content, formatted) {
|
|
2353
2356
|
try {
|