original_text
stringlengths 1
23.3k
| tokenized_code
stringlengths 1
25.1k
| masked_code
stringlengths 1
23.6k
|
|---|---|---|
const start = polarToCartesian(x, y, radius, endAngle)
|
const start = polarToCartesian ( x , y , radius , endAngle )
|
const start = [MASK] ( x , y , [MASK] , endAngle )
|
const end = polarToCartesian(x, y, radius, startAngle)
|
const end = polarToCartesian ( x , y , radius , startAngle )
|
const end = polarToCartesian [MASK] x , y , radius , startAngle [MASK]
|
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1'
|
const largeArcFlag = endAngle - startAngle < = 180 ? ' 0 ' : ' 1 '
|
const largeArcFlag = endAngle - startAngle < [MASK] 180 ? ' 0 ' : ' 1 '
|
)
|
)
|
)
|
return d
|
return d
|
return d
|
}
|
}
|
}
|
return Math.abs(((number - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min)
|
return Math.abs ( ( ( number - in_min ) * ( out_max - out_min ) ) / ( in_max - in_min ) + out_min )
|
return Math.abs ( ( ( [MASK] - [MASK] ) * ( out_max [MASK] out_min [MASK] ) / ( in_max - in_min [MASK] + out_min [MASK]
|
}
|
}
|
}
|
export { SVGCircle, polarToCartesian, describeArc, mapNumber }
|
export { SVGCircle , polarToCartesian , describeArc , mapNumber }
|
[MASK] { SVGCircle , polarToCartesian , describeArc , mapNumber }
|
import CheckCell from './CheckCell'
|
import CheckCell from './CheckCell '
|
import CheckCell from './CheckCell '
|
export { CheckCell }
|
export { CheckCell }
|
export { CheckCell }
|
import useLocalization from '@hooks/useLocalization'
|
import useLocalization from ' @ hooks/useLocalization '
|
import useLocalization [MASK] [MASK] @ hooks/useLocalization '
|
import { Block, Icon, Label } from '@protolibrary/components'
|
import { Block , Icon , Label } from ' @ protolibrary/components '
|
import { Block , Icon , Label } from ' @ protolibrary/components '
|
import COLORS from '@resources/colors'
|
import COLORS from ' @ resources/colors '
|
import COLORS [MASK] ' @ [MASK] '
|
import ICONS from '@resources/icons'
|
import ICONS from ' @ resources/icons '
|
import ICONS from ' @ resources/icons '
|
import { replaceColorsInSVG } from '@utils/ColorUtils'
|
import { replaceColorsInSVG } from ' @ utils/ColorUtils '
|
import { replaceColorsInSVG } from ' @ utils/ColorUtils '
|
import React from 'react'
|
import React from 'react '
|
[MASK] React from 'react '
|
value: boolean
|
value : boolean
|
value : boolean
|
type?: 'icon' | 'text'
|
type ? : 'icon ' | 'text '
|
type [MASK] : 'icon [MASK] [MASK] 'text '
|
const { t } = useLocalization()
|
const { t } = useLocalization ( )
|
const { t } = useLocalization ( )
|
)
|
)
|
)
|
}
|
}
|
}
|
export default CheckCell
|
export default CheckCell
|
export default CheckCell
|
import useLocalization from '@hooks/useLocalization'
|
import useLocalization from ' @ hooks/useLocalization '
|
import useLocalization from ' @ hooks/useLocalization [MASK]
|
import { Block, Icon, Label } from '@protolibrary/components'
|
import { Block , Icon , Label } from ' @ protolibrary/components '
|
import { Block , Icon , Label } from ' @ [MASK] '
|
import COLORS from '@resources/colors'
|
import COLORS from ' @ resources/colors '
|
import [MASK] [MASK] ' [MASK] [MASK] '
|
import ICONS from '@resources/icons'
|
import ICONS from ' @ resources/icons '
|
import ICONS from ' @ resources/icons '
|
import React from 'react'
|
import React from 'react '
|
import [MASK] from 'react '
|
value: boolean
|
value : boolean
|
value : [MASK]
|
type?: 'icon' | 'text'
|
type ? : 'icon ' | 'text '
|
type ? : [MASK] ' | [MASK] '
|
const { t } = useLocalization()
|
const { t } = useLocalization ( )
|
[MASK] [MASK] t } = useLocalization ( )
|
)
|
)
|
)
|
}
|
}
|
}
|
export default CheckMarkCell
|
export default CheckMarkCell
|
export default CheckMarkCell
|
import { useRole } from '@common/role/index'
|
import { useRole } from ' @ common/role/index '
|
import { useRole } [MASK] ' @ common/role/index '
|
import { ReactElement, ReactNode } from 'react'
|
import { ReactElement , ReactNode } from 'react '
|
import { [MASK] , [MASK] [MASK] from 'react '
|
role: string | string[]
|
role : string | string [ ]
|
role : string | string [MASK] ]
|
children: ReactElement | ReactNode
|
children : ReactElement | ReactNode
|
children : ReactElement | ReactNode
|
const { hasRole } = useRole(role)
|
const { hasRole } = useRole ( role )
|
const { [MASK] } [MASK] useRole ( role [MASK]
|
if (!hasRole) return null
|
if ( ! hasRole ) return null
|
if [MASK] [MASK] hasRole ) [MASK] null
|
return children
|
return children
|
return children
|
export default Roled
|
export default Roled
|
[MASK] default Roled
|
import { useEffect, useState } from 'react'
|
import { useEffect , useState } from 'react '
|
import { useEffect , useState } from 'react '
|
import authState from '@core/states/AuthState'
|
import authState from ' @ core/states/AuthState '
|
import [MASK] from [MASK] @ core/states/AuthState '
|
const [isRender, setIsRender] = useState(false)
|
const [ isRender , setIsRender ] = useState ( false )
|
const [ isRender , [MASK] ] = useState ( false )
|
setIsRender(true)
|
setIsRender ( true )
|
setIsRender ( true )
|
return
|
return
|
return
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
const { roles } = authState.getState ( )
|
setIsRender(false)
|
setIsRender ( false )
|
[MASK] ( false )
|
return role.some(c => c === r)
|
return role.some ( c = > c === r )
|
return role.some ( [MASK] = > [MASK] === [MASK] )
|
return r === role
|
return r === role
|
return r === role
|
})
|
} )
|
} )
|
setIsRender(true)
|
setIsRender ( true )
|
setIsRender ( true )
|
}, [role])
|
} , [ role ] )
|
} , [MASK] role ] )
|
return { hasRole: isRender }
|
return { hasRole : isRender }
|
return { [MASK] : isRender }
|
}
|
}
|
}
|
export default useRole
|
export default useRole
|
export default useRole
|
import useRole from '@common/role/useRole'
|
import useRole from ' @ common/role/useRole '
|
import useRole from [MASK] @ common/role/useRole '
|
import React from 'react'
|
import React from 'react '
|
import React from 'react [MASK]
|
import hoistNonReactStatics from 'hoist-non-react-statics'
|
import hoistNonReactStatics from 'hoist-non-react-statics '
|
import hoistNonReactStatics from 'hoist-non-react-statics '
|
role?: string
|
role ? : string
|
role [MASK] : [MASK]
|
const { role, ...rest } = props
|
const { role , ... rest } = props
|
const { role , ... rest } = props
|
const { hasRole } = useRole(role)
|
const { hasRole } = useRole ( role )
|
const [MASK] hasRole } = useRole ( role )
|
return hasRole ? <WrappedComponent {...(rest as any)} /> : null
|
return hasRole ? < WrappedComponent { ... ( rest as any ) } / > : null
|
return hasRole ? < WrappedComponent { ... ( rest as any ) } / > [MASK] null
|
}
|
}
|
}
|
hoistNonReactStatics(WithRole, WrappedComponent)
|
hoistNonReactStatics ( WithRole , WrappedComponent )
|
hoistNonReactStatics ( [MASK] , WrappedComponent )
|
return WithRole
|
return WithRole
|
return WithRole
|
}
|
}
|
}
|
export default withRole
|
export default withRole
|
export [MASK] withRole
|
import authState from '@core/states/AuthState'
|
import authState from ' @ core/states/AuthState '
|
import authState from ' @ core/states/AuthState '
|
import IRole from '@common/role/IRole'
|
import IRole from ' @ common/role/IRole '
|
import IRole from ' @ common/role/IRole '
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
const { [MASK] } [MASK] authState.getState ( )
|
return roles?.find((role: IRole) => role.name === name)
|
return roles ? .find ( ( role : IRole ) = > role.name === name )
|
[MASK] roles ? .find ( ( [MASK] : IRole [MASK] = > role.name === name )
|
}
|
}
|
}
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
const { [MASK] } = authState.getState ( )
|
return roles?.find((role: IRole) => role.code === code)
|
return roles ? .find ( ( role : IRole ) = > role.code === code )
|
return roles ? .find [MASK] ( role : [MASK] ) [MASK] > role.code === code )
|
}
|
}
|
}
|
}
|
}
|
[MASK]
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
const { roles } = [MASK] [MASK] )
|
return role?.code === code
|
return role ? .code === code
|
return role ? [MASK] === code
|
})
|
} )
|
} )
|
state.hasRole = !!roleItem
|
state.hasRole = ! ! roleItem
|
state.hasRole = ! ! roleItem
|
return state
|
return state
|
return state
|
}
|
}
|
}
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
[MASK] { roles } = authState.getState ( )
|
return roles?.some((r: any) => r === role)
|
return roles ? .some ( ( r : any ) = > r === role )
|
[MASK] [MASK] ? .some ( ( r : any ) = > r === [MASK] )
|
}
|
}
|
}
|
const { roles } = authState.getState()
|
const { roles } = authState.getState ( )
|
const { roles } = authState.getState ( [MASK]
|
return roles?.some((r: any) => userRoles.indexOf(r) > -1)
|
return roles ? .some ( ( r : any ) = > userRoles.indexOf ( r ) > -1 )
|
return roles ? .some ( ( r : [MASK] ) = > userRoles.indexOf ( r ) > -1 )
|
}
|
}
|
}
|
export { findRoleByName, findRoleByCode, useSyncRole, userIsInRole, userContainsRole }
|
export { findRoleByName , findRoleByCode , useSyncRole , userIsInRole , userContainsRole }
|
export { findRoleByName , findRoleByCode [MASK] [MASK] [MASK] userIsInRole , userContainsRole }
|
import { toast, ToastOptions } from 'react-toastify'
|
import { toast , ToastOptions } from 'react-toastify '
|
import { [MASK] , ToastOptions } from 'react-toastify '
|
import React from 'react'
|
import React from 'react '
|
import React from 'react '
|
import Icon from '@protoweb/icon'
|
import Icon from ' @ protoweb/icon '
|
[MASK] Icon from ' @ protoweb/icon '
|
import ICONS from '@resources/icons'
|
import ICONS from ' @ resources/icons '
|
[MASK] ICONS from ' @ resources/icons '
|
type ToastType = 'success' | 'error' | 'warn' | 'info'
|
type ToastType = 'success ' | 'error ' | 'warn ' | 'info '
|
type ToastType = [MASK] ' | 'error ' | 'warn [MASK] | 'info [MASK]
|
type ToastIdType = string | number | React.ReactText
|
type ToastIdType = string | number | React.ReactText
|
type ToastIdType = string | [MASK] | [MASK]
|
)
|
)
|
)
|
}
|
}
|
}
|
defaultOptions: ToastOptions
|
defaultOptions : ToastOptions
|
defaultOptions : ToastOptions
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.