@saltcorn/markup
Advanced tools
Comparing version 1.1.0-beta.21 to 1.1.0-beta.22
@@ -40,3 +40,3 @@ /** | ||
mobileBottomNavBar: (currentUrl: string, sections: any[], cls?: string, clsLink?: string) => string; | ||
renderTabs: ({ contents, titles, tabsStyle, ntabs, independent, bodyClass, outerClass, deeplink, disable_inactive, startClosed, acc_init_opens, serverRendered, tabId, tabClass, contentWrapperClass, headerWrapperClass, }: LayoutExports.RenderTabsOpts, go: (segment: any, isTop: boolean, ix: number) => any, activeTabTitle?: string | undefined, hints?: any) => any; | ||
renderTabs: ({ contents, titles, tabsStyle, ntabs, independent, bodyClass, outerClass, deeplink, disable_inactive, startClosed, acc_init_opens, serverRendered, tabId, tabClass, contentWrapperClass, headerWrapperClass, }: LayoutExports.RenderTabsOpts, go: (segment: any, isTop: boolean, ix: number) => any, activeTabTitle?: string | undefined, hints?: any, isMobile?: boolean | undefined) => any; | ||
show_icon: (icon: string | undefined, cls?: string | undefined, no_fw?: Boolean | undefined) => any; | ||
@@ -43,0 +43,0 @@ show_icon_and_label: (icon: string | undefined, label: string, cls?: string | undefined) => string; |
@@ -394,3 +394,3 @@ "use strict"; | ||
*/ | ||
const renderTabs = ({ contents, titles, tabsStyle, ntabs, independent, bodyClass, outerClass, deeplink, disable_inactive, startClosed, acc_init_opens, serverRendered, tabId, tabClass, contentWrapperClass, headerWrapperClass, }, go, activeTabTitle, hints) => { | ||
const renderTabs = ({ contents, titles, tabsStyle, ntabs, independent, bodyClass, outerClass, deeplink, disable_inactive, startClosed, acc_init_opens, serverRendered, tabId, tabClass, contentWrapperClass, headerWrapperClass, }, go, activeTabTitle, hints, isMobile) => { | ||
const rndid = `tab${Math.floor(Math.random() * 16777215).toString(16)}`; | ||
@@ -429,3 +429,3 @@ if (tabsStyle === "Accordion") | ||
else { | ||
let activeIx = (serverRendered || !isNode) && activeTabTitle ? +activeTabTitle : 0; | ||
let activeIx = serverRendered && activeTabTitle ? +activeTabTitle : 0; | ||
if (activeIx === -1) | ||
@@ -436,9 +436,7 @@ activeIx = 0; | ||
const buildOnClick = (ix) => { | ||
const addQueryParam = !isNode | ||
? `parent.saltcorn.mobileApp.navigation.addQueryParam('_tab', ${ix})` | ||
: ""; | ||
const execLink = isMobile ? `execLink('#${validID(titles[ix])}');` : ""; | ||
let result = disable_inactive | ||
? `disable_inactive_tab_inputs('${rndid}'); ` | ||
: ""; | ||
result += addQueryParam; | ||
result += execLink; | ||
return result ? result : undefined; | ||
@@ -445,0 +443,0 @@ }; |
@@ -33,4 +33,6 @@ "use strict"; | ||
id: "toasts-area", | ||
class: `toast-container position-fixed ${isWeb ? "top-0 end-0 p-2" : "bottom-0 start-50 p-0"} `, | ||
style: `z-index: 9999; ${!isWeb ? "margin-bottom: 1.0rem" : ""}`, | ||
class: `toast-container position-fixed ${isWeb | ||
? "top-0 end-0 p-2" | ||
: "bottom-0 start-50 p-0 mobile-toast-margin"} `, | ||
style: "z-index: 9999;", | ||
"aria-live": "polite", | ||
@@ -339,5 +341,5 @@ "aria-atomic": "true", | ||
if (segment.type === "tabs") { | ||
return wrap(segment, isTop, ix, renderTabs(segment, go, segment.serverRendered || !isWeb | ||
return wrap(segment, isTop, ix, renderTabs(segment, go, segment.serverRendered | ||
? req?.query?.[segment.tabId || "_tab"] | ||
: undefined, hints)); | ||
: undefined, hints, !isWeb)); | ||
} | ||
@@ -344,0 +346,0 @@ if (segment.type === "container") { |
{ | ||
"name": "@saltcorn/markup", | ||
"version": "1.1.0-beta.21", | ||
"version": "1.1.0-beta.22", | ||
"description": "Markup for Saltcorn, open-source no-code platform", | ||
@@ -38,3 +38,3 @@ "homepage": "https://saltcorn.com", | ||
"devDependencies": { | ||
"@saltcorn/types": "1.1.0-beta.21", | ||
"@saltcorn/types": "1.1.0-beta.22", | ||
"@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
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
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
271491