@lifeart/gxt
Version:
<img align="right" width="95" height="95" alt="Philosopher’s stone, logo of PostCSS" src="./public/logo.png">
104 lines (90 loc) • 3.08 kB
JavaScript
import { $ as $nodes, i as isTagLike } from './reactive-CVZF9xBs.js';
export { p as $PROPS_SYMBOL, o as $SLOTS_SYMBOL, U as $_GET_ARGS, W as $_GET_FW, O as $_GET_SCOPES, V as $_GET_SLOTS, u as $_HTMLProvider, w as $_MANAGERS, v as $_MathMLProvider, q as $_SVGProvider, x as $_TO_VALUE, a6 as $_api, X as $_args, _ as $_c, a1 as $_component, y as $_componentHelper, a0 as $_dc, T as $_each, S as $_eachSync, m as $_edp, n as $_emptySlot, a7 as $_fin, K as $_hasBlock, L as $_hasBlockParams, a3 as $_helper, A as $_helperHelper, Y as $_if, M as $_inElement, P as $_maybeHelper, a2 as $_maybeModifier, z as $_modifierHelper, Z as $_slot, a5 as $_tag, a4 as $_text, N as $_ucw, j as $args, k as $fwProp, h as $template, C as Component, R as Root, c as cell, a as cellFor, Q as cellToText, B as createRoot, d as destroyElementSync, g as effect, f as formula, J as getNodeCounter, F as getRoot, H as incrementNodeCounter, e as registerDestructor, r as renderComponent, I as resetNodeCounter, D as resetRoot, G as resolveRenderable, b as runDestructors, E as setRoot, s as syncDom, l as takeRenderingControl, t as tracked } from './reactive-CVZF9xBs.js';
function hbs(tpl) {
return {
[$nodes]: [],
ctx: null,
tpl
};
}
function scope(items) {
if (typeof items !== "object" || items === null) {
throw new Error("scope() accepts only object");
}
}
function isTag(arg) {
if (typeof arg === "object" && arg !== null && isTagLike(arg)) {
return true;
} else {
return false;
}
}
function $__eq(...args) {
const firstValue = isTag(args[0]) ? args[0].value : args[0];
return args.every((arg) => (isTag(arg) ? arg.value : arg) === firstValue);
}
function $__if(condition, ifTrue, ifFalse = "") {
if (isTag(condition)) {
return condition.value ? ifTrue : ifFalse;
}
return condition ? ifTrue : ifFalse;
}
function $__log(...args) {
console.log(...args);
return "";
}
function $__debugger(...args) {
console.info(this, ...args);
debugger;
return "";
}
function $__array(...params) {
return params;
}
function $__hash(obj) {
const newObj = {};
Object.keys(obj).forEach((key) => {
Object.defineProperty(newObj, key, {
get() {
const value = obj[key];
if (typeof value === "function") {
return value.call(obj);
} else {
return value;
}
},
set() {
if (IS_DEV_MODE) {
throw new Error("unable to set hash object");
}
},
enumerable: true
});
});
return newObj;
}
function $__fn(fn, ...args) {
return (...tail) => {
return fn(...args, ...tail);
};
}
function $__or(...args) {
return args.find((arg) => {
return isTag(arg) ? !!arg.value : !!arg;
});
}
function $__not(arg) {
if (isTag(arg)) {
return !arg.value;
}
return !arg;
}
function $__and(...args) {
return args.every((arg) => {
if (isTag(arg)) {
return !!arg.value;
}
return !!arg;
});
}
export { $__and, $__array, $__debugger, $__eq, $__fn, $__hash, $__if, $__log, $__not, $__or, $nodes, hbs, scope };