original_text
stringlengths
1
23.3k
tokenized_code
stringlengths
1
25.1k
masked_code
stringlengths
1
23.6k
More(Highcharts)
More ( Highcharts )
More [MASK] Highcharts )
highchartsAccessibility(Highcharts)
highchartsAccessibility ( Highcharts )
highchartsAccessibility ( [MASK] )
highchartsExporting(Highcharts)
highchartsExporting ( Highcharts )
highchartsExporting ( Highcharts )
offlineHighchartsExporting(Highcharts)
offlineHighchartsExporting ( Highcharts )
[MASK] ( Highcharts )
customEvents(HighchartsGantt)
customEvents ( HighchartsGantt )
customEvents ( [MASK] )
contextmenu: (event: any) => void
contextmenu : ( event : any ) = > void
contextmenu : ( event : any ) = > void
type: string
type : string
type [MASK] string
id?: number
id ? : number
[MASK] ? : number
startDate?: string
startDate ? : string
startDate ? : string
endDate?: string
endDate ? : string
[MASK] ? : string
const [chartState, setChartState] = useState<GanttChartStates>('loading')
const [ chartState , setChartState ] = useState < GanttChartStates > ( 'loading ' )
const [ chartState , setChartState ] [MASK] useState < [MASK] > ( 'loading ' )
const [popperRef, setPopperRef] = useState(null)
const [ popperRef , setPopperRef ] = useState ( null )
const [ popperRef , [MASK] ] = useState ( null )
const chartRef = useRef(null)
const chartRef = useRef ( null )
const chartRef = useRef [MASK] null )
const [options, setOptions] = useState<HighchartsReact.Props>(null)
const [ options , setOptions ] = useState < HighchartsReact.Props > ( null )
const [MASK] [MASK] , setOptions ] = useState < HighchartsReact.Props [MASK] [MASK] [MASK] )
const [popStyle, setPopStyle] = useState({})
const [ popStyle , setPopStyle ] = useState ( { } )
[MASK] [ popStyle , setPopStyle ] [MASK] useState ( { [MASK] )
const [showCreateModal, setShowCreateModal] = useState(false)
const [ showCreateModal , setShowCreateModal ] = useState ( false )
const [ showCreateModal , setShowCreateModal ] [MASK] [MASK] ( false )
const [showDetailModal, setShowDetailModal] = useState(false)
const [ showDetailModal , setShowDetailModal ] = useState ( false )
const [ showDetailModal , setShowDetailModal ] = useState ( false [MASK]
const [showContextMenu, setShowContextMenu] = useState<boolean>(false)
const [ showContextMenu , setShowContextMenu ] = useState < boolean > ( false )
const [ showContextMenu , setShowContextMenu ] = useState < boolean > ( false )
const [permissions, setPermissions] = useState<any>([])
const [ permissions , setPermissions ] = useState < any > ( [ ] )
const [ [MASK] , setPermissions ] = useState < any > ( [MASK] [MASK] )
const [contextMenuItemId, setContextMenuItemId] = useState<string | null>(null)
const [ contextMenuItemId , setContextMenuItemId ] = useState < string | null > ( null )
const [ [MASK] , setContextMenuItemId ] [MASK] useState < string [MASK] null > [MASK] null )
const [taskFormProps, setTaskFormProps] = useState<IProjectTaskFormProps | null>(null)
const [ taskFormProps , setTaskFormProps ] = useState < IProjectTaskFormProps | null > ( null )
const [ [MASK] , setTaskFormProps ] = useState < IProjectTaskFormProps | null > ( null )
const [detailProps, setDetailProps] = useState<IProjectItemDetailProps | null>(null)
const [ detailProps , setDetailProps ] = useState < IProjectItemDetailProps | null > ( null )
const [ detailProps , setDetailProps ] = [MASK] < IProjectItemDetailProps | null [MASK] ( null )
const { t } = useLocalization()
const { t } = useLocalization ( )
const { t } = useLocalization [MASK] )
})
} )
} )
let collapsedItems: string[] | undefined = undefined
let collapsedItems : string [ ] | undefined = undefined
[MASK] collapsedItems : string [ ] | undefined = [MASK]
setChartState('loading')
setChartState ( 'loading ' )
setChartState ( [MASK] [MASK] )
.map((item: any) => item.id)
.map ( ( item : any ) = > item.id )
.map ( ( item : any ) = [MASK] item.id )
updateProjectPlan(resPlan)
updateProjectPlan ( resPlan )
updateProjectPlan ( [MASK] )
setChartState(resPlan.data.length > 0 ? 'normal' : 'nodata')
setChartState ( resPlan.data.length > 0 ? 'normal ' : 'nodata ' )
setChartState ( resPlan.data.length > 0 ? 'normal ' : 'nodata ' )
})
} )
[MASK] )
}
}
[MASK]
Highcharts.setOptions(initialChartOptions)
Highcharts.setOptions ( initialChartOptions )
Highcharts.setOptions ( [MASK] )
updateChartData()
updateChartData ( )
updateChartData [MASK] )
}, [])
} , [ ] )
} , [ [MASK] )
}
}
}
item.collapsed = true
item.collapsed = true
item.collapsed = true
return item
return item
[MASK] item
})
} )
} )
item.collapsed = true
item.collapsed = true
item.collapsed = true
item.collapsed = true
item.collapsed = true
item.collapsed = true
return item
return item
return item
})
} )
[MASK] )
: Math.min(...data.data.map((item: any) => item.start)) - 172800000
: Math.min ( ... data.data.map ( ( item : any ) = > item.start ) ) - 172800000
: Math.min ( ... data.data.map ( ( item : any ) = > item.start ) ) - 172800000
: Math.max(...data.data.map((item: any) => item.end)) + 172800000
: Math.max ( ... data.data.map ( ( item : any ) = > item.end ) ) + 172800000
: [MASK] [MASK] ... data.data.map ( ( item [MASK] any ) = > [MASK] [MASK] ) + 172800000
return dataLabelFormatter(this, props.type === 'orders')
return dataLabelFormatter ( this , props.type === 'orders ' )
return dataLabelFormatter ( this , props.type === 'orders ' )
}
}
[MASK]
}
}
}
}
}
}
setOptions({ ...defaultGanttChartOptions, ...newOptions })
setOptions ( { ... defaultGanttChartOptions , ... newOptions } )
setOptions ( [MASK] ... [MASK] , [MASK] newOptions [MASK] [MASK]
}
}
[MASK]
if (type === 'Vehicle') return id
if ( type === 'Vehicle ' ) return id
if ( type === 'Vehicle ' ) return id
let currentItem = data.find((item: any) => item.id === `${type}-${id}`)!
let currentItem = data.find ( ( item : any ) = > item.id === ` $ { type } - $ { id } ` ) !
let currentItem [MASK] [MASK] ( [MASK] item [MASK] [MASK] ) = > item.id === [MASK] $ { type [MASK] - $ { id } ` ) !
const parentType = currentItem.parent?.split('-')[0]
const parentType = currentItem.parent ? .split ( '- ' ) [ 0 ]
[MASK] parentType = currentItem.parent ? .split ( [MASK] [MASK] [MASK] [ 0 ]
if (parentType === 'Vehicle') return parseInt(currentItem.parent?.split('-')[1])
if ( parentType === 'Vehicle ' ) return parseInt ( currentItem.parent ? .split ( '- ' ) [ 1 ] )
if ( parentType === 'Vehicle ' ) return parseInt [MASK] currentItem.parent ? .split ( '- ' ) [ 1 ] )
currentItem = data?.find((item: any) => item.id === currentItem?.parent)!
currentItem = data ? .find ( ( item : any ) = > item.id === currentItem ? .parent ) !
currentItem = [MASK] ? .find ( ( item [MASK] [MASK] [MASK] = > item.id [MASK] currentItem ? .parent ) !
}
}
}
event.preventDefault()
event.preventDefault ( )
event.preventDefault ( )
setContextMenuItemId(null)
setContextMenuItemId ( null )
setContextMenuItemId ( null )
})
} )
} [MASK]
return
return
return
const pointId = event.point.id
const pointId = event.point.id
const pointId [MASK] event.point.id
const type: TaskType = TaskType[pointId.split('-')[0]]
const type : TaskType = TaskType [ pointId.split ( '- ' ) [ 0 ] ]
const [MASK] : TaskType = TaskType [ pointId.split ( '- ' ) [ 0 ] ]
const elementId: string = pointId.split('-')[1]
const elementId : string = pointId.split ( '- ' ) [ 1 ]
const [MASK] : string = pointId.split ( '- ' ) [ 1 ]
setPermissions(res)
setPermissions ( res )
setPermissions ( res )
setContextMenuItemId(pointId)
setContextMenuItemId ( pointId )
setContextMenuItemId ( pointId )
setShowContextMenu(true)
setShowContextMenu ( true )
[MASK] ( true )
})
} )
[MASK] [MASK]
setPermissions(res)
setPermissions ( res )
[MASK] ( res )
setContextMenuItemId(pointId)
setContextMenuItemId ( pointId )
setContextMenuItemId ( pointId )
setShowContextMenu(true)
setShowContextMenu ( true )
setShowContextMenu ( [MASK] )
})
} )
} )
}
}
}
const getItemTypeId = (itemId: string): { type: TaskType
const getItemTypeId = ( itemId : string ) : { type : TaskType
const getItemTypeId = ( [MASK] [MASK] string [MASK] : { type : TaskType
}
}
}
}
}
}
return new Date(data.find(value => value.id == item.dependency).end)
return new Date ( data.find ( value = > value.id == item.dependency ) .end )
return new [MASK] ( data.find ( value = > value.id == item.dependency ) .end )
const parent = data.find(value => value.id == item.parent)
const parent = data.find ( value = > value.id == item.parent )
const parent = [MASK] ( value = > value.id == item.parent )
return getMinStartDate(parent, data)
return getMinStartDate ( parent , data )
[MASK] getMinStartDate ( [MASK] , data )
return undefined
return undefined
return [MASK]
}
}
}
const showIsComplete = (item: any, data: any[]): { show: boolean
const showIsComplete = ( item : any , data : any [ ] ) : { show : boolean
const showIsComplete [MASK] ( item : any , data : any [ ] ) : { show [MASK] boolean
}
}
}
}
}
}
}
}
}
return { show: true }
return { show : true }
return { show : true }
}
}
}
const dependents = data.filter(i => i.dependency === item.id)
const dependents = data.filter ( i = > i.dependency === item.id )
const [MASK] [MASK] [MASK] ( i = > [MASK] === item.id )
}
}
}
const parent = data.find(i => i.id === item.parent)
const parent = data.find ( i = > i.id === item.parent )
const parent = data.find ( i = > [MASK] === [MASK] )
return hasCompletedDependent(parent, data)
return hasCompletedDependent ( parent , data )
[MASK] hasCompletedDependent ( parent , data [MASK]
return
return
return
}
}
}
const dependency = data.find(i => i.id === item.dependency)
const dependency = data.find ( i = > i.id === item.dependency )
const dependency = data.find ( i = > i.id === item.dependency )
return dependency.completed.amount == 1
return dependency.completed.amount == 1
return dependency.completed.amount [MASK] 1
const parent = data.find(i => i.id === item.parent)
const parent = data.find ( i = > i.id === item.parent )
const parent = data.find ( i [MASK] > i.id === item.parent )
return isAllDependencyDone(parent, data)
return isAllDependencyDone ( parent , data )
return isAllDependencyDone ( parent , data )
return true
return true
return true
}
}
}
if (!contextMenuItemId) return
if ( ! contextMenuItemId ) return
if ( [MASK] contextMenuItemId ) return
const itemTypeId = getItemTypeId(contextMenuItemId)
const itemTypeId = getItemTypeId ( contextMenuItemId )
const [MASK] = getItemTypeId ( [MASK] )