@saltcorn/markup
Advanced tools
Comparing version 0.6.4-beta.1 to 0.6.4-beta.2
@@ -211,2 +211,7 @@ "use strict"; | ||
const blockDispatch = { | ||
join_field(segment) { | ||
if (segment.sourceURL) | ||
return div({ "data-source-url": segment.sourceURL }, "join data"); | ||
return ""; | ||
}, | ||
field(segment) { | ||
@@ -262,3 +267,11 @@ const field0 = form.fields.find((f) => f.name === segment.field_name); | ||
if (action_name === "GoBack") { | ||
return mkBtn(`onClick="history.back()" type="button"`); | ||
if (!configuration || | ||
(!configuration.save_first && !configuration.reload_after)) | ||
return mkBtn(`onClick="history.back()" type="button"`); | ||
if (configuration.save_first && configuration.reload_after) | ||
return mkBtn(`onClick="saveAndContinue(this,()=>window.location=document.referrer)" type="button"`); | ||
if (configuration.save_first) | ||
return mkBtn(`onClick="saveAndContinue(this,()=>history.back())" type="button"`); | ||
if (configuration.reload_after) | ||
return mkBtn(`onClick="window.location=document.referrer" type="button"`); | ||
} | ||
@@ -265,0 +278,0 @@ if (action_name === "SaveAndContinue") { |
@@ -171,4 +171,5 @@ "use strict"; | ||
return wrap(segment, isTop, ix, img({ | ||
class: "w-100", | ||
class: segment.style && segment.style.width ? null : "w-100", | ||
alt: segment.alt, | ||
style: segment.style, | ||
src: srctype === "File" ? `/files/serve/${segment.fileid}` : segment.url, | ||
@@ -317,5 +318,11 @@ })); | ||
if (cardDeck) | ||
markup = div({ class: "card-deck" }, segment.besides.map((t, ixb) => go(t, false, ixb))); | ||
markup = div({ class: "card-deck", style: segment.style }, segment.besides.map((t, ixb) => go(t, false, ixb))); | ||
else | ||
markup = div({ class: "row w-100" }, segment.besides.map((t, ixb) => div({ | ||
markup = div({ | ||
class: [ | ||
"row", | ||
segment.style && segment.style.width ? null : "w-100", | ||
], | ||
style: segment.style, | ||
}, segment.besides.map((t, ixb) => div({ | ||
class: segment.widths === false | ||
@@ -322,0 +329,0 @@ ? "" |
@@ -25,3 +25,9 @@ "use strict"; | ||
*/ | ||
const transposedBody = (hdrs, vs, opts = {}) => hdrs.map((hdr) => tr(th(hdr.label), (vs || []).map((v) => td(typeof hdr.key === "string" ? text(v[hdr.key]) : hdr.key(v))))); | ||
const transposedBody = (hdrs, vs, opts = {}) => hdrs.map((hdr, ix) => tr(th(hdr.label), (vs || []).map((v) => td(ix === 0 && opts.transpose_width | ||
? { | ||
style: { | ||
width: `${opts.transpose_width}${opts.transpose_width_units}`, | ||
}, | ||
} | ||
: null, typeof hdr.key === "string" ? text(v[hdr.key]) : hdr.key(v))))); | ||
/** | ||
@@ -28,0 +34,0 @@ * @function |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "0.6.4-beta.1", | ||
"version": "0.6.4-beta.2", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -35,3 +35,3 @@ "homepage": "https://saltcorn.com", | ||
"devDependencies": { | ||
"@saltcorn/types": "0.6.4-beta.1", | ||
"@saltcorn/types": "0.6.4-beta.2", | ||
"@types/escape-html": "^1.0.1", | ||
@@ -38,0 +38,0 @@ "@types/jest": "^27.0.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168168
1968