Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 )
}
}
constructor( props: Dialog.Props ) {
super( props )
this.state = {
wordings: compileWordings( MULTILANGUAGE_WORDINGS, 'en-US' )
}
}
constructor( props: PdfViewer.Props ) {
super( props )
this.state = {
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale ),
pdf: undefined,
loading: false,
loadingError: false,
currentPage: 1
}
}
constructor( props: ButtonsBar.Props ) {
super( props )
this.state = {
searchValue: props.handleSearch && props.searchValue || '',
wordings: compileWordings( MULTILANGUAGE_WORDINGS, props.locale )
}
}