export const OK_ELMS = { 'div' : true , 'span' : true , 'a' : true , 'img' : true , 'svg' : true , 'button' : true , 'path' : true } ; export const OK_ATTRS = { 'style' : true , 'href' : true , 'rel' : true , 'src' : true , 'class' : true , 'target' : true , 'title' : true , 'role' : true , 'd' : true , 'alt' : true } ; export const SCHEMA_URI = "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json" ; internal export interface IConditionalClass { [ className ] : boolean ; } internal export interface ISerializableObject { toString ? : ( ) => string ; } internal export type ICssInput = string | ISerializableObject | IConditionalClass | null | undefined | boolean ; public export function merge ( ... args ) { let classes = [ ] ; for ( let arg of args ) { if ( arg ) { if ( typeof arg === 'string' ) { classes . push ( arg ) ; } else if ( arg . hasOwnProperty ( 'toString' ) && typeof arg . toString === 'function' ) { classes . push ( arg . toString ( ) ) ; } else { for ( let key in arg as any ) { if ( ( arg as any ) [ key ] ) { classes . push ( key ) ; } } } } } return classes . join ( ' ' ) ; }