@saltcorn/markup
Advanced tools
Comparing version 0.6.4-beta.2 to 0.6.4-beta.3
@@ -266,11 +266,10 @@ "use strict"; | ||
if (action_name === "GoBack") { | ||
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"`); | ||
const reload = configuration.reload_after ? "reload_on_init();" : ""; | ||
const doNav = !configuration.steps || configuration.steps !== 1 | ||
? "history.back()" | ||
: `history.go(${-1 * configuration.steps})`; | ||
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"`); | ||
return mkBtn(`onClick="${reload}saveAndContinue(this,()=>${doNav})" type="button"`); | ||
else | ||
return mkBtn(`onClick="${reload}${doNav}" type="button"`); | ||
} | ||
@@ -277,0 +276,0 @@ if (action_name === "SaveAndContinue") { |
@@ -30,5 +30,5 @@ "use strict"; | ||
? false | ||
: selected.length | ||
: Array.isArray(selected) | ||
? selected.includes(value) | ||
: value === selected; | ||
: `${value}` === `${selected}`; | ||
return options | ||
@@ -35,0 +35,0 @@ .map((o) => { |
@@ -73,2 +73,10 @@ "use strict"; | ||
}; | ||
function validID(s) { | ||
return s | ||
? s | ||
.normalize("NFD") | ||
.replace(/[\u0300-\u036f]/g, "") | ||
.replace(/^[^a-z]+|[^\w:.-]+/gi, "") | ||
: s; | ||
} | ||
/** | ||
@@ -109,3 +117,3 @@ * @param {object} opts | ||
"data-toggle": "tab", | ||
href: `#${rndid}tab${ix}`, | ||
href: `#${validID(titles[ix])}`, | ||
role: "tab", | ||
@@ -118,3 +126,3 @@ "aria-controls": `${rndid}tab${ix}`, | ||
role: "tabpanel", | ||
id: `${rndid}tab${ix}`, | ||
id: `${validID(titles[ix])}`, | ||
"aria-labelledby": `${rndid}link${ix}`, | ||
@@ -121,0 +129,0 @@ }, go(t, false, ix))))); |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "0.6.4-beta.2", | ||
"version": "0.6.4-beta.3", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -35,3 +35,3 @@ "homepage": "https://saltcorn.com", | ||
"devDependencies": { | ||
"@saltcorn/types": "0.6.4-beta.2", | ||
"@saltcorn/types": "0.6.4-beta.3", | ||
"@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
168530
1975