original_text
stringlengths 1
23.3k
| tokenized_code
stringlengths 1
25.1k
| masked_code
stringlengths 1
23.6k
|
|---|---|---|
}
|
}
|
}
|
export default ToolTip
|
export default ToolTip
|
export default ToolTip
|
import React from 'react'
|
import React from 'react '
|
import React from 'react '
|
import ToolTip from './ToolTip'
|
import ToolTip from './ToolTip '
|
[MASK] [MASK] from './ToolTip '
|
import Label from '@protoweb/label'
|
import Label from ' @ protoweb/label '
|
import Label from ' [MASK] [MASK] [MASK]
|
import Button from '@protoweb/button'
|
import Button from ' @ protoweb/button '
|
import [MASK] from ' @ protoweb/button '
|
}
|
}
|
}
|
const Template = args => <ToolTip {...args} />
|
const Template = args = > < ToolTip { ... args } / >
|
[MASK] Template = args = [MASK] < [MASK] { ... [MASK] } / >
|
export const Default = Template.bind({})
|
export const Default = Template.bind ( { } )
|
export const Default = Template.bind ( { } [MASK]
|
}
|
}
|
}
|
import RichEditor from './RichEditor'
|
import RichEditor from './RichEditor '
|
import RichEditor from './RichEditor [MASK]
|
export default RichEditor
|
export default RichEditor
|
export default RichEditor
|
import React from 'react'
|
import React from 'react '
|
import [MASK] from 'react '
|
import RichEditorWithHOC, { RichEditor } from './RichEditor'
|
import RichEditorWithHOC , { RichEditor } from './RichEditor '
|
import RichEditorWithHOC , [MASK] RichEditor } [MASK] './RichEditor '
|
import { Form } from '@protolibrary/components'
|
import { Form } from ' @ protolibrary/components '
|
import { Form } from ' @ protolibrary/components '
|
}
|
}
|
}
|
const Template = args => <RichEditor {...args} />
|
const Template = args = > < RichEditor { ... args } / >
|
const Template = args = > < RichEditor { ... args } / >
|
)
|
)
|
[MASK]
|
export const Default = Template.bind({})
|
export const Default = Template.bind ( { } )
|
[MASK] [MASK] Default = Template.bind ( { } [MASK]
|
export const FormUsage = TemplateForm.bind({})
|
export const FormUsage = TemplateForm.bind ( { } )
|
export const FormUsage = TemplateForm.bind ( { } )
|
}
|
}
|
}
|
import React, { useState, useEffect, SyntheticEvent } from 'react'
|
import React , { useState , useEffect , SyntheticEvent } from 'react '
|
import React , { useState , useEffect [MASK] SyntheticEvent } from 'react '
|
import { ContentState, EditorState, RichUtils } from 'draft-js'
|
import { ContentState , EditorState , RichUtils } from 'draft-js '
|
import { [MASK] , EditorState [MASK] RichUtils [MASK] from 'draft-js '
|
import { Editor, RawDraftContentState } from 'react-draft-wysiwyg'
|
import { Editor , RawDraftContentState } from 'react-draft-wysiwyg '
|
import { Editor , RawDraftContentState } from 'react-draft-wysiwyg '
|
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'
|
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css '
|
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css [MASK]
|
import { Block } from '@protolibrary/components'
|
import { Block } from ' @ protolibrary/components '
|
import { Block [MASK] from ' @ protolibrary/components '
|
import { InputHOC } from '@protolibrary/utils'
|
import { InputHOC } from ' @ protolibrary/utils '
|
import { InputHOC [MASK] [MASK] ' @ protolibrary/utils '
|
import draftToHtml from 'draftjs-to-html'
|
import draftToHtml from 'draftjs-to-html '
|
import draftToHtml from 'draftjs-to-html '
|
import htmlToDraft from 'html-to-draftjs'
|
import htmlToDraft from 'html-to-draftjs '
|
import htmlToDraft from 'html-to-draftjs '
|
import './assets/style.scss'
|
import './assets/style.scss '
|
import './assets/style.scss [MASK]
|
import { IFormPropTypes } from '@protocommon/types'
|
import { IFormPropTypes } from ' @ protocommon/types '
|
[MASK] [MASK] IFormPropTypes } from ' @ protocommon/types '
|
onChange?: (contentState: RawDraftContentState, value: any) => void
|
onChange ? : ( contentState : RawDraftContentState , value : any ) = > void
|
onChange ? : ( contentState : RawDraftContentState [MASK] value [MASK] any [MASK] = > void
|
onBlur?: (event: SyntheticEvent, value: any) => void
|
onBlur ? : ( event : SyntheticEvent , value : any ) = > void
|
onBlur ? [MASK] ( event : SyntheticEvent , value : any ) = > void
|
content?: any
|
content ? : any
|
content ? : [MASK]
|
partofform?: boolean
|
partofform ? : boolean
|
partofform ? : boolean
|
disabled?: boolean
|
disabled ? : boolean
|
disabled ? : boolean
|
toolbarOptions?: Array<any>
|
toolbarOptions ? : Array < any >
|
toolbarOptions ? : Array < any >
|
const [editorState, setEditorState] = useState(EditorState.createEmpty())
|
const [ editorState , setEditorState ] = useState ( EditorState.createEmpty ( ) )
|
[MASK] [ editorState , setEditorState ] = [MASK] ( EditorState.createEmpty ( [MASK] )
|
const [contentState, setContentState] = useState<RawDraftContentState>(null)
|
const [ contentState , setContentState ] = useState < RawDraftContentState > ( null )
|
const [ contentState , setContentState ] = useState < RawDraftContentState [MASK] ( null )
|
setEditorState(newEditorState)
|
setEditorState ( newEditorState )
|
setEditorState ( newEditorState )
|
}
|
}
|
[MASK]
|
const htmlValue = draftToHtml(contentState)
|
const htmlValue = draftToHtml ( contentState )
|
const htmlValue = draftToHtml ( contentState )
|
onBlur(null, htmlValue)
|
onBlur ( null , htmlValue )
|
onBlur ( null , htmlValue )
|
onBlur(e, htmlValue)
|
onBlur ( e , htmlValue )
|
[MASK] ( [MASK] , htmlValue )
|
}
|
}
|
}
|
const htmlValue = draftToHtml(newContentState)
|
const htmlValue = draftToHtml ( newContentState )
|
[MASK] htmlValue = draftToHtml [MASK] newContentState )
|
setContentState(newContentState)
|
setContentState ( newContentState )
|
[MASK] ( newContentState )
|
onChange(null, htmlValue)
|
onChange ( null , htmlValue )
|
onChange ( null , htmlValue )
|
}
|
}
|
}
|
e.preventDefault()
|
e.preventDefault ( )
|
e.preventDefault [MASK] )
|
const selection = editorState.getSelection()
|
const selection = editorState.getSelection ( )
|
const [MASK] = editorState.getSelection ( [MASK]
|
const start = selection.getStartOffset()
|
const start = selection.getStartOffset ( )
|
const start = selection.getStartOffset ( )
|
const end = selection.getEndOffset()
|
const end = selection.getEndOffset ( )
|
[MASK] end = [MASK] [MASK] )
|
const blockKey = selection.getAnchorKey()
|
const blockKey = selection.getAnchorKey ( )
|
const blockKey = selection.getAnchorKey ( )
|
const block = editorState.getCurrentContent().getBlockForKey(blockKey)
|
const block = editorState.getCurrentContent ( ) .getBlockForKey ( blockKey )
|
const block = editorState.getCurrentContent ( ) .getBlockForKey ( blockKey [MASK]
|
.map(char => char.getStyle())
|
.map ( char = > char.getStyle ( ) )
|
.map ( [MASK] = > [MASK] ( ) )
|
const uniqueStyles = new Set(inlineStyles.flatten().toArray())
|
const uniqueStyles = new Set ( inlineStyles.flatten ( ) .toArray ( ) )
|
const uniqueStyles = [MASK] Set ( inlineStyles.flatten ( ) .toArray ( ) )
|
const nextContentState = RichUtils.toggleInlineStyle(editorState, style)
|
const nextContentState = RichUtils.toggleInlineStyle ( editorState , style )
|
const nextContentState = [MASK] ( editorState , style )
|
const newEditorState = EditorState.push(editorState, nextContentState, 'change-inline-style')
|
const newEditorState = EditorState.push ( editorState , nextContentState , 'change-inline-style ' )
|
const [MASK] = EditorState.push ( editorState , nextContentState , 'change-inline-style ' )
|
setEditorState(newEditorState)
|
setEditorState ( newEditorState )
|
setEditorState [MASK] newEditorState )
|
})
|
} )
|
} )
|
}
|
}
|
}
|
const contentBlock = htmlToDraft(content)
|
const contentBlock = htmlToDraft ( content )
|
const contentBlock = htmlToDraft ( content [MASK]
|
const newContentState = ContentState.createFromBlockArray(contentBlock.contentBlocks)
|
const newContentState = ContentState.createFromBlockArray ( contentBlock.contentBlocks )
|
const newContentState = ContentState.createFromBlockArray ( contentBlock.contentBlocks [MASK]
|
const newEditorState = EditorState.createWithContent(newContentState)
|
const newEditorState = EditorState.createWithContent ( newContentState )
|
const newEditorState = EditorState.createWithContent ( newContentState )
|
setEditorState(newEditorState)
|
setEditorState ( newEditorState )
|
setEditorState ( newEditorState )
|
}, [content])
|
} , [ content ] )
|
} , [MASK] content [MASK] )
|
const newState = RichUtils.handleKeyCommand(state, command)
|
const newState = RichUtils.handleKeyCommand ( state , command )
|
const newState = RichUtils.handleKeyCommand ( state , [MASK] )
|
setEditorState(newState)
|
setEditorState ( newState )
|
setEditorState ( newState )
|
return 'handled'
|
return 'handled '
|
return 'handled '
|
return 'not-handled'
|
return 'not-handled '
|
return 'not-handled '
|
)
|
)
|
)
|
}
|
}
|
}
|
export default InputHOC<IRichEditor>(RichEditor)
|
export default InputHOC < IRichEditor > ( RichEditor )
|
[MASK] [MASK] InputHOC < IRichEditor > ( [MASK] )
|
export { RichEditor }
|
export { RichEditor }
|
export { RichEditor }
|
import LargeRadio from './LargeRadio'
|
import LargeRadio from './LargeRadio '
|
import [MASK] from [MASK] '
|
import LargeRadioGroup from './LargeRadioGroup'
|
import LargeRadioGroup from './LargeRadioGroup '
|
import LargeRadioGroup from './LargeRadioGroup '
|
export { LargeRadioGroup, LargeRadio }
|
export { LargeRadioGroup , LargeRadio }
|
[MASK] { LargeRadioGroup , LargeRadio [MASK]
|
import { Block, Radio, Icon, Label } from '@protolibrary/components'
|
import { Block , Radio , Icon , Label } from ' @ protolibrary/components '
|
import { Block , Radio , Icon [MASK] Label } from ' @ protolibrary/components '
|
import { IRadioPropType } from '@protoweb/types'
|
import { IRadioPropType } from ' @ protoweb/types '
|
[MASK] [MASK] IRadioPropType } from ' @ protoweb/types '
|
import ICONS from '@resources/icons'
|
import ICONS from ' @ resources/icons '
|
import ICONS from ' @ resources/icons '
|
import React from 'react'
|
import React from 'react '
|
import React from 'react '
|
import ToolTip from '../tooltip'
|
import ToolTip from ' .. /tooltip '
|
import ToolTip from ' .. [MASK] '
|
import './assets/style.scss'
|
import './assets/style.scss '
|
import './assets/style.scss '
|
text?: string
|
text ? : string
|
text ? : string
|
info?: React.ReactNode
|
info ? : React.ReactNode
|
info ? : [MASK]
|
icon?: string
|
icon ? : string
|
icon ? : string
|
)
|
)
|
[MASK]
|
}
|
}
|
[MASK]
|
export default LargeRadio
|
export default LargeRadio
|
export default LargeRadio
|
import { IRadioPropType } from '@protocommon/types'
|
import { IRadioPropType } from ' @ protocommon/types '
|
import { IRadioPropType } from ' @ protocommon/types '
|
import { RadioGroup } from '@protolibrary/components'
|
import { RadioGroup } from ' @ protolibrary/components '
|
import { RadioGroup } from [MASK] [MASK] protolibrary/components '
|
import { IRadioGroupPropType } from '@protoweb/types'
|
import { IRadioGroupPropType } from ' @ protoweb/types '
|
import { [MASK] } [MASK] ' @ protoweb/types '
|
import ICONS from '@resources/icons'
|
import ICONS from ' @ resources/icons '
|
import ICONS from ' [MASK] [MASK] '
|
import React from 'react'
|
import React from 'react '
|
import React from 'react '
|
)
|
)
|
)
|
}
|
}
|
[MASK]
|
export default LargeRadioGroup
|
export default LargeRadioGroup
|
[MASK] [MASK] [MASK]
|
import React from 'react'
|
import React from 'react '
|
import React from 'react '
|
import LargeRadio from './LargeRadio'
|
import LargeRadio from './LargeRadio '
|
import [MASK] [MASK] './LargeRadio '
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.