original_text
stringlengths
1
23.3k
tokenized_code
stringlengths
1
25.1k
masked_code
stringlengths
1
23.6k
setEndDate(null)
setEndDate ( null )
setEndDate ( [MASK] )
}, [props.value])
} , [ props.value ] )
} [MASK] [ [MASK] ] )
setStartDate(date)
setStartDate ( date )
setStartDate [MASK] date [MASK]
setEndDate(null)
setEndDate ( null )
setEndDate ( null )
props.onChange(event, { startDate: date, endDate: null })
props.onChange ( event , { startDate : date , endDate : null } )
props.onChange ( event , { startDate : date [MASK] endDate [MASK] null [MASK] )
setEndDate(date)
setEndDate ( date )
setEndDate ( date )
props.onChange(event, { startDate: startDate, endDate: date })
props.onChange ( event , { startDate : startDate , endDate : date } )
props.onChange ( event , [MASK] startDate [MASK] startDate , endDate : date } )
)
)
)
}
}
[MASK]
export default InputHOC<IDateRangePicker>(DateRangePicker)
export default InputHOC < IDateRangePicker > ( DateRangePicker )
export default InputHOC < IDateRangePicker > ( DateRangePicker )
const DATE_RANGE_DIVIDER = ' - '
const DATE_RANGE_DIVIDER = ' - '
const DATE_RANGE_DIVIDER [MASK] ' - '
const DATE_EMPTY = '..'
const DATE_EMPTY = ' .. '
const DATE_EMPTY [MASK] ' .. '
const DEFAULT_SHOWN_MOUNT_NUMBER = 1
const DEFAULT_SHOWN_MOUNT_NUMBER = 1
const DEFAULT_SHOWN_MOUNT_NUMBER = 1
const DEFAULT_SHOWN_MOUNT_NUMBER_DATE_RANGE = 2
const DEFAULT_SHOWN_MOUNT_NUMBER_DATE_RANGE = 2
const DEFAULT_SHOWN_MOUNT_NUMBER_DATE_RANGE [MASK] 2
}
}
}
import { isValid, getYear, parse } from 'date-fns'
import { isValid , getYear , parse } from 'date-fns '
[MASK] { isValid , getYear [MASK] parse } from 'date-fns '
import { getDefaultLocale } from 'react-datepicker'
import { getDefaultLocale } from 'react-datepicker '
import [MASK] getDefaultLocale [MASK] from 'react-datepicker '
import tr from 'date-fns/locale/tr'
import tr from 'date-fns/locale/tr '
import tr from 'date-fns/locale/tr '
import en from 'date-fns/locale/en-US'
import en from 'date-fns/locale/en-US '
import en from [MASK] '
return value.replace(/_/g, '')
return value.replace ( /_/g , `` )
return value.replace ( /_/g [MASK] `` )
return ''
return ``
[MASK] ``
}
}
}
return date1?.getTime?.() === date2?.getTime?.()
return date1 ? .getTime ? . ( ) === date2 ? .getTime ? . ( )
return [MASK] ? [MASK] ? . [MASK] ) === date2 ? .getTime ? . ( )
}
}
[MASK]
return isValid(valDate) && getYear(valDate) >= 1900
return isValid ( valDate ) & & getYear ( valDate ) > = 1900
return isValid ( valDate ) & & getYear ( valDate ) > = 1900
}
}
}
return true
return true
[MASK] true
})
} )
} [MASK]
return isValid(date) && getYear(date) >= 1900
return isValid ( date ) & & getYear ( date ) > = 1900
return isValid ( date ) & & getYear ( [MASK] ) > = 1900
}
}
}
const hasTime = (date: string): boolean => /\b\d{1,2}:\d{1,2}\b/.test(date)
const hasTime = ( date : string ) : boolean = > /\b\d { 1,2 } : \d { 1,2 } \b/.test ( date )
const hasTime = ( [MASK] : string ) : boolean = [MASK] [MASK] { 1,2 } : \d { 1,2 } \b/.test ( date )
return getDefaultLocale() === 'EN' ? en : tr
return getDefaultLocale ( ) === 'EN ' ? en : tr
return getDefaultLocale ( ) === [MASK] [MASK] ? en : tr
}
}
[MASK]
let parsedDate
let parsedDate
let parsedDate
parsedDate = parse(dateString, dateFormat, new Date(), { locale: getLocale() })
parsedDate = parse ( dateString , dateFormat , new Date ( ) , { locale : getLocale ( ) } )
parsedDate = parse ( dateString [MASK] dateFormat , new [MASK] ( ) , { locale : [MASK] ( ) } )
parsedDate = parse(dateString, dateFormat.split(' ')[0], new Date(), { locale: getLocale() })
parsedDate = parse ( dateString , dateFormat.split ( ' ' ) [ 0 ] , new Date ( ) , { locale : getLocale ( ) } )
parsedDate = parse ( [MASK] , dateFormat.split [MASK] ' ' ) [ 0 ] , new Date [MASK] ) , { locale : getLocale ( ) } )
return parsedDate
return parsedDate
return parsedDate
return null
return null
return [MASK]
}
}
}
return input.replace(/[\/\.\-_]/g, '')
return input.replace ( / [ \/\.\-_ ] /g , `` )
return input.replace ( [MASK] [MASK] \/\.\-_ ] /g [MASK] `` )
}
}
}
}
}
[MASK]
import { Icon, MaskedTextField } from '@protolibrary/components'
import { Icon , MaskedTextField } from ' @ protolibrary/components '
[MASK] { Icon , MaskedTextField } from ' @ protolibrary/components '
import COLORS from '@resources/colors'
import COLORS from ' @ resources/colors '
import COLORS from ' @ resources/colors [MASK]
import React, { useState, useEffect, useCallback, useImperativeHandle } from 'react'
import React , { useState , useEffect , useCallback , useImperativeHandle } from 'react '
import React [MASK] { useState , useEffect , useCallback , useImperativeHandle } from 'react '
import { DATE } from '../assets/icons'
import { DATE } from ' .. /assets/icons '
import { DATE } from [MASK] .. /assets/icons '
import { maskedToStringDate } from '../utils'
import { maskedToStringDate } from ' .. /utils '
import [MASK] maskedToStringDate } from ' .. /utils '
svgString = svgString.replace(/fill=["'](.*?)["']/g, 'fill="' + newColor + '"')
svgString = svgString.replace ( /fill= [ `` ' ] ( . * ? ) [ `` ' ] /g , 'fill= '' ' + newColor + ' '' ' )
svgString = svgString.replace ( /fill= [ `` ' [MASK] ( . [MASK] ? ) [ `` ' ] /g , [MASK] [MASK] ' + newColor + ' '' ' )
svgString = svgString.replace(/stroke=["'](.*?)["']/g, 'stroke="' + newColor + '"')
svgString = svgString.replace ( /stroke= [ `` ' ] ( . * ? ) [ `` ' ] /g , 'stroke= '' ' + newColor + ' '' ' )
svgString = svgString.replace ( /stroke= [ `` ' [MASK] ( . [MASK] ? ) [ `` ' ] /g , 'stroke= '' ' + newColor + ' '' [MASK] )
return svgString
return svgString
return svgString
const [inputValue, setInputValue] = useState(props.value)
const [ inputValue , setInputValue ] = useState ( props.value )
[MASK] [MASK] inputValue , setInputValue ] = useState ( [MASK] )
const [focused, setFocused] = useState(false)
const [ focused , setFocused ] = useState ( false )
const [ focused , setFocused ] = useState ( [MASK] )
return '99.99.9999 - 99.99.9999'
return '99.99.9999 - 99.99.9999 '
[MASK] '99.99.9999 - [MASK] '
const escapedPart = notEditable.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
const escapedPart = notEditable.replace ( / [ -\/\\^ $ * + ? . ( ) | [ \ ] { } ] /g , '\\ $ & ' )
const escapedPart = notEditable.replace ( [MASK] [ -\/\\^ $ * + ? . ( ) | [ [MASK] ] { [MASK] ] [MASK] , '\\ $ & ' )
return `99.99.9999 ${escapedPart}`
return ` 99.99.9999 $ { escapedPart } `
[MASK] ` 99.99.9999 $ { escapedPart } [MASK]
return '99.99.9999'
return '99.99.9999 '
return '99.99.9999 '
}
}
}
const mask = generateMask(props.value.slice(11))
const mask = generateMask ( props.value.slice ( 11 ) )
const mask = generateMask ( props.value.slice ( 11 ) )
}))
} ) )
} ) )
setInputValue('')
setInputValue ( `` )
setInputValue ( [MASK] [MASK]
}
}
[MASK]
setInputValue(props.value)
setInputValue ( props.value )
setInputValue ( props.value )
}, [props.value])
} , [ props.value ] )
} , [ props.value ] )
)
)
)
}, [focused, props.isChanged, props.isUsed, props.error])
} , [ focused , props.isChanged , props.isUsed , props.error ] )
} , [ focused , props.isChanged , props.isUsed , props.error ] )
setInputValue(event.target.value || '')
setInputValue ( event.target.value || `` )
setInputValue [MASK] event.target.value || `` )
const newVal = maskedToStringDate(event.target.value || '')
const newVal = maskedToStringDate ( event.target.value || `` )
const [MASK] = [MASK] ( event.target.value || `` [MASK]
props.handleOnChange(newVal, event)
props.handleOnChange ( newVal , event )
props.handleOnChange ( newVal , event )
setFocused(true)
setFocused ( true )
setFocused ( true )
props.onFocus(e)
props.onFocus ( e )
props.onFocus [MASK] e )
setFocused(false)
setFocused ( false )
setFocused ( false )
props.onBlur(e)
props.onBlur ( e )
props.onBlur ( e )
)
)
)
}
}
[MASK]
export default React.forwardRef(CustomInput)
export default React.forwardRef ( CustomInput )
export default React.forwardRef ( CustomInput )
import React from 'react'
import React from 'react '
import [MASK] from 'react '
import { Icon } from '@protolibrary/components'
import { Icon } from ' @ protolibrary/components '
import { Icon } from ' @ protolibrary/components [MASK]
import { NEXT, PREV } from '../assets/icons'
import { NEXT , PREV } from ' .. /assets/icons '
import [MASK] NEXT , [MASK] } from ' .. /assets/icons '
import useLocalization from '@hooks/useLocalization'
import useLocalization from ' @ hooks/useLocalization '
import useLocalization [MASK] ' @ hooks/useLocalization '
import { enUS, tr } from 'date-fns/locale'
import { enUS , tr } from 'date-fns/locale '
import { enUS , tr } from 'date-fns/locale '
const { language } = useLocalization()
const { language } = useLocalization ( )
const { [MASK] } [MASK] useLocalization ( [MASK]
changeYear(date.getFullYear() - 12)
changeYear ( date.getFullYear ( ) - 12 )
changeYear ( date.getFullYear ( ) - 12 )
decreaseMonth()
decreaseMonth ( )
decreaseMonth [MASK] )
}
}
}
changeYear(date.getFullYear() + 12)
changeYear ( date.getFullYear ( ) + 12 )
changeYear ( date.getFullYear ( ) + [MASK] )
increaseMonth()
increaseMonth ( )
increaseMonth ( )
}
}
}
)
)
)
}
}
}
export default CustomHeader
export default CustomHeader
export default CustomHeader
import { Block, Label, SwitchButton } from '@protolibrary/components'
import { Block , Label , SwitchButton } from ' @ protolibrary/components '
import { Block [MASK] Label [MASK] SwitchButton } from ' [MASK] protolibrary/components '
import { IFormBasePropType } from '@protoweb/types'
import { IFormBasePropType } from ' @ protoweb/types '
import { IFormBasePropType } from ' @ protoweb/types '
import React, { useState, useEffect } from 'react'
import React , { useState , useEffect } from 'react '
import React [MASK] { useState [MASK] useEffect } from 'react '
import cs from 'classnames'
import cs from 'classnames '
import [MASK] [MASK] [MASK] '
import './assets/style.scss'
import './assets/style.scss '
import [MASK] '
import COLORS from '@resources/colors'
import COLORS from ' @ resources/colors '
import COLORS from ' @ resources/colors '
import { InputHOC } from '@protoweb/utils'
import { InputHOC } from ' @ protoweb/utils '
import { InputHOC } from ' @ protoweb/utils '
options: [{ label: string
options : [ { label : string
options : [ { label : string
value: string }, { label: string
value : string } , { label : string
value : string } , { label [MASK] string
value: string }]
value : string } ]
value [MASK] string } ]