circle-ihk
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -60,2 +60,3 @@ export interface User { | ||
device: { | ||
browser: 'edge' | 'opera' | 'firefox' | '360' | 'chrome' | ''; | ||
apple: { | ||
@@ -164,3 +165,3 @@ phone: boolean; | ||
syncUser: (user?: User) => Promise<User>; | ||
cron: (callback: () => void, duration?: number) => Promise<boolean>; | ||
cron: (callback: () => Promise<any> | boolean | void, duration?: number) => Promise<boolean>; | ||
getApp(id: string | Array<string> | Plugin | Array<Plugin>): Promise<Plugin>; | ||
@@ -167,0 +168,0 @@ listApp: (match?: Match, pager?: Pager) => Promise<Array<Plugin>>; |
import each from './each'; | ||
import { isTag, isElement } from './is'; | ||
export default function pageStyle(app) { | ||
let data = '.container .ant-app{padding-right: 0 !important;}'; | ||
const container = app.field('container'); | ||
if (!isElement(container)) { | ||
return ''; | ||
return data; | ||
} | ||
const parentElement = container.parentNode; | ||
if (!parentElement) { | ||
return ''; | ||
return data; | ||
} | ||
let stylesToReturn = ''; | ||
each(parentElement.children, (children) => { | ||
@@ -18,3 +18,3 @@ if (!isTag(children, 'style')) { | ||
const styleToReturn = children.textContent || ''; | ||
styleToReturn.length > 0 && (stylesToReturn += styleToReturn); | ||
styleToReturn.length > 0 && (data += styleToReturn); | ||
}); | ||
@@ -32,6 +32,6 @@ const attrs = []; | ||
const [key, value] = attr.split(':'); | ||
stylesToReturn = stylesToReturn.replace(new RegExp(`var\\(${key}\\)`, 'g'), value); | ||
data = data.replace(new RegExp(`var\\(${key}\\)`, 'g'), value); | ||
}); | ||
} | ||
return stylesToReturn.replace(/\n+/g, ''); | ||
return data.replace(/\\n+/g, ' '); | ||
} |
{ | ||
"name": "circle-ihk", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Circle Reader Component Library", |
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
48242
1404