@malloydata/render 0.0.157-dev240729184525 → 0.0.157
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 +10 -3
- package/dist/module/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/module/index.mjs
CHANGED
|
@@ -142764,6 +142764,7 @@ class rat {
|
|
|
142764
142764
|
this.document = e;
|
|
142765
142765
|
}
|
|
142766
142766
|
async render(e) {
|
|
142767
|
+
var a;
|
|
142767
142768
|
if (e.isNull())
|
|
142768
142769
|
return uE(this.document);
|
|
142769
142770
|
const { tag: n } = e.field.tagParse(), r = n.tag("link");
|
|
@@ -142774,10 +142775,16 @@ class rat {
|
|
|
142774
142775
|
this.document,
|
|
142775
142776
|
"Invalid type for link renderer."
|
|
142776
142777
|
);
|
|
142777
|
-
const i = r.
|
|
142778
|
-
|
|
142778
|
+
const i = (a = r.tag("key_column")) == null ? void 0 : a.text();
|
|
142779
|
+
let s = e.value || "";
|
|
142780
|
+
if (i && e.parentRecord) {
|
|
142781
|
+
const l = e.parentRecord.cell(i);
|
|
142782
|
+
l && l.isString() && (s = l.value);
|
|
142783
|
+
}
|
|
142784
|
+
const o = r.text("url_template"), u = this.document.createElement("a");
|
|
142785
|
+
return u.href = e.value, o && (o.indexOf("$$") > -1 ? u.href = o.replace("$$", s) : u.href = o + s), u.target = "_blank", u.appendChild(
|
|
142779
142786
|
this.document.createTextNode(e.value.replace(/\//g, "/"))
|
|
142780
|
-
),
|
|
142787
|
+
), u;
|
|
142781
142788
|
}
|
|
142782
142789
|
}
|
|
142783
142790
|
const I_ = class I_ extends xn {
|