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
403
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.2 to 0.3.2

34

form.js

@@ -288,3 +288,18 @@ const {

},
action({ action_label, confirm, action_style, action_size }) {
action({ action_name, action_label, confirm, action_style, action_size }) {
if (action_name && action_name.startsWith("Login with ")) {
const method_label = action_name.replace("Login with ", "");
return a(
{
href: `/auth/login-with/${method_label}`,
//TODO get url through form.req to reduce coupling
class: [
action_style !== "btn-link" &&
`btn ${action_style || "btn-primary"} ${action_size || ""}`,
],
},
action_label || action_name
);
}
const submitAttr = form.xhrSubmit

@@ -297,3 +312,5 @@ ? 'onClick="ajaxSubmitForm(this)" type="button"'

: `btn ${action_style || "btn-primary"} ${action_size || ""}`
}">${text(form.submitLabel || action_label || "Save")}</button>`;
}">${text(
action_label || form.submitLabel || action_name || "Save"
)}</button>`;
},

@@ -304,3 +321,9 @@ };

const renderForm = (form, csrfToken) => {
const renderForm = (form, csrfToken0) => {
const csrfToken =
csrfToken0 === false || csrfToken0 === ""
? csrfToken0
: csrfToken0 || (form.req && form.req.csrfToken && form.req.csrfToken());
if (typeof form === "string") return form;
if (form.isStateForm) {

@@ -441,4 +464,7 @@ form.class += " px-4 py-3";

module.exports = contract(
is.fun([is.class("Form"), is.or(is.str, is.eq(false))], is.str),
is.fun(
[is.or(is.str, is.class("Form")), is.maybe(is.or(is.str, is.eq(false)))],
is.str
),
renderForm
);

4

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

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

},
"gitHead": "d520cc9f2bfce236879dee252733c8206ecedbba"
"gitHead": "58f9b796e2afa2f827062b987cf83c50d15129c2"
}
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