Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{/* this div matches the number of cell of the previous table-row, it allows proper alignment of borders */}
<div> </div>
) : null
return (
<li>
{progressDisplay}
<div>
<span data-original-title="{createdMessageText}" data-toggle="tooltip">{this.props.fileName}</span>
<span>{formatFileSize( this.props.fileSize )}</span>
</div>
{deleteBtn}
{successIcon}
{errorMessage}
</li>
)
}
private validateField = ( value: string, props: ValidatedInput.Props ) => {
const emptyButMandatory = !isNotEmpty(value) && !!props.mandatory
const noMatchRegex = props.regex ? !props.regex.test( value ) : false
const invalid = props.validate ? !props.validate( value ) : false
if ( !props.disabled ) {
this.setState( {
invalidInput: emptyButMandatory || noMatchRegex || invalid
}, () => {
props.handleFieldChange( value, props.name, this.state.invalidInput )
} )
}
}
private renderMultiSelectInput = ( field: WrappedFieldProps ) => {
const { label, options, disabled, help, containerClass, inputClass, collapseErrorSpace, fieldLineHeight } = this.props
const { input, meta } = field
const extendedStyle: React.CSSProperties = this.getExtendedStyle( fieldLineHeight, input.value )
const selectValue: string[] = isNotEmpty( input.value ) ? ( input.value as string ).split( ',' ) : []
let choices = options.map( ( choice, idx ) => {
let option = choice.label.trim()
return (
<li> v.trim() === option ) !== -1 } )}>
<a href="#"> this.selectOption( e, field, selectValue, option )}>
{option}
</a>
</li>
)
} )
return (
constructor( appKey: string, serviceName: string, permissions: string[], locale: string ) {
this._serviceName = serviceName
this._appKey = appKey
this._permissions = permissions
this._locale = locale
this._wordings = compileWordings( MULTILANGUAGE_WORDINGS, locale )
}
constructor( props: KeyValueEditor.Props ) {
super( props )
this.state = {
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
}
export function validateName( value: string, id: Id, items: ServiceItemFacades, locale: string ): string {
const wordings: { [id: string]: string } = compileWordings( MULTILANGUAGE_WORDINGS, locale )
if ( !value || !value.trim() ) return wordings.fieldRequired
if ( value !== id.name && !isIdUnique( items, { name: value, appKey: id.appKey } ) )
return wordings.nameAlreadyExist
if ( value.includes( '.' ) ) return wordings.nameNoDot
}
constructor( props: LanguageWrapper.Props ) {
super( props )
this.state = {
addOpen: false,
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
}
constructor( props: PagingControls.Props ) {
super( props )
this.state = {
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
this.goToPageInput = undefined
}
constructor( props: Tree.Props ) {
super( props )
this.state = {
treeInstance: null,
selectedNode: null,
formOpened: null,
editedNode: null,
maxTreeHeight: 0,
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
}
constructor( props: FormInput.Props ) {
super( props )
this.state = {
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
}