Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saltcorn/markup

Package Overview
Dependencies
Maintainers
1
Versions
404
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saltcorn/markup - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2-beta.0

37

form.js

@@ -36,3 +36,2 @@ const {

const isCheck = (hdr) => hdr.type && hdr.type.name === "Bool";
const isHoriz = (formStyle) => formStyle === "horiz";

@@ -47,33 +46,13 @@ const formRowWrap = (hdr, inner, error = "", fStyle, labelCols) =>

},
isCheck(hdr)
? div(
{
class:
isHoriz(fStyle) &&
`col-sm-${12 - labelCols} offset-md-${labelCols}`,
},
hdr.input_type === "section_header"
? div({ class: `col-sm-12` }, h5(text(hdr.label)))
: [
div(
{ class: "form-check" },
inner,
{ class: isHoriz(fStyle) && `col-sm-${labelCols}` },
label(
{
for: `input${text_attr(hdr.form_name)}`,
class: "form-check-label",
for: `input${text_attr(hdr.form_name)}`,
},
text(hdr.label)
),
hdr.sublabel && " — " + i(text(hdr.sublabel)),
text(error)
)
)
: hdr.input_type === "section_header"
? div({ class: `col-sm-12` }, h5(text(hdr.label)))
: [
label(
{
for: `input${text_attr(hdr.form_name)}`,
class: isHoriz(fStyle) && `col-sm-${labelCols} col-form-label`,
},
text(hdr.label)
)
),

@@ -129,3 +108,5 @@ div(

case "code":
return `<textarea mode="${(hdr.attributes||{}).mode||""}" class="to-code form-control ${validClass} ${
return `<textarea mode="${
(hdr.attributes || {}).mode || ""
}" class="to-code form-control ${validClass} ${
hdr.class || ""

@@ -132,0 +113,0 @@ }"${maybe_disabled} data-fieldname="${text_attr(

@@ -29,3 +29,3 @@ const { a, input, div, ul, text, text_attr } = require("./tags");

<input type="hidden" name="_csrf" value=""><div class="form-group">
<label for="inputname" >Name</label>
<div><label for="inputname">Name</label></div>
<div><input type="text" class="form-control " data-fieldname="name" name="name" id="inputname" >

@@ -89,3 +89,3 @@ </div></div><div class="form-group row">

<input type="hidden" name="_csrf" value=""><div class="form-group">
<label for="inputname" >Name</label>
<div><label for="inputname">Name</label></div>
<div><input type="text" class="form-control is-invalid " data-fieldname="name" name="name" id="inputname" value="Bar"><div>Not a foo</div>

@@ -92,0 +92,0 @@ </div></div><div class="form-group row">

{
"name": "@saltcorn/markup",
"version": "0.5.1",
"version": "0.5.2-beta.0",
"description": "Markup for Saltcorn, open-source no-code platform",

@@ -5,0 +5,0 @@ "homepage": "https://saltcorn.com",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc