@malloydata/render 0.0.248-dev250325235002 → 0.0.248
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/dist/module/index.mjs
CHANGED
|
@@ -120885,6 +120885,8 @@ xT.BooleanFilterExpression = void 0;
|
|
|
120885
120885
|
xT.BooleanFilterExpression = {
|
|
120886
120886
|
parse(t) {
|
|
120887
120887
|
var e;
|
|
120888
|
+
if (t.match(/^\s*$/))
|
|
120889
|
+
return { parsed: null, log: [] };
|
|
120888
120890
|
const r = { parsed: null, log: [] };
|
|
120889
120891
|
let i = t.toLowerCase().trim().replace(/\s\s+/, " "), s = !1;
|
|
120890
120892
|
if (i.startsWith("not ") && (s = !0, i = i.slice(4)), i === "true")
|
|
@@ -121845,6 +121847,8 @@ h2.run_parser = OXe;
|
|
|
121845
121847
|
const o = bn, u = i(ik), a = s(sk), l = h2;
|
|
121846
121848
|
t.NumberFilterExpression = {
|
|
121847
121849
|
parse(c) {
|
|
121850
|
+
if (c.match(/^\s*$/))
|
|
121851
|
+
return { parsed: null, log: [] };
|
|
121848
121852
|
const f = new u.Parser(u.Grammar.fromCompiled(a.default)), x = (0, l.run_parser)(c, f);
|
|
121849
121853
|
return x.parsed && (0, o.isNumberFilter)(x.parsed) ? { parsed: x.parsed, log: [] } : { parsed: null, log: x.log };
|
|
121850
121854
|
},
|
|
@@ -121946,6 +121950,8 @@ uk.default = IXe;
|
|
|
121946
121950
|
const o = bn, u = i(ik), a = s(uk), l = jt, c = h2;
|
|
121947
121951
|
t.StringFilterExpression = {
|
|
121948
121952
|
parse(f) {
|
|
121953
|
+
if (f.match(/^\s*$/))
|
|
121954
|
+
return { parsed: null, log: [] };
|
|
121949
121955
|
const x = new u.Parser(u.Grammar.fromCompiled(a.default)), h = (0, c.run_parser)(f, x);
|
|
121950
121956
|
return h.parsed && (0, o.isStringFilter)(h.parsed) ? { parsed: h.parsed, log: [] } : { parsed: null, log: h.log };
|
|
121951
121957
|
},
|
|
@@ -122156,6 +122162,8 @@ ak.default = MXe;
|
|
|
122156
122162
|
const o = bn, u = s(ak), a = i(ik), l = h2;
|
|
122157
122163
|
t.TemporalFilterExpression = {
|
|
122158
122164
|
parse(h) {
|
|
122165
|
+
if (h.match(/^\s*$/))
|
|
122166
|
+
return { parsed: null, log: [] };
|
|
122159
122167
|
const p = new a.Parser(a.Grammar.fromCompiled(u.default)), m = (0, l.run_parser)(h, p);
|
|
122160
122168
|
return m.parsed && (0, o.isTemporalFilter)(m.parsed) ? { parsed: m.parsed, log: [] } : { parsed: null, log: m.log };
|
|
122161
122169
|
},
|
|
@@ -122494,6 +122502,8 @@ dT.TemporalFilterCompiler = PXe;
|
|
|
122494
122502
|
}
|
|
122495
122503
|
t.FilterCompilers = {
|
|
122496
122504
|
compile(u, a, l, c) {
|
|
122505
|
+
if (a === null)
|
|
122506
|
+
return "true";
|
|
122497
122507
|
if (u === "string" && (0, e.isStringFilter)(a))
|
|
122498
122508
|
return t.FilterCompilers.stringCompile(a, l, c);
|
|
122499
122509
|
if (u === "number" && (0, e.isNumberFilter)(a))
|
|
@@ -123127,7 +123137,7 @@ let lk = class extends VXe {
|
|
|
123127
123137
|
case "compositeField":
|
|
123128
123138
|
return "{COMPOSITE_FIELD}";
|
|
123129
123139
|
case "filterMatch":
|
|
123130
|
-
if ((a.dataType === "string" || a.dataType === "number" || a.dataType === "date" || a.dataType === "timestamp" || a.dataType === "boolean") && (0, zXe.isFilterExpression)(a.filter))
|
|
123140
|
+
if ((a.dataType === "string" || a.dataType === "number" || a.dataType === "date" || a.dataType === "timestamp" || a.dataType === "boolean") && (a.filter === null || (0, zXe.isFilterExpression)(a.filter)))
|
|
123131
123141
|
return HXe.FilterCompilers.compile(a.dataType, a.filter, a.e.sql || "", this.parent.dialect);
|
|
123132
123142
|
throw new Error(`Internal Error: Filter Compiler Undefined Type '${a.dataType}'`);
|
|
123133
123143
|
default:
|
|
@@ -130502,8 +130512,6 @@ class $ut extends Iut.ExpressionDef {
|
|
|
130502
130512
|
if (a.log.length > 0)
|
|
130503
130513
|
for (const c of a.log)
|
|
130504
130514
|
return this.loggedErrorExpr("filter-expression-error", `Filter parse error: ${c.message}`);
|
|
130505
|
-
if (!a.parsed)
|
|
130506
|
-
return this.loggedErrorExpr("filter-expression-type", "FJKLD:JDKSL: expression parsed to null");
|
|
130507
130515
|
const l = {
|
|
130508
130516
|
node: "filterMatch",
|
|
130509
130517
|
dataType: u.type,
|