@saltcorn/markup
Advanced tools
Comparing version 1.1.0 to 1.1.1-beta.0
@@ -128,6 +128,8 @@ "use strict"; | ||
*/ | ||
const localeTime = (date, options = { hour: "2-digit", minute: "2-digit" }, locale = "en") => time({ | ||
datetime: date.toISOString(), | ||
"locale-time-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleTimeString(locale || "en", options)); | ||
const localeTime = (date, options = { hour: "2-digit", minute: "2-digit" }, locale = "en") => date | ||
? time({ | ||
datetime: date.toISOString(), | ||
"locale-time-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleTimeString(locale || "en", options)) | ||
: ""; | ||
/** | ||
@@ -138,6 +140,8 @@ * @param date | ||
*/ | ||
const localeDateTime = (date, options = {}, locale = "en") => time({ | ||
datetime: date.toISOString(), | ||
"locale-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleString(locale || "en", options)); | ||
const localeDateTime = (date, options = {}, locale = "en") => date | ||
? time({ | ||
datetime: date.toISOString(), | ||
"locale-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleString(locale || "en", options)) | ||
: ""; | ||
/** | ||
@@ -148,6 +152,8 @@ * @param date | ||
*/ | ||
const localeDate = (date, options = {}, locale = "en") => time({ | ||
datetime: date.toISOString(), | ||
"locale-date-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleDateString(locale || "en", options)); | ||
const localeDate = (date, options = {}, locale = "en") => date | ||
? time({ | ||
datetime: date.toISOString(), | ||
"locale-date-options": encodeURIComponent(JSON.stringify(options)), | ||
}, date.toLocaleDateString(locale || "en", options)) | ||
: ""; | ||
const badge = (col, lbl) => `<span class="badge bg-${col}">${lbl}</span> `; | ||
@@ -154,0 +160,0 @@ module.exports = { |
@@ -9,4 +9,4 @@ /** | ||
key: string | Function; | ||
width: string; | ||
align: string; | ||
width?: string; | ||
align?: string; | ||
}; | ||
@@ -13,0 +13,0 @@ type OptsParams = { |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "1.1.0", | ||
"version": "1.1.1-beta.0", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -38,3 +38,3 @@ "homepage": "https://saltcorn.com", | ||
"devDependencies": { | ||
"@saltcorn/types": "1.1.0", | ||
"@saltcorn/types": "1.1.1-beta.0", | ||
"@types/escape-html": "^1.0.1", | ||
@@ -41,0 +41,0 @@ "@types/jest": "^29.5.11", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
272722
3539
1