This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Form from 'react-formal' | |
import { | |
Alert, | |
Button, | |
Col, ControlLabel, | |
Form as BsForm, FormControl, FormGroup as BsFormGroup, | |
HelpBlock, | |
} from 'react-bootstrap' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Form extends React.Component { | |
constructor() { | |
super() | |
this.state = { | |
name: null | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function connect(...stores) { | |
let filter = s => s; | |
if (!stores[stores.length - 1].__reduxName) | |
filter = stores.pop(); | |
let connector = reduxConnect( | |
filter.length > 1 | |
? (state, props) => filter(storesState(state, stores), props) | |
: (state) => filter(storesState(state, stores)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function run(config, assert) { | |
return new Promise((resolve, reject) => { | |
let compiler = webpack(config) | |
let fs = compiler.outputFileSystem = new MemoryFileSystem(); | |
compiler.run(function (err, stats) { | |
if (err) return reject(err) | |
let errors = stats.compilation.errors || []; | |
if (assert) expect(errors.length).to.equal(0, errors.join('\n')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validate(models, form) { | |
var validator = form.kendoValidator().getKendoValidator(); | |
_.extend(validator.options.rules, getValidationShims(validator, models, form, validationError)) | |
return validator.validate() | |
} | |
function validationError(text, models){ | |
return text + '\n' + _.pluck(models, 'ServiceType').join('\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tab { | |
static childContextTypes = { | |
registerHook: PropTypes.func | |
} | |
constructor() { | |
super() | |
this._hooks = [] | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global CodeMirror */ | |
function indexOf(string, pattern, from) { | |
if (typeof pattern === "string") { | |
var found = string.indexOf(pattern, from); | |
return found; | |
} | |
var m = pattern.exec(from ? string.slice(from) : string); | |
return m ? (m.index + from) : -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ListMovementMixin from 'react-widgets/lib/mixins/ListMovementMixin'; | |
import List from 'react-widgets/lib/List'; | |
import ListOption from 'react-widgets/lib/ListOption'; | |
import { dataText } from 'react-widgets/lib/util/dataHelpers'; | |
import cn from 'classnames'; | |
import BaseVirtualList from 'react-list'; | |
let VirtualList = React.createClass({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { render, findDOMNode } from 'react-dom' | |
render(<div/>, document.getElementById('root')) |