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
401
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.3.2-beta.1 to 0.3.2-beta.2

53

helpers.js

@@ -68,7 +68,19 @@ const { a, text, div, input, text_attr, ul, li, span } = require("./tags");

v,
{ onClick, placeHolder } = {}
) => `<div class="input-group">
<input type="text" class="form-control bg-light search-bar" placeholder="${
placeHolder || "Search for..."
{ onClick, placeHolder, has_dropdown, contents, badges } = {}
) => {
const rndid = Math.floor(Math.random() * 16777215).toString(16);
return `<div class="input-group search-bar">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary" ${
onClick ? `onClick="${onClick}"` : ""
} type="submit" id="button-search-submit">
<i class="fas fa-search"></i>
</button>
</div>
<input type="text" class="form-control search-bar ${
badges && badges.length > 0 ? "br-none" : ""
}" placeholder="${placeHolder || "Search for..."}"
}"
}"
id="input${text_attr(name)}" name="${name}"

@@ -80,9 +92,32 @@ ${onClick ? `onChange="${onClick}"` : ""}

<div class="input-group-append">
<button class="btn btn-primary" ${
onClick ? `onClick="${onClick}"` : ""
} btype="submit" id="button-search-submit">
<i class="fas fa-search"></i>
</button>
${
badges && badges.length > 0
? `<div class="input-group-text">${badges
.map(
(b) =>
`<span class="badge badge-primary">${b.text}${
b.onclick
? `<a href="javascript:${b.onclick}"><i class="ml-1 fas fa-lg fa-times"></i></a> `
: ""
}</span>`
)
.join("&nbsp;")}
</div>`
: ""
}
${
has_dropdown
? `<button class="btn btn-outline-secondary dropdown-toggle" id="dd${rndid}" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" onclick="align_dropdown('${rndid}')"></button>`
: ""
}
${
has_dropdown
? `<div class="dropdown-menu search-bar p-2" id="dm${rndid}" aria-labelledby="dd${rndid}">
${contents}
</div>`
: ""
}
</div>
</div>`;
};

@@ -89,0 +124,0 @@ const search_bar_form = () => `<form action="/search" method="get">

4

package.json
{
"name": "@saltcorn/markup",
"version": "0.3.2-beta.1",
"version": "0.3.2-beta.2",
"description": "Markup for Saltcorn, open-source no-code platform",

@@ -27,3 +27,3 @@ "homepage": "https://saltcorn.com",

},
"gitHead": "25ac380a46a3c2a90daa30f83bc69836cdee257f"
"gitHead": "d520cc9f2bfce236879dee252733c8206ecedbba"
}
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