Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/jss/src/plugins/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // @flow
import type {
CSSCharsetRule,
CSSImportRule,
CSSNamespaceRule,
RuleOptions,
JssStyle,
ToCssOptions,
BaseRule
} from '../types'
export class SimpleRule implements BaseRule {
type: string = 'simple'
key: string
value: string | Array<string>
options: RuleOptions
isProcessed: boolean = false
renderable: ?CSSCharsetRule | CSSImportRule | CSSNamespaceRule
constructor(key: string, value: string, options: RuleOptions) {
this.key = key
this.value = value
this.options = options
}
/**
* Generates a CSS string.
*/
// eslint-disable-next-line no-unused-vars
toString(options?: ToCssOptions): string {
if (Array.isArray(this.value)) {
let str = ''
for (let index = 0; index < this.value.length; index++) {
str += `${this.key} ${this.value[index]};`
if (this.value[index + 1]) str += '\n'
}
return str
}
return `${this.key} ${this.value};`
}
}
const keysMap = {
'@charset': true,
'@import': true,
'@namespace': true
}
export default {
onCreateRule(key: string, value: JssStyle, options: RuleOptions): SimpleRule | null {
return key in keysMap ? new SimpleRule(key, value, options) : null
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |