@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.
|
@@ -124698,6 +124698,8 @@ PT.BooleanFilterExpression = void 0;
|
|
|
124698
124698
|
PT.BooleanFilterExpression = {
|
|
124699
124699
|
parse(t) {
|
|
124700
124700
|
var e;
|
|
124701
|
+
if (t.match(/^\s*$/))
|
|
124702
|
+
return { parsed: null, log: [] };
|
|
124701
124703
|
const r = { parsed: null, log: [] };
|
|
124702
124704
|
let i = t.toLowerCase().trim().replace(/\s\s+/, " "), s = !1;
|
|
124703
124705
|
if (i.startsWith("not ") && (s = !0, i = i.slice(4)), i === "true")
|
|
@@ -125658,6 +125660,8 @@ G2.run_parser = btt;
|
|
|
125658
125660
|
const o = On, u = i(Ck), a = s(Sk), l = G2;
|
|
125659
125661
|
t.NumberFilterExpression = {
|
|
125660
125662
|
parse(c) {
|
|
125663
|
+
if (c.match(/^\s*$/))
|
|
125664
|
+
return { parsed: null, log: [] };
|
|
125661
125665
|
const f = new u.Parser(u.Grammar.fromCompiled(a.default)), x = (0, l.run_parser)(c, f);
|
|
125662
125666
|
return x.parsed && (0, o.isNumberFilter)(x.parsed) ? { parsed: x.parsed, log: [] } : { parsed: null, log: x.log };
|
|
125663
125667
|
},
|
|
@@ -125759,6 +125763,8 @@ Tk.default = wtt;
|
|
|
125759
125763
|
const o = On, u = i(Ck), a = s(Tk), l = Qt, c = G2;
|
|
125760
125764
|
t.StringFilterExpression = {
|
|
125761
125765
|
parse(f) {
|
|
125766
|
+
if (f.match(/^\s*$/))
|
|
125767
|
+
return { parsed: null, log: [] };
|
|
125762
125768
|
const x = new u.Parser(u.Grammar.fromCompiled(a.default)), h = (0, c.run_parser)(f, x);
|
|
125763
125769
|
return h.parsed && (0, o.isStringFilter)(h.parsed) ? { parsed: h.parsed, log: [] } : { parsed: null, log: h.log };
|
|
125764
125770
|
},
|
|
@@ -125969,6 +125975,8 @@ Rk.default = Itt;
|
|
|
125969
125975
|
const o = On, u = s(Rk), a = i(Ck), l = G2;
|
|
125970
125976
|
t.TemporalFilterExpression = {
|
|
125971
125977
|
parse(h) {
|
|
125978
|
+
if (h.match(/^\s*$/))
|
|
125979
|
+
return { parsed: null, log: [] };
|
|
125972
125980
|
const p = new a.Parser(a.Grammar.fromCompiled(u.default)), m = (0, l.run_parser)(h, p);
|
|
125973
125981
|
return m.parsed && (0, o.isTemporalFilter)(m.parsed) ? { parsed: m.parsed, log: [] } : { parsed: null, log: m.log };
|
|
125974
125982
|
},
|
|
@@ -126306,6 +126314,8 @@ UT.TemporalFilterCompiler = $tt;
|
|
|
126306
126314
|
}
|
|
126307
126315
|
t.FilterCompilers = {
|
|
126308
126316
|
compile(u, a, l, c) {
|
|
126317
|
+
if (a === null)
|
|
126318
|
+
return "true";
|
|
126309
126319
|
if (u === "string" && (0, e.isStringFilter)(a))
|
|
126310
126320
|
return t.FilterCompilers.stringCompile(a, l, c);
|
|
126311
126321
|
if (u === "number" && (0, e.isNumberFilter)(a))
|
|
@@ -126939,7 +126949,7 @@ let Dk = class extends Qtt {
|
|
|
126939
126949
|
case "compositeField":
|
|
126940
126950
|
return "{COMPOSITE_FIELD}";
|
|
126941
126951
|
case "filterMatch":
|
|
126942
|
-
if ((a.dataType === "string" || a.dataType === "number" || a.dataType === "date" || a.dataType === "timestamp" || a.dataType === "boolean") && (0, jtt.isFilterExpression)(a.filter))
|
|
126952
|
+
if ((a.dataType === "string" || a.dataType === "number" || a.dataType === "date" || a.dataType === "timestamp" || a.dataType === "boolean") && (a.filter === null || (0, jtt.isFilterExpression)(a.filter)))
|
|
126943
126953
|
return Utt.FilterCompilers.compile(a.dataType, a.filter, a.e.sql || "", this.parent.dialect);
|
|
126944
126954
|
throw new Error(`Internal Error: Filter Compiler Undefined Type '${a.dataType}'`);
|
|
126945
126955
|
default:
|
|
@@ -134314,8 +134324,6 @@ class O0t extends D0t.ExpressionDef {
|
|
|
134314
134324
|
if (a.log.length > 0)
|
|
134315
134325
|
for (const c of a.log)
|
|
134316
134326
|
return this.loggedErrorExpr("filter-expression-error", `Filter parse error: ${c.message}`);
|
|
134317
|
-
if (!a.parsed)
|
|
134318
|
-
return this.loggedErrorExpr("filter-expression-type", "FJKLD:JDKSL: expression parsed to null");
|
|
134319
134327
|
const l = {
|
|
134320
134328
|
node: "filterMatch",
|
|
134321
134329
|
dataType: u.type,
|