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.0 to 0.3.2-beta.1

32

layout.js

@@ -23,7 +23,17 @@ const { contract, is } = require("contractis");

const couldHaveAlerts = (alerts) => alerts || Array.isArray(alerts);
const makeSegments = (body, alerts) => {
const alertsSegments =
alerts && alerts.length > 0
? [{ type: "blank", contents: alerts.map((a) => alert(a.type, a.msg)) }]
: [];
const alertsSegments = couldHaveAlerts(alerts)
? [
{
type: "blank",
contents: div(
{ id: "alerts-area" },
(alerts || []).map((a) => alert(a.type, a.msg))
),
},
]
: [];
if (typeof body === "string")

@@ -34,9 +44,5 @@ return {

else if (body.above) {
if (alerts && alerts.length > 0) body.above.unshift(alertsSegments[0]);
if (couldHaveAlerts(alerts)) body.above.unshift(alertsSegments[0]);
return body;
} else {
if (alerts && alerts.length > 0)
return { above: [...alertsSegments, body] };
else return body;
}
} else return { above: [...alertsSegments, body] };
};

@@ -258,2 +264,4 @@ const applyTextStyle = (textStyle, inner, isBlock) => {

hide,
customClass,
customCSS,
} = segment;

@@ -271,2 +279,3 @@ if (hide) return "";

: `${cssNm}: ${segment[segKey]}${unit};`;
const ppCustomCSS = (s) => (s ? s.split("\n").join("") + ";" : "");
return wrap(

@@ -279,2 +288,3 @@ segment,

class: [
customClass || false,
hAlign && `text-${hAlign}`,

@@ -286,3 +296,3 @@ vAlign === "middle" && "d-flex align-items-center",

],
style: `${
style: `${ppCustomCSS(customCSS || "")}${
block === false ? "display: inline-block;" : ""

@@ -289,0 +299,0 @@ }${sizeProp("minHeight", "min-height")}${sizeProp(

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

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

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