path
stringlengths 5
195
| repo_name
stringlengths 5
79
| content
stringlengths 25
1.01M
|
---|---|---|
examples/timeline-airtable/src/main.js | weaintplastic/react-sketchapp | import React from 'react';
import PropTypes from 'prop-types';
import { render, Artboard, Text, View, StyleSheet } from 'react-sketchapp';
const API_ENDPOINT_URL =
'https://api.airtable.com/v0/appFs7J3WdgHYCDxD/Features?api_key=keyu4dudakWLI0vAh&&sort%5B0%5D%5Bfield%5D=Target+Launch+Date&sort%5B0%5D%5Bdirection%5D=asc';
const styles = StyleSheet.create({
artboard: {
backgroundColor: '#F9FDFF',
},
verticalLine: {
width: 3,
},
dot: {
width: 24,
height: 24,
borderRadius: 12,
borderWidth: 2,
borderColor: '#46D2B3',
},
dotCompleted: {
backgroundColor: '#46D2B3',
},
title: {
fontSize: 48,
fontWeight: 200,
color: '#000',
},
rowContainer: {
width: 800,
flexDirection: 'row',
flex: 1,
paddingLeft: 30,
paddingRight: 30,
},
rowDescription: {
fontSize: 16,
width: 400,
},
rowLeftArea: {
width: 99, // odd number to avoid antialiasing
alignItems: 'center',
height: 150,
},
rowDate: {
fontSize: 10,
color: '#46D2B3',
},
rowTitle: {
fontSize: 20,
},
});
const VerticalLine = ({ height = 1, color = '#46D2B3' }) => (
<View
style={[styles.verticalLine, { flex: height, backgroundColor: color }]}
/>
);
VerticalLine.propTypes = {
height: PropTypes.number,
color: PropTypes.string,
};
const Header = ({ title }) => (
<View style={[styles.rowContainer, { backgroundColor: '#fff' }]}>
<View style={styles.rowLeftArea}>
<VerticalLine />
</View>
<View>
<Text style={styles.title}>{title}</Text>
</View>
</View>
);
Header.propTypes = {
title: PropTypes.string,
};
const Footer = () => (
<View style={styles.rowContainer}>
<View style={styles.rowLeftArea}>
<VerticalLine height={40} />
</View>
</View>
);
const Dot = ({ completed }) => (
<View name="Dot" style={[styles.dot, completed && styles.dotCompleted]} />
);
Dot.propTypes = {
completed: PropTypes.bool,
};
const Row = ({ title, description, completed, date, status }) => (
<View style={styles.rowContainer}>
<View name="Row Left" style={styles.rowLeftArea}>
<VerticalLine />
<Dot completed={completed} />
<VerticalLine height={4} />
</View>
<View name="Row Body" style={{ opacity: completed ? 1 : 0.5 }}>
<Text
name="Row Date"
style={styles.rowDate}
>{`${status} on ${date}`}</Text>
<Text name="Row Title" style={styles.rowTitle}>
{title}
</Text>
<Text name="Row Description" style={styles.rowDescription}>
{description}
</Text>
</View>
</View>
);
Row.propTypes = {
title: PropTypes.string,
description: PropTypes.string,
completed: PropTypes.bool,
date: PropTypes.string,
status: PropTypes.string,
};
const Timeline = props => (
<Artboard style={styles.artboard}>
<Header title="Product Timeline" />
{props.data.records.map(({ id, fields }) => (
<Row
key={id}
title={fields.Feature}
description={fields['Feature Description']}
status={fields['Launched?'] ? 'Launched' : fields['Feature Status']}
completed={fields['Launched?']}
date={fields['Target Launch Date']}
/>
))}
<Footer />
</Artboard>
);
Timeline.propTypes = {
data: PropTypes.shape({
records: PropTypes.array,
}),
};
export default () => {
fetch(API_ENDPOINT_URL)
.then(res => res.json())
.then((data) => {
render(<Timeline data={data} />, context.document.currentPage());
})
.catch(e => console.error(e)); // eslint-disable-line no-console
};
|
src/components/auth/signup.js | RaulEscobarRivas/client | import React, { Component } from 'react';
import { reduxForm } from 'redux-form';
import * as actions from '../../actions';
class SignUp extends Component {
handleFormSubmit({ email, password }) {
this.props.signupUser(email, password);
}
renderErrorMessage(subject) {
return subject.touched && subject.error && <div className="error">{subject.error}</div>;
}
renderAlert() {
console.log(this.props);
if(this.props.errorMessage) {
return (
<div className="alert alert-danger">
<strong>{'Oops! '}</strong>{this.props.errorMessage}
</div>
);
}
}
render() {
const { handleSubmit, fields: { email, password, passwordConfirm }} = this.props;
return (
<form onSubmit={handleSubmit(this.handleFormSubmit.bind(this))}>
<fieldset className="form-group">
<label>{'Email:'}</label>
<input {...email} className="form-control" />
{this.renderErrorMessage(email)}
</fieldset>
<fieldset className="form-group">
<label>{'Password:'}</label>
<input {...password} type="password" className="form-control" />
{this.renderErrorMessage(password)}
</fieldset>
<fieldset className="form-group">
<label>{'Confirm Password:'}</label>
<input {...passwordConfirm} type="password" className="form-control" />
{this.renderErrorMessage(passwordConfirm)}
</fieldset>
{this.renderAlert()}
<button action="submit" className="btn btn-primary">
{'Sign in'}
</button>
</form>
);
}
}
function validate(formProps) {
const errors = {};
if (!formProps.email) {
errors.email = 'Please enter an email';
}
if (!formProps.password) {
errors.password = 'Please enter a password';
}
if (!formProps.passwordConfirm) {
errors.passwordConfirm = 'Please enter a password confirmation';
}
if (formProps.password !== formProps.passwordConfirm) {
errors.passwordConfirm = 'Passwords must match';
}
return errors;
}
function mapStateToProps(state) {
return { errorMessage: state.auth.error };
}
export default reduxForm({
form: 'signup',
fields: ['email', 'password', 'passwordConfirm'],
validate
}, mapStateToProps, actions)(SignUp); |
ios/versioned-react-native/ABI11_0_0/Libraries/Components/WebView/WebView.ios.js | jolicloud/exponent | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule WebView
* @noflow
*/
'use strict';
var ActivityIndicator = require('ActivityIndicator');
var EdgeInsetsPropType = require('EdgeInsetsPropType');
var React = require('React');
var ReactNative = require('react/lib/ReactNative');
var StyleSheet = require('StyleSheet');
var Text = require('Text');
var UIManager = require('UIManager');
var View = require('View');
var ScrollView = require('ScrollView');
var deprecatedPropType = require('deprecatedPropType');
var invariant = require('fbjs/lib/invariant');
var keyMirror = require('fbjs/lib/keyMirror');
var processDecelerationRate = require('processDecelerationRate');
var requireNativeComponent = require('requireNativeComponent');
var resolveAssetSource = require('resolveAssetSource');
var PropTypes = React.PropTypes;
var RCTWebViewManager = require('NativeModules').WebViewManager;
var BGWASH = 'rgba(255,255,255,0.8)';
var RCT_WEBVIEW_REF = 'webview';
var WebViewState = keyMirror({
IDLE: null,
LOADING: null,
ERROR: null,
});
const NavigationType = keyMirror({
click: true,
formsubmit: true,
backforward: true,
reload: true,
formresubmit: true,
other: true,
});
const JSNavigationScheme = 'react-js-navigation';
type ErrorEvent = {
domain: any,
code: any,
description: any,
}
type Event = Object;
const DataDetectorTypes = [
'phoneNumber',
'link',
'address',
'calendarEvent',
'none',
'all',
];
var defaultRenderLoading = () => (
<View style={styles.loadingView}>
<ActivityIndicator />
</View>
);
var defaultRenderError = (errorDomain, errorCode, errorDesc) => (
<View style={styles.errorContainer}>
<Text style={styles.errorTextTitle}>
Error loading page
</Text>
<Text style={styles.errorText}>
{'Domain: ' + errorDomain}
</Text>
<Text style={styles.errorText}>
{'Error Code: ' + errorCode}
</Text>
<Text style={styles.errorText}>
{'Description: ' + errorDesc}
</Text>
</View>
);
/**
* `WebView` renders web content in a native view.
*
*```
* import React, { Component } from 'react';
* import { WebView } from 'react-native';
*
* class MyWeb extends Component {
* render() {
* return (
* <WebView
* source={{uri: 'https://github.com/facebook/react-native'}}
* style={{marginTop: 20}}
* />
* );
* }
* }
*```
*
* You can use this component to navigate back and forth in the web view's
* history and configure various properties for the web content.
*/
class WebView extends React.Component {
static JSNavigationScheme = JSNavigationScheme;
static NavigationType = NavigationType;
static propTypes = {
...View.propTypes,
html: deprecatedPropType(
PropTypes.string,
'Use the `source` prop instead.'
),
url: deprecatedPropType(
PropTypes.string,
'Use the `source` prop instead.'
),
/**
* Loads static html or a uri (with optional headers) in the WebView.
*/
source: PropTypes.oneOfType([
PropTypes.shape({
/*
* The URI to load in the `WebView`. Can be a local or remote file.
*/
uri: PropTypes.string,
/*
* The HTTP Method to use. Defaults to GET if not specified.
* NOTE: On Android, only GET and POST are supported.
*/
method: PropTypes.string,
/*
* Additional HTTP headers to send with the request.
* NOTE: On Android, this can only be used with GET requests.
*/
headers: PropTypes.object,
/*
* The HTTP body to send with the request. This must be a valid
* UTF-8 string, and will be sent exactly as specified, with no
* additional encoding (e.g. URL-escaping or base64) applied.
* NOTE: On Android, this can only be used with POST requests.
*/
body: PropTypes.string,
}),
PropTypes.shape({
/*
* A static HTML page to display in the WebView.
*/
html: PropTypes.string,
/*
* The base URL to be used for any relative links in the HTML.
*/
baseUrl: PropTypes.string,
}),
/*
* Used internally by packager.
*/
PropTypes.number,
]),
/**
* Function that returns a view to show if there's an error.
*/
renderError: PropTypes.func, // view to show if there's an error
/**
* Function that returns a loading indicator.
*/
renderLoading: PropTypes.func,
/**
* Function that is invoked when the `WebView` has finished loading.
*/
onLoad: PropTypes.func,
/**
* Function that is invoked when the `WebView` load succeeds or fails.
*/
onLoadEnd: PropTypes.func,
/**
* Function that is invoked when the `WebView` starts loading.
*/
onLoadStart: PropTypes.func,
/**
* Function that is invoked when the `WebView` load fails.
*/
onError: PropTypes.func,
/**
* Boolean value that determines whether the web view bounces
* when it reaches the edge of the content. The default value is `true`.
* @platform ios
*/
bounces: PropTypes.bool,
/**
* A floating-point number that determines how quickly the scroll view
* decelerates after the user lifts their finger. You may also use the
* string shortcuts `"normal"` and `"fast"` which match the underlying iOS
* settings for `UIScrollViewDecelerationRateNormal` and
* `UIScrollViewDecelerationRateFast` respectively:
*
* - normal: 0.998
* - fast: 0.99 (the default for iOS web view)
* @platform ios
*/
decelerationRate: ScrollView.propTypes.decelerationRate,
/**
* Boolean value that determines whether scrolling is enabled in the
* `WebView`. The default value is `true`.
* @platform ios
*/
scrollEnabled: PropTypes.bool,
/**
* Controls whether to adjust the content inset for web views that are
* placed behind a navigation bar, tab bar, or toolbar. The default value
* is `true`.
*/
automaticallyAdjustContentInsets: PropTypes.bool,
/**
* The amount by which the web view content is inset from the edges of
* the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
*/
contentInset: EdgeInsetsPropType,
/**
* Function that is invoked when the `WebView` loading starts or ends.
*/
onNavigationStateChange: PropTypes.func,
/**
* Boolean value that forces the `WebView` to show the loading view
* on the first load.
*/
startInLoadingState: PropTypes.bool,
/**
* The style to apply to the `WebView`.
*/
style: View.propTypes.style,
/**
* Determines the types of data converted to clickable URLs in the web view’s content.
* By default only phone numbers are detected.
*
* You can provide one type or an array of many types.
*
* Possible values for `dataDetectorTypes` are:
*
* - `'phoneNumber'`
* - `'link'`
* - `'address'`
* - `'calendarEvent'`
* - `'none'`
* - `'all'`
*
* @platform ios
*/
dataDetectorTypes: PropTypes.oneOfType([
PropTypes.oneOf(DataDetectorTypes),
PropTypes.arrayOf(PropTypes.oneOf(DataDetectorTypes)),
]),
/**
* Boolean value to enable JavaScript in the `WebView`. Used on Android only
* as JavaScript is enabled by default on iOS. The default value is `true`.
* @platform android
*/
javaScriptEnabled: PropTypes.bool,
/**
* Boolean value to control whether DOM Storage is enabled. Used only in
* Android.
* @platform android
*/
domStorageEnabled: PropTypes.bool,
/**
* Set this to provide JavaScript that will be injected into the web page
* when the view loads.
*/
injectedJavaScript: PropTypes.string,
/**
* Sets the user-agent for the `WebView`.
* @platform android
*/
userAgent: PropTypes.string,
/**
* Boolean that controls whether the web content is scaled to fit
* the view and enables the user to change the scale. The default value
* is `true`.
*/
scalesPageToFit: PropTypes.bool,
/**
* Function that allows custom handling of any web view requests. Return
* `true` from the function to continue loading the request and `false`
* to stop loading.
* @platform ios
*/
onShouldStartLoadWithRequest: PropTypes.func,
/**
* Boolean that determines whether HTML5 videos play inline or use the
* native full-screen controller. The default value is `false`.
*
* **NOTE** : In order for video to play inline, not only does this
* property need to be set to `true`, but the video element in the HTML
* document must also include the `webkit-playsinline` attribute.
* @platform ios
*/
allowsInlineMediaPlayback: PropTypes.bool,
/**
* Boolean that determines whether HTML5 audio and video requires the user
* to tap them before they start playing. The default value is `true`.
*/
mediaPlaybackRequiresUserAction: PropTypes.bool,
};
state = {
viewState: WebViewState.IDLE,
lastErrorEvent: (null: ?ErrorEvent),
startInLoadingState: true,
};
componentWillMount() {
if (this.props.startInLoadingState) {
this.setState({viewState: WebViewState.LOADING});
}
}
render() {
var otherView = null;
if (this.state.viewState === WebViewState.LOADING) {
otherView = (this.props.renderLoading || defaultRenderLoading)();
} else if (this.state.viewState === WebViewState.ERROR) {
var errorEvent = this.state.lastErrorEvent;
invariant(
errorEvent != null,
'lastErrorEvent expected to be non-null'
);
otherView = (this.props.renderError || defaultRenderError)(
errorEvent.domain,
errorEvent.code,
errorEvent.description
);
} else if (this.state.viewState !== WebViewState.IDLE) {
console.error(
'RCTWebView invalid state encountered: ' + this.state.loading
);
}
var webViewStyles = [styles.container, styles.webView, this.props.style];
if (this.state.viewState === WebViewState.LOADING ||
this.state.viewState === WebViewState.ERROR) {
// if we're in either LOADING or ERROR states, don't show the webView
webViewStyles.push(styles.hidden);
}
var onShouldStartLoadWithRequest = this.props.onShouldStartLoadWithRequest && ((event: Event) => {
var shouldStart = this.props.onShouldStartLoadWithRequest &&
this.props.onShouldStartLoadWithRequest(event.nativeEvent);
RCTWebViewManager.startLoadWithResult(!!shouldStart, event.nativeEvent.lockIdentifier);
});
var decelerationRate = processDecelerationRate(this.props.decelerationRate);
var source = this.props.source || {};
if (this.props.html) {
source.html = this.props.html;
} else if (this.props.url) {
source.uri = this.props.url;
}
var webView =
<RCTWebView
ref={RCT_WEBVIEW_REF}
key="webViewKey"
style={webViewStyles}
source={resolveAssetSource(source)}
injectedJavaScript={this.props.injectedJavaScript}
bounces={this.props.bounces}
scrollEnabled={this.props.scrollEnabled}
decelerationRate={decelerationRate}
contentInset={this.props.contentInset}
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
onLoadingStart={this._onLoadingStart}
onLoadingFinish={this._onLoadingFinish}
onLoadingError={this._onLoadingError}
onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
scalesPageToFit={this.props.scalesPageToFit}
allowsInlineMediaPlayback={this.props.allowsInlineMediaPlayback}
mediaPlaybackRequiresUserAction={this.props.mediaPlaybackRequiresUserAction}
dataDetectorTypes={this.props.dataDetectorTypes}
/>;
return (
<View style={styles.container}>
{webView}
{otherView}
</View>
);
}
/**
* Go forward one page in the web view's history.
*/
goForward = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.goForward,
null
);
};
/**
* Go back one page in the web view's history.
*/
goBack = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.goBack,
null
);
};
/**
* Reloads the current page.
*/
reload = () => {
this.setState({viewState: WebViewState.LOADING});
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.reload,
null
);
};
/**
* Stop loading the current page.
*/
stopLoading = () => {
UIManager.dispatchViewManagerCommand(
this.getWebViewHandle(),
UIManager.RCTWebView.Commands.stopLoading,
null
);
};
/**
* We return an event with a bunch of fields including:
* url, title, loading, canGoBack, canGoForward
*/
_updateNavigationState = (event: Event) => {
if (this.props.onNavigationStateChange) {
this.props.onNavigationStateChange(event.nativeEvent);
}
};
/**
* Returns the native `WebView` node.
*/
getWebViewHandle = (): any => {
return ReactNative.findNodeHandle(this.refs[RCT_WEBVIEW_REF]);
};
_onLoadingStart = (event: Event) => {
var onLoadStart = this.props.onLoadStart;
onLoadStart && onLoadStart(event);
this._updateNavigationState(event);
};
_onLoadingError = (event: Event) => {
event.persist(); // persist this event because we need to store it
var {onError, onLoadEnd} = this.props;
onError && onError(event);
onLoadEnd && onLoadEnd(event);
console.warn('Encountered an error loading page', event.nativeEvent);
this.setState({
lastErrorEvent: event.nativeEvent,
viewState: WebViewState.ERROR
});
};
_onLoadingFinish = (event: Event) => {
var {onLoad, onLoadEnd} = this.props;
onLoad && onLoad(event);
onLoadEnd && onLoadEnd(event);
this.setState({
viewState: WebViewState.IDLE,
});
this._updateNavigationState(event);
};
}
var RCTWebView = requireNativeComponent('RCTWebView', WebView, {
nativeOnly: {
onLoadingStart: true,
onLoadingError: true,
onLoadingFinish: true,
},
});
var styles = StyleSheet.create({
container: {
flex: 1,
},
errorContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: BGWASH,
},
errorText: {
fontSize: 14,
textAlign: 'center',
marginBottom: 2,
},
errorTextTitle: {
fontSize: 15,
fontWeight: '500',
marginBottom: 10,
},
hidden: {
height: 0,
flex: 0, // disable 'flex:1' when hiding a View
},
loadingView: {
backgroundColor: BGWASH,
flex: 1,
justifyContent: 'center',
alignItems: 'center',
height: 100,
},
webView: {
backgroundColor: '#ffffff',
}
});
module.exports = WebView;
|
src/TPA/Button/Button.js | skyiea/wix-style-react | import React from 'react';
import {any, oneOf, string} from 'prop-types';
import omit from 'omit';
import classNames from 'classnames';
import WixComponent from '../../BaseComponents/WixComponent';
import tpaStyleInjector from '../TpaStyleInjector';
let styles = {locals: {}};
try {
styles = require('!css-loader?modules&camelCase&localIdentName="[path][name]__[local]__[hash:base64:5]"!sass-loader!./Button.scss');
} catch (e) {}
class Button extends WixComponent {
static propTypes = {
theme: oneOf(['fill', 'outline']),
children: any,
id: string
};
static defaultProps = {
theme: 'fill'
};
render() {
const {children, theme, className} = this.props;
const {locals} = styles;
const classes = (classNames([
[locals['wix-style-react-button']],
[locals[`wix-style-react-button-${theme}`]]
], className)).trim();
return (
<button className={classes} data-theme={theme} {...omit(['injectedStyles', 'children', 'theme', 'className', 'dataHook'], this.props)}>
{children}
</button>
);
}
}
Button.displayName = 'Button';
export default tpaStyleInjector(Button, styles);
|
app/src/components/Header/SubHeader.js | fikrimuhal/animated-potato | import React from 'react';
import styles from './style';
const SubHeader = ({children}) => {
return <h2 className={styles.tagline}>
{children.split(' ').map((word,idx) => {
const arr = word.split('');
return (<span key={idx}><strong>{arr.shift()}</strong>{arr.join('')} </span>);
})}
</h2>;
};
SubHeader.displayName = 'SubHeader';
export default SubHeader;
|
src/App.js | liuli0803/myapp | import React, { Component } from 'react';
import './App.css';
import RouteMap from "./RouteMap";
class App extends Component {
render() {
return (
<div>
<RouteMap />
</div>
);
}
}
export default App;
|
form/AddressField.js | ExtPoint/yii2-frontend | import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {change, getFormInitialValues} from 'redux-form';
import {saveToCache} from 'extpoint-yii2/actions/formList';
import {view, resource, locale} from 'components';
import AddressHelper from './AddressHelper';
class AddressField extends React.Component {
static propTypes = {
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element
]),
hint: PropTypes.string,
input: PropTypes.shape({
name: PropTypes.string,
value: PropTypes.any,
onChange: PropTypes.func,
}),
metaItem: PropTypes.shape({
addressType: PropTypes.string,
relationName: PropTypes.string,
}),
parentId: PropTypes.number,
addressValues: PropTypes.shape({
country: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
countryLabel: PropTypes.string,
region: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
regionLabel: PropTypes.string,
city: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
cityLabel: PropTypes.string,
metroStation: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
metroStationLabel: PropTypes.string,
address: PropTypes.string,
longitude: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
latitude: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string,
]),
}),
onChange: PropTypes.func,
countryModelClass: PropTypes.string,
autoCompleteUrl: PropTypes.string,
autoDetect: PropTypes.bool,
addressNames: PropTypes.object,
};
constructor() {
super(...arguments);
this._api = null;
this._isSentDetect = false;
this.state = {
isDetecting: this.props.autoDetect,
};
this._onChange = this._onChange.bind(this);
}
componentDidMount() {
resource.loadYandexMap()
.then(ymaps => {
this._api = ymaps;
if (this.props.metaItem.addressType === AddressHelper.TYPE_ADDRESS) {
this._initSuggest();
}
if (this.props.autoDetect && [AddressHelper.TYPE_COUNTRY, AddressHelper.TYPE_REGION, AddressHelper.TYPE_CITY].indexOf(this.props.metaItem.addressType) !== -1) {
this._detectAddress();
}
});
}
componentDidUpdate(prevProps) {
// Listen reset for address field
if (this.props.metaItem.addressType === AddressHelper.TYPE_ADDRESS
&& prevProps.input.value) {
const input = ReactDOM.findDOMNode(this).querySelector('input[type=text]');
if (input) {
input.value = this.props.input.value;
// Close ymaps autocomplete on set value
setTimeout(() => {
const ymapsEl = input.parentNode.querySelector('ymaps');
if (ymapsEl) {
ymapsEl.style.display = 'none';
}
});
}
}
}
render() {
const props = {...this.props};
switch (this.props.metaItem.addressType) {
case AddressHelper.TYPE_COUNTRY:
case AddressHelper.TYPE_REGION:
case AddressHelper.TYPE_CITY:
case AddressHelper.TYPE_METRO_STATION:
props.dropDownProps = {
...props,
onChange: this._onChange,
labelProps: null,
hintProps: null,
errorProps: null,
};
if ([AddressHelper.TYPE_COUNTRY, AddressHelper.TYPE_REGION, AddressHelper.TYPE_CITY].indexOf(this.props.metaItem.addressType) !== -1) {
props.dropDownProps.placeholder = this.state.isDetecting ? locale.t('Определение...') : undefined;
}
if (this.props.metaItem.addressType === AddressHelper.TYPE_COUNTRY) {
props.dropDownProps.enumClassName = this.props.countryModelClass;
} else {
props.dropDownProps.autoComplete = {
method: this.props.autoCompleteUrl,
addressType: this.props.metaItem.addressType,
parentId: this.props.parentId || null,
};
}
break;
// Make address field uncontrolled so that API's SuggestView won't reopen it on suggest selection
case AddressHelper.TYPE_ADDRESS:
props.stringProps = {
...props,
inputProps: {
defaultValue: props.input.value,
value: undefined,
onChange: undefined,
},
input: {
onChange: () => {},
},
onChange: this._onChange,
labelProps: null,
hintProps: null,
errorProps: null,
};
break;
case AddressHelper.TYPE_LONGITUDE:
case AddressHelper.TYPE_LATITUDE:
props.stringProps = {
...props,
onChange: this._onChange,
labelProps: null,
hintProps: null,
errorProps: null,
};
break;
}
const AddressFieldView = this.props.view || view.getFormView('AddressFieldView');
return (
<AddressFieldView {...props}/>
);
}
_onChange(value) {
const attributes = [
'country',
'region',
'city',
'metroStation',
'address',
'latitude',
'longitude',
];
let isFined = false;
attributes.forEach(key => {
const name = this.props.addressNames[key];
if (name) {
if (this.props.input.name === name && key !== AddressHelper.TYPE_METRO_STATION) {
isFined = true;
} else if (isFined) {
this.props.dispatch(change(this.props.formId, name, null));
}
}
});
if (this.props.onChange) {
this.props.onChange(value);
}
}
_detectAddress() {
if (!this._api.geolocation || this._isSentDetect) {
return;
}
this._isSentDetect = true;
this.setState({
isDetecting: true,
});
AddressHelper.detectAddress(this._api)
.then(data => {
const toDispatch = [];
Object.keys(data).map(addressType => {
const item = data[addressType];
if (this.props.addressNames[addressType]) {
toDispatch.push(saveToCache(
`${this.props.formId}_${this.props.addressNamesWithoutPrefix[addressType]}`,
{
[item.id]: {
id: item.id,
label: item.title,
},
}
));
toDispatch.push(change(
this.props.formId,
this.props.addressNames[addressType],
item.id
));
}
});
this.props.dispatch(toDispatch);
this.setState({
isDetecting: false,
});
})
.catch(e => console.error(e)); // eslint-disable-line no-console
}
_initSuggest() {
const input = ReactDOM.findDOMNode(this).querySelector('input[type=text]');
const suggestView = new this._api.SuggestView(input, {
offset: [-1, 5],
provider: {
suggest: searchQuery => {
const areaLabels = [AddressHelper.TYPE_COUNTRY, AddressHelper.TYPE_REGION, AddressHelper.TYPE_CITY]
.map(addressType => this.props.addressValues[addressType + 'Label'])
.filter(Boolean)
.join(', ');
return this._api.suggest(areaLabels + ', ' + searchQuery);
}
}
});
suggestView.events.add('select', event => {
const address = event.get('item').value;
this._api.geocode(address)
.then(result => {
const coordinates = result.geoObjects.get(0).geometry.getCoordinates();
this.props.dispatch([
//change(this.props.formId, this.props.addressNames.address, address),
change(this.props.formId, this.props.addressNames.longitude, coordinates[0]),
change(this.props.formId, this.props.addressNames.latitude, coordinates[1]),
]);
});
});
}
}
export default connect(
(state, props) => ({
parentId: AddressHelper.getParentId(state, props.formId, props.model, props.prefix, props.attribute, props.attributePrefix),
addressNames: AddressHelper.getNames(props.model, props.prefix || ''),
addressNamesWithoutPrefix: AddressHelper.getNames(props.model, ''),
addressValues: AddressHelper.getValues(state, props.formId, props.model, props.prefix, props.attribute, props.attributePrefix),
initialValues: getFormInitialValues(props.formId)(state),
})
)(AddressField);
|
slides/the-speaker/components/AudienseLogo.js | javivelasco/scaffolding-react-apps-slides | import React from 'react';
const AudienseLogo = (props) => (
<svg viewBox="0 0 200 48" version="1.1" {...props}>
<g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g id="200-width" fill="#000000">
<path d="M18.134715,11.2025374 L23.9390953,11.2025374 L23.9390953,34.772932 L18.134715,34.772932 L18.134715,32.2819496 C17.0006993,33.3796501 15.8654916,34.1704317 14.7263104,34.6534847 C13.5875266,35.1369426 12.3513939,35.3798863 11.0214883,35.3798863 C8.03347214,35.3798863 5.44995073,34.1987752 3.27052672,31.8377676 C1.09030802,29.4763552 -1.24344979e-14,26.5403809 -1.24344979e-14,23.0310597 C-1.24344979e-14,19.3921684 1.05534187,16.40963 3.16523094,14.0834444 C5.27472265,11.7588784 7.83519819,10.596393 10.851823,10.596393 C12.2389459,10.596393 13.5410375,10.863631 14.7584952,11.3977022 C15.9751581,11.9321782 17.1004323,12.7334874 18.1351124,13.8020347 L18.1351124,11.2025374 L18.134715,11.2025374 Z M89.9364828,44.2753844 C89.8264439,43.6778918 89.5470635,43.1504925 89.0973171,42.6924907 C88.502098,42.0859413 87.7797292,41.7830716 86.9290187,41.7830716 C86.0918179,41.7830716 85.3769986,42.0859413 84.7809848,42.6924907 C84.187355,43.2994449 83.8889507,44.0282759 83.8889507,44.8806033 C83.8889507,45.7475073 84.187355,46.4836266 84.7809848,47.090176 C85.3769986,47.6967253 86.0922153,48 86.9290187,48 C87.7797292,48 88.502098,47.6967253 89.0973171,47.090176 C89.5907569,46.5880138 89.8791203,45.9970421 89.9637601,45.3165715 L152.464632,45.3165715 C152.549721,45.9970421 152.839333,46.5880138 153.332115,47.090176 C153.928129,47.6967253 154.643345,48 155.478162,48 C156.32927,48 157.050844,47.6967253 157.646858,47.090176 C158.242872,46.4836266 158.540879,45.7475073 158.540879,44.8806033 C158.540879,44.0282759 158.242872,43.2994449 157.646858,42.6924907 C157.050844,42.0859413 156.32927,41.7830716 155.478162,41.7830716 C154.643743,41.7830716 153.928129,42.0859413 153.332115,42.6924907 C152.882968,43.1504925 152.602604,43.6778918 152.492046,44.2753844 L89.9364828,44.2753844 Z M12.0339172,16.0557421 C10.2407101,16.0557421 8.74868877,16.7023771 7.56301853,17.9948374 C6.37695095,19.2872978 5.78332115,20.9441736 5.78332115,22.9666796 C5.78332115,25.0033573 6.38728186,26.6784539 7.59480594,27.9927792 C8.80233002,29.3071044 10.2883912,29.964267 12.054579,29.964267 C13.877984,29.964267 15.3882832,29.3180369 16.5878604,28.0255766 C17.7894243,26.7331163 18.3902063,25.039394 18.3902063,22.9448147 C18.3902063,20.894775 17.7894243,19.2334452 16.5878604,17.9620401 C15.3878858,16.6914447 13.8704345,16.0557421 12.0339172,16.0557421 Z M29.7832099,11.2025374 L35.6519597,11.2025374 L35.6519597,22.5540803 C35.6519597,24.7636529 35.8009632,26.2990569 36.0993674,27.1582677 C36.3965797,28.0174784 36.8773642,28.6851686 37.5377475,29.1613382 C38.1985282,29.6383176 39.0110938,29.8772122 39.978623,29.8772122 C40.9441654,29.8772122 41.7630885,29.6423667 42.4385708,29.1730805 C43.1140532,28.7029845 43.6143075,28.0142392 43.9421151,27.1040103 C44.1836994,26.4253876 44.3029022,24.9733943 44.3029022,22.7500548 L44.3029022,11.2025374 L50.1072825,11.2025374 L50.1072825,21.1899516 C50.1072825,25.306632 49.7878191,28.122754 49.1508789,29.6387225 C48.3712928,31.4875238 47.2233701,32.9063148 45.7063162,33.8959054 C44.1904542,34.8846861 42.2629454,35.3802912 39.9245844,35.3802912 C37.3875521,35.3802912 35.3352777,34.8024902 33.7693506,33.6468881 C32.2030262,32.4920959 31.1019899,30.8813794 30.4638577,28.8163582 C30.0104898,27.3858249 29.7832099,24.7871375 29.7832099,21.0170567 L29.7832099,11.2025374 L29.7832099,11.2025374 Z M73.0033536,2.10389216 L78.8077339,2.10389216 L78.8077339,34.772932 L73.0033536,34.772932 L73.0033536,32.2819496 C71.8693379,33.3796501 70.7345275,34.1704317 69.594949,34.6534847 C68.4565625,35.1369426 67.2200324,35.3798863 65.8901268,35.3798863 C62.9021107,35.3798863 60.3189866,34.1987752 58.1395626,31.8377676 C55.9593439,29.4763552 54.8686385,26.5403809 54.8686385,23.0310597 C54.8686385,19.3921684 55.9239804,16.40963 58.0342668,14.0834444 C60.1437585,11.7588784 62.7042341,10.596393 65.7204616,10.596393 C67.1079818,10.596393 68.4100734,10.863631 69.6275311,11.3977022 C70.844194,11.9321782 71.9694682,12.7334874 73.0037509,13.8020347 L73.0037509,2.10389216 L73.0033536,2.10389216 Z M66.9021584,16.0557421 C65.1089513,16.0557421 63.6173273,16.7023771 62.4316571,17.9948374 C61.2455895,19.2872978 60.6519597,20.9441736 60.6519597,22.9666796 C60.6519597,25.0033573 61.2563177,26.6784539 62.4638418,27.9927792 C63.6713659,29.3071044 65.1574271,29.964267 66.9232175,29.964267 C68.7466226,29.964267 70.2569217,29.3180369 71.4564989,28.0255766 C72.6584602,26.7331163 73.2592422,25.039394 73.2592422,22.9448147 C73.2592422,20.894775 72.6584602,19.2334452 71.4564989,17.9620401 C70.2565244,16.6914447 68.7390731,16.0557421 66.9021584,16.0557421 Z M84.0371595,11.2025374 L89.8415398,11.2025374 L89.8415398,34.772932 L84.0371595,34.772932 L84.0371595,11.2025374 Z M118.286897,24.6992729 L99.6431864,24.6992729 C99.9121873,26.3751793 100.630583,27.7073204 101.801551,28.696506 C102.969341,29.6848818 104.460965,30.1796771 106.275629,30.1796771 C108.444324,30.1796771 110.307066,29.4075211 111.866636,27.8623994 L116.755936,30.2011371 C115.537287,31.9636934 114.078642,33.2670862 112.376824,34.1117203 C110.676992,34.9567594 108.656108,35.3794814 106.318144,35.3794814 C102.690407,35.3794814 99.7353698,34.2133518 97.4538288,31.8802828 C95.1706984,29.5476186 94.0295305,26.626626 94.0295305,23.1173047 C94.0295305,19.5209286 95.1671223,16.5355558 97.4415112,14.1591618 C99.7178868,11.7839826 102.56882,10.5959881 105.999873,10.5959881 C109.642312,10.5959881 112.604104,11.7839826 114.885247,14.1591618 C117.166789,16.5355558 118.307559,19.6731733 118.307559,23.5716093 L118.286897,24.6992729 Z M112.48212,20.0416378 C112.099081,18.7273126 111.343733,17.6587654 110.214883,16.8359962 C109.08643,16.0124171 107.777186,15.6010325 106.285562,15.6010325 C104.667583,15.6010325 103.247481,16.0630304 102.026447,16.9870261 C101.260371,17.5648272 100.551114,18.583166 99.897883,20.0416378 L112.48212,20.0416378 Z M122.985076,11.2025374 L128.787867,11.2025374 L128.787867,13.6186122 C130.103865,12.4881143 131.296688,11.7013817 132.364745,11.2592243 C133.433993,10.8174717 134.52748,10.596393 135.646,10.596393 C137.937872,10.596393 139.884055,11.4118739 141.483757,13.0440504 C142.826775,14.430044 143.499078,16.4817033 143.499078,19.1965988 L143.499078,34.7725271 L137.75867,34.7725271 L137.75867,24.4506605 C137.75867,21.6381826 137.635096,19.7699458 137.388744,18.8475697 C137.140405,17.923574 136.710083,17.220657 136.093407,16.737604 C135.478718,16.2537412 134.720191,16.0124171 133.813853,16.0124171 C132.6405,16.0124171 131.633237,16.4128693 130.792857,17.2137736 C129.950491,18.0142729 129.366795,19.1208813 129.042563,20.5348135 C128.872501,21.2709328 128.787469,22.8642384 128.787469,25.3175645 L128.787469,34.7733369 L122.984678,34.7733369 L122.984678,11.2025374 L122.985076,11.2025374 Z M163.269653,14.4960437 L159.677278,18.1567999 C158.216647,16.6837515 156.892702,15.9468223 155.701469,15.9468223 C155.050224,15.9468223 154.539242,16.0877297 154.171302,16.3695443 C153.801774,16.6509541 153.617804,17.0011978 153.617804,17.4202757 C153.617804,17.738127 153.735418,18.0308741 153.96985,18.2973023 C154.202295,18.5653502 154.780428,18.9301706 155.701071,19.3921684 L157.827649,20.4756972 C160.067866,21.6017411 161.60439,22.7500548 162.440796,23.9190188 C163.276407,25.0900073 163.694412,26.4614243 163.694412,28.0348894 C163.694412,30.1294687 162.94105,31.8770435 161.430354,33.2776138 C159.921644,34.6789938 157.898773,35.3794814 155.362535,35.3794814 C151.989494,35.3794814 149.295909,34.0364078 147.283766,31.3502607 L150.854684,27.3850151 C151.535332,28.1940175 152.332798,28.847536 153.245891,29.3463803 C154.161369,29.8440099 154.971948,30.0930272 155.680409,30.0930272 C156.445691,30.0930272 157.062764,29.9063655 157.529244,29.5302077 C157.998109,29.1544548 158.230951,28.7220151 158.230951,28.2296493 C158.230951,27.3202301 157.388585,26.432271 155.701469,25.565367 L153.746146,24.5688931 C150.004768,22.6484234 148.132887,20.243686 148.132887,17.3546809 C148.132887,15.4917079 148.837773,13.8992121 150.249134,12.5788133 C151.658905,11.2567948 153.463238,10.596393 155.65935,10.596393 C157.160908,10.596393 158.574653,10.9312503 159.900585,11.6042043 C161.225722,12.2759435 162.34901,13.2388103 163.269653,14.4960437 Z M191.438062,24.6992729 L172.793954,24.6992729 C173.063352,26.3751793 173.781748,27.7073204 174.952716,28.696506 C176.120903,29.6848818 177.612925,30.1796771 179.426794,30.1796771 C181.595489,30.1796771 183.458231,29.4075211 185.017801,27.8623994 L189.907101,30.2011371 C188.688452,31.9636934 187.229807,33.2670862 185.528386,34.1117203 C183.828157,34.9567594 181.806876,35.3794814 179.468515,35.3794814 C175.841572,35.3794814 172.886535,34.2133518 170.604596,31.8802828 C168.321863,29.5476186 167.180696,26.626626 167.180696,23.1173047 C167.180696,19.5209286 168.318287,16.5355558 170.592676,14.1591618 C172.869052,11.7839826 175.719587,10.5959881 179.151038,10.5959881 C182.79308,10.5959881 185.755269,11.7839826 188.036412,14.1591618 C190.317556,16.5355558 191.458724,19.6731733 191.458724,23.5716093 L191.438062,24.6992729 Z M185.634079,20.0416378 C185.249849,18.7273126 184.494898,17.6587654 183.366843,16.8359962 C182.23839,16.0124171 180.928749,15.6010325 179.437522,15.6010325 C177.819146,15.6010325 176.399043,16.0630304 175.178009,16.9870261 C174.41233,17.5648272 173.701882,18.583166 173.049445,20.0416378 L185.634079,20.0416378 Z M196.936489,29.1625529 C197.787597,29.1625529 198.509965,29.4654227 199.105979,30.072377 C199.701198,30.6793312 200,31.4081622 200,32.2600847 C200,33.1269887 199.701198,33.8635129 199.105979,34.4696573 C198.509965,35.0766116 197.787597,35.3798863 196.936489,35.3798863 C196.101672,35.3798863 195.386853,35.0766116 194.790839,34.4696573 C194.19562,33.8635129 193.896818,33.1269887 193.896818,32.2600847 C193.896818,31.4081622 194.19562,30.6793312 194.790839,30.072377 C195.386853,29.4654227 196.102069,29.1625529 196.936489,29.1625529 Z M196.936489,19.9306936 C197.787597,19.9306936 198.509965,20.2331584 199.105979,20.8401127 C199.701198,21.4474719 200,22.1763029 200,23.0274155 C200,23.8947244 199.701198,24.6316535 199.105979,25.2373931 C198.509965,25.8443473 197.787597,26.1480269 196.936489,26.1480269 C196.101672,26.1480269 195.386853,25.8443473 194.790839,25.2373931 C194.19562,24.6316535 193.896818,23.8947244 193.896818,23.0274155 C193.896818,22.175898 194.19562,21.4474719 194.790839,20.8401127 C195.386853,20.2331584 196.102069,19.9306936 196.936489,19.9306936 Z M11.9592168,0 C12.8103245,0 13.532296,0.302464866 14.1279125,0.909419128 C14.723529,1.51637339 15.0199466,2.24479949 15.0199466,3.09712685 C15.0199466,3.96403084 14.723529,4.70095996 14.1279125,5.30710442 C13.532296,5.91365377 12.8103245,6.21733336 11.9592168,6.21733336 C11.1228106,6.21733336 10.4071967,5.91365377 9.81197749,5.30710442 C9.21795035,4.70095996 8.91914873,3.96403084 8.91914873,3.09712685 C8.91914873,2.24520439 9.21795035,1.51637339 9.81197749,0.909419128 C10.4071967,0.302464866 11.1228106,0 11.9592168,0 Z" id="Combined-Shape"></path>
</g>
</g>
</svg>
);
export default AudienseLogo;
|
client/js/components/ui/formik/Error.js | khlieng/name_pending | import React from 'react';
import { ErrorMessage } from 'formik';
const Error = props => (
<ErrorMessage component="div" className="form-error" {...props} />
);
export default Error;
|
sc/src/main/javascript/bundles/gene-search/src/GeneSearchRouter.js | gxa/atlas | import React from 'react'
import PropTypes from 'prop-types'
import { BrowserRouter, Route } from 'react-router-dom'
import GeneSearch from './GeneSearch'
const GeneSearchRouter = ({atlasUrl, basename}) =>
<BrowserRouter basename={basename}>
<Route
path={`/search`}
render={
({match, location, history}) =>
<GeneSearch
atlasUrl={atlasUrl}
history={history}/>
} />
</BrowserRouter>
GeneSearchRouter.propTypes = {
atlasUrl: PropTypes.string.isRequired,
basename: PropTypes.string.isRequired
}
export default GeneSearchRouter
|
test/helpers/shallowRenderHelper.js | jezzasan/taproom-react | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils';
/**
* Get the shallow rendered component
*
* @param {Object} component The component to return the output for
* @param {Object} props [optional] The components properties
* @param {Mixed} ...children [optional] List of children
* @return {Object} Shallow rendered output
*/
export default function createComponent(component, props = {}, ...children) {
const shallowRenderer = TestUtils.createRenderer();
shallowRenderer.render(React.createElement(component, props, children.length > 1 ? children : children[0]));
return shallowRenderer.getRenderOutput();
}
|
web/src/layout/leftpanel/zonelistpanel.js | corradio/electricitymap | import React from 'react';
import { useTranslation } from '../../helpers/translation';
import { dispatchApplication } from '../../store';
import SearchBar from '../../components/searchbar';
import ZoneList from '../../components/zonelist';
import InfoText from './infotext';
const documentSearchKeyUpHandler = (key, searchRef) => {
if (key === '/') {
// Reset input and focus
if (searchRef.current) {
searchRef.current.value = '';
searchRef.current.focus();
}
} else if (key && key.match(/^[A-z]$/)) {
// If input is not focused, focus it and append the pressed key
if (searchRef.current && searchRef.current !== document.activeElement) {
searchRef.current.value += key;
searchRef.current.focus();
}
}
};
const ZoneListPanel = () => {
const { __ } = useTranslation();
return (
<div className="left-panel-zone-list">
<div className="zone-list-header">
<div className="title">
{' '}
{__('left-panel.zone-list-header-title')}
</div>
<div className="subtitle">{__('left-panel.zone-list-header-subtitle')}</div>
</div>
<SearchBar
className="zone-search-bar"
placeholder={__('left-panel.search')}
documentKeyUpHandler={documentSearchKeyUpHandler}
searchHandler={query => dispatchApplication('searchQuery', query)}
/>
<ZoneList />
<InfoText />
</div>
);
};
export default ZoneListPanel;
|
src/Page1.js | babizhu/webApp | /**
* Created by liu_k on 2015/11/24.
*/
import React, { Component } from 'react';
import { Icon,Menu, Breadcrumb,Affix } from 'antd';
const SubMenu = Menu.SubMenu;
import App from './App';
import styles from "./page1.css";
//import astyles1 from "./css/test.scss";
class Page1 extends Component {
render() {
let top = {
//position: 'absolute',
position: 'fixed',
left: 0,
top: 0,
zIndex: 100,
width: '100%',
height: '50px'
};
return (
//<BrowserDemo>
<div className="ant-layout-aside">
<div className="ant-layout-header" style={top}>header
<div className="ant-layout-logo"></div>
</div>
<div style={{marginTop:'51px'}}>
<aside className="ant-layout-sider">
<Menu mode="inline" theme="dark"
defaultSelectedKeys={['1']} defaultOpenKeys={['sub1']}>
<SubMenu key="sub1" title={<span><Icon type="user" /><b>Support</b></span>}>
<Menu.Item key="1"><span><Icon type="user"/>导航一</span></Menu.Item>
<Menu.Item key="2">选项2</Menu.Item>
<Menu.Item key="3">选项3</Menu.Item>
<Menu.Item key="4">选项4</Menu.Item>
</SubMenu>
<SubMenu key="sub2" title={<span><Icon type="laptop" />导航二</span>}>
<Menu.Item key="5">选项5</Menu.Item>
<Menu.Item key="6">选项6</Menu.Item>
<Menu.Item key="7">选项7</Menu.Item>
<Menu.Item key="8">选项8</Menu.Item>
</SubMenu>
<SubMenu key="sub3" title={<span><Icon type="notification" />导航三</span>}>
<Menu.Item key="9">选项9</Menu.Item>
<Menu.Item key="10">选项10</Menu.Item>
<Menu.Item key="11">选项11</Menu.Item>
<Menu.Item key="12">选项12</Menu.Item>
</SubMenu>
<SubMenu key="sub4" title={<span><Icon type="notification" />导航四</span>}>
<Menu.Item key="13">选项9</Menu.Item>
<Menu.Item key="14">选项10</Menu.Item>
<Menu.Item key="15">选项11</Menu.Item>
<Menu.Item key="16">选项12</Menu.Item>
</SubMenu>
<SubMenu key="sub5" title={<span><Icon type="notification" />导航5</span>}>
<Menu.Item key="13">选项9</Menu.Item>
<Menu.Item key="14">选项10</Menu.Item>
<Menu.Item key="15">选项11</Menu.Item>
<Menu.Item key="16">选项12</Menu.Item>
</SubMenu>
<SubMenu key="sub6" title={<span><Icon type="notification" />导航6</span>}>
<Menu.Item key="13">选项9</Menu.Item>
<Menu.Item key="14">选项10</Menu.Item>
<Menu.Item key="15">选项11</Menu.Item>
<Menu.Item key="16">选项12</Menu.Item>
</SubMenu>
</Menu>
</aside>
<div className="ant-layout-main">
<div className="ant-layout-breadcrumb">
<Breadcrumb>
<Breadcrumb.Item>首页</Breadcrumb.Item>
<Breadcrumb.Item>应用列表</Breadcrumb.Item>
<Breadcrumb.Item>某应用</Breadcrumb.Item>
</Breadcrumb>
</div>
<div className="ant-layout-container">
<div className="ant-layout-content">
<div style={{ height: 590 }}><App /></div>
</div>
</div>
</div>
</div>
</div>
//</BrowserDemo>
);
}
}
Page1.propTypes = {};
Page1.defaultProps = {};
export default Page1;
|
app/common/routes.js | Kaniwani/KW-Frontend | import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import { hasToken } from 'common/utils/auth';
import LandingPage from 'pages/LandingPage/Loadable';
import HomePage from 'pages/HomePage/Loadable';
import VocabLevelsPage from 'pages/VocabLevelsPage/Loadable';
import VocabLevelPage from 'pages/VocabLevelPage/Loadable';
import VocabEntryPage from 'pages/VocabEntryPage/Loadable';
import QuizSessionPage from 'pages/QuizSessionPage/Loadable';
import QuizSummaryPage from 'pages/QuizSummaryPage/Loadable';
import SettingsPage from 'pages/SettingsPage/Loadable';
import AboutPage from 'pages/AboutPage/Loadable';
import ContactPage from 'pages/ContactPage/Loadable';
import NotFoundPage from 'pages/NotFoundPage/Loadable';
import ConfirmResetPasswordPage from 'pages/ConfirmResetPasswordPage/Loadable';
// used for isolated testing of components in development with HMR
import { IS_DEV_ENV } from 'common/constants';
import DevPage from 'pages/DevPage/Loadable';
export function Routes() {
return (
<Switch>
{IS_DEV_ENV && <Route exact path="/dev" component={DevPage} />}
<Route path="/password-reset/:uid/:token" component={ConfirmResetPasswordPage} />
<Route exact path="/welcome" component={LandingPage} />
<Route render={() => (hasToken() ? renderProtectedRoutes() : <Redirect to="/welcome" />)} />
</Switch>
);
}
function renderProtectedRoutes() {
return (
<Switch>
<Route exact path="/" component={HomePage} />
<Route exact path="/about" component={AboutPage} />
<Route exact path="/contact" component={ContactPage} />
<Route exact path="/settings" component={SettingsPage} />
<Redirect exact path="/vocabulary" to="/vocabulary/levels" />
<Route exact path="/vocabulary/levels" component={VocabLevelsPage} />
<Route exact path="/vocabulary/levels/:id" component={VocabLevelPage} />
<Route exact path="/vocabulary/entry/:id" component={VocabEntryPage} />
<Route exact path="/:category(lessons|reviews)/session" component={QuizSessionPage} />
<Route exact path="/:category(lessons|reviews)" component={QuizSummaryPage} />
<Route component={NotFoundPage} />
</Switch>
);
}
export default Routes;
|
packages/ringcentral-widgets-docs/src/app/pages/Components/TabNavigationView/Demo.js | ringcentral/ringcentral-js-widget | import React, { Component } from 'react';
// eslint-disable-next-line
import TabNavigationView from 'ringcentral-widgets/components/TabNavigationView';
import DialPadIcon from 'ringcentral-widgets/assets/images/DialPadNav.svg';
import CallsIcon from 'ringcentral-widgets/assets/images/Calls.svg';
import MessageIcon from 'ringcentral-widgets/assets/images/Messages.svg';
import SettingsIcon from 'ringcentral-widgets/assets/images/Settings.svg';
import ContactIcon from 'ringcentral-widgets/assets/images/Contact.svg';
import MoreMenuIcon from 'ringcentral-widgets/assets/images/MoreMenu.svg';
import DialPadHoverIcon from 'ringcentral-widgets/assets/images/DialPadHover.svg';
import CallsHoverIcon from 'ringcentral-widgets/assets/images/CallsHover.svg';
import MessageHoverIcon from 'ringcentral-widgets/assets/images/MessagesHover.svg';
import SettingsHoverIcon from 'ringcentral-widgets/assets/images/SettingsHover.svg';
import ContactHoverIcon from 'ringcentral-widgets/assets/images/ContactHover.svg';
import MoreMenuHoverIcon from 'ringcentral-widgets/assets/images/MoreMenuHover.svg';
import ContactNavIcon from 'ringcentral-widgets/assets/images/ContactsNavigation.svg';
import SettingsNavIcon from 'ringcentral-widgets/assets/images/SettingsNavigation.svg';
const tabs = [
{
icon: DialPadIcon,
activeIcon: DialPadHoverIcon,
label: 'Dial Pad',
path: '/dialer',
},
{
icon: CallsIcon,
activeIcon: CallsHoverIcon,
label: 'Calls',
path: '/calls',
isActive: (currentPath) =>
currentPath === '/calls' || currentPath === '/calls/active',
},
{
icon: MessageIcon,
activeIcon: MessageHoverIcon,
label: 'Messages',
path: '/messages',
noticeCounts: 1,
isActive: (currentPath) =>
currentPath === '/messages' ||
currentPath.indexOf('/conversations/') !== -1,
},
{
icon: ({ currentPath }) => {
if (currentPath === '/contacts') {
return <ContactNavIcon />;
} else if (currentPath === '/settings') {
return <SettingsNavIcon />;
}
return <MoreMenuIcon />;
},
activeIcon: MoreMenuHoverIcon,
label: 'More Menu',
virtualPath: '!moreMenu',
isActive: (currentPath, currentVirtualPath) =>
currentVirtualPath === '!moreMenu',
childTabs: [
{
icon: ContactIcon,
activeIcon: ContactHoverIcon,
label: 'Contacts',
path: '/contacts',
},
{
icon: SettingsIcon,
activeIcon: SettingsHoverIcon,
label: 'Settings',
path: '/settings',
isActive: (currentPath) => currentPath.substr(0, 9) === '/settings',
},
],
},
];
/**
* A example of `TabNavigationView`
*/
class TabNavigationViewDemo extends Component {
constructor(props) {
super(props);
this.state = {
currentPath: '/dialer',
currentVirtualPath: '',
};
this.goTo = (path, virtualPath) => {
this.setState({
currentPath: path || '',
currentVirtualPath: virtualPath || '',
});
};
}
render() {
return (
<div
style={{
position: 'relative',
height: '500px',
width: '300px',
border: '1px solid #f3f3f3',
}}
>
<TabNavigationView
currentPath={this.state.currentPath}
currentVirtualPath={this.state.currentVirtualPath}
tabs={tabs}
goTo={this.goTo}
/>
</div>
);
}
}
export default TabNavigationViewDemo;
|
app/javascript/mastodon/features/ui/components/column_header.js | increments/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class ColumnHeader extends React.PureComponent {
static propTypes = {
icon: PropTypes.string,
type: PropTypes.string,
active: PropTypes.bool,
onClick: PropTypes.func,
columnHeaderId: PropTypes.string,
};
handleClick = () => {
this.props.onClick();
}
render () {
const { icon, type, active, columnHeaderId } = this.props;
let iconElement = '';
if (icon) {
iconElement = <i className={`fa fa-fw fa-${icon} column-header__icon`} />;
}
return (
<h1 className={classNames('column-header', { active })} id={columnHeaderId || null}>
<button onClick={this.handleClick}>
{iconElement}
{type}
</button>
</h1>
);
}
}
|
src/static/index.js | CRUDNS/CRUDNS | import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import Root from './containers/Root/Root';
import configureStore from './store/configureStore';
import { authLoginUserSuccess } from './actions/auth';
const initialState = {};
const target = document.getElementById('root');
const store = configureStore(initialState, browserHistory);
const history = syncHistoryWithStore(browserHistory, store);
const node = (
<Root store={store} history={history}/>
);
const token = sessionStorage.getItem('token');
let user = {};
try {
user = JSON.parse(sessionStorage.getItem('user'));
} catch (e) {
// Failed to parse
}
if (token !== null) {
store.dispatch(authLoginUserSuccess(token, user));
}
ReactDOM.render(node, target);
|
src/Card.js | HJBowers/drunk-grenadier-120-Set-Game | import React, { Component } from 'react';
import './Card.css';
export default class Card extends Component {
constructor(props) {
super(props)
this.clickHandler = this.clickHandler.bind(this)
}
clickHandler() {
this.props.selectedCard(this.props)
}
render() {
return (
<div className='card' onClick={this.clickHandler}>
<img className='img' src={this.props.image} alt='null' />
</div>
)
}
}
|
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/Tests/setupTests.js | jaadds/carbon-apimgt | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import Enzyme, { shallow, render, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import renderer from 'react-test-renderer';
// React 16 Enzyme adapter
Enzyme.configure({ adapter: new Adapter() });
// Make Enzyme functions available in all test files without importing
global.React = React;
global.shallow = shallow;
global.render = render;
global.mount = mount;
global.renderer = renderer;
if (global.document) {
// To resolve createRange not defined issue https://github.com/airbnb/enzyme/issues/1626#issuecomment-398588616
document.createRange = () => ({
setStart: () => {},
setEnd: () => {},
commonAncestorContainer: {
nodeName: 'BODY',
ownerDocument: document,
},
});
}
|
src/browser/app/Header.js | chad099/react-native-boilerplate | // @flow
import type { State, User } from '../../common/types';
import React from 'react';
import linksMessages from '../../common/app/linksMessages';
import { Box } from '../../common/components';
import { FormattedMessage } from 'react-intl';
import { Link } from '../components';
import { compose } from 'ramda';
import { connect } from 'react-redux';
const HeaderLink = ({ to, message, ...props }) => (
<FormattedMessage {...message}>
{message => (
<Link
backgroundColor="primary"
bold
color="white"
paddingHorizontal={0.5}
paddingVertical={0.5}
to={to}
{...props}
>
{message}
</Link>
)}
</FormattedMessage>
);
type HeaderProps = {
viewer: ?User,
};
const Header = ({ viewer }: HeaderProps) => (
<Box
backgroundColor="primary"
flexWrap="wrap"
flexDirection="row"
marginVertical={0.5}
paddingHorizontal={0.5}
>
<HeaderLink exact to="/" message={linksMessages.home} />
<HeaderLink to="/users" message={linksMessages.users} />
<HeaderLink to="/todos" message={linksMessages.todos} />
<HeaderLink to="/fields" message={linksMessages.fields} />
<HeaderLink to="/intl" message={linksMessages.intl} />
<HeaderLink to="/offline" message={linksMessages.offline} />
<HeaderLink to="/me" message={linksMessages.me} />
{!viewer && <HeaderLink to="/signin" message={linksMessages.signIn} />}
</Box>
);
export default compose(
connect((state: State) => ({ viewer: state.users.viewer })),
)(Header);
|
src/routes.js | andbet39/reactPress | import React from 'react';
import {IndexRoute, Route} from 'react-router';
import { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth';
import {
App,
Blog,
Chat,
Home,
Widgets,
About,
Login,
LoginSuccess,
Survey,
NotFound,
Posts,
Post,
} from 'containers';
export default (store) => {
const requireLogin = (nextState, replace, cb) => {
function checkAuth() {
const { auth: { user }} = store.getState();
if (!user) {
// oops, not logged in, so can't be here!
replace('/');
}
cb();
}
if (!isAuthLoaded(store.getState())) {
store.dispatch(loadAuth()).then(checkAuth);
} else {
checkAuth();
}
};
/**
* Please keep routes in alphabetical order
*/
return (
<Route path="/" component={Blog}>
{ /* Home (main) route */ }
<IndexRoute component={Posts}/>
{ /* Routes requiring login */ }
<Route onEnter={requireLogin}>
<Route path="chat" component={Chat}/>
<Route path="loginSuccess" component={LoginSuccess}/>
</Route>
{ /* Routes */ }
<Route path="login" component={Login}/>
<Route path="survey" component={Survey}/>
<Route path="posts" component={Posts}/>
<Route path="posts/:page" component={Posts}/>
<Route path="/:slug" component={Post}/>
{ /* Catch all route */ }
<Route path="*" component={NotFound} status={404} />
</Route>
);
};
|
source/shared/components/message/index.js | gacosta89/knightsTour | import React from 'react';
const spanStyle = {
padding: 5
},
messageStyle = {
border: '3px solid',
fontSize: 35,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 4,
margin: 5,
cursor: 'default'
},
successStyle = {
...messageStyle,
color: 'blue',
borderColor: 'blue'
},
errorStyle = {
...messageStyle,
color: 'red',
borderColor: 'red'
},
infoStyle = {
...messageStyle,
color: 'white',
borderColor: 'white'
},
infoDarkStyle = {
...messageStyle,
color: 'rgb(51, 51, 51)',
borderColor: 'rgb(51, 51, 51)'
},
hiddenStyle = {
display: 'none'
},
mapType = {
info: infoStyle,
infoDark: infoDarkStyle,
error: errorStyle,
success: successStyle,
hidden: hiddenStyle
};
export default () => ({type, children}) =>
<div style={mapType[type]}>
<span style={spanStyle}>
{children}
</span>
</div>;
|
dva/porsche-e3/src/routes/GuidePage.js | imuntil/React | import React from 'react'
// import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Carousel } from 'antd-mobile'
import TopBanner from '../components/TopBanner'
import BottomBar from '../components/BottomBar'
import './GuidePage.scss'
const GuidePage = () => {
console.log('guide:')
return (
<div className="container guide-page">
<div className="main-body">
<TopBanner title={'指南'} type={true}>
<img src={require('../assets/test-banner.jpg')} alt="" width="100%" />
</TopBanner>
<div className="carousel-box">
<Carousel dotActiveStyle={{ backgroundColor: '#ff0000' }} infinite>
<div className="slider">
<img src={require('../assets/guide-1.jpg')} alt="" width="100%"/>
</div>
<div className="slider">
<img src={require('../assets/guide-2.jpg')} alt="" width="100%"/>
</div>
<div className="slider">
<img src={require('../assets/guide-3.jpg')} alt="" width="100%"/>
</div>
<div className="slider">
<img src={require('../assets/guide-4.jpg')} alt="" width="100%"/>
</div>
<div className="slider">
<img src={require('../assets/guide-5.jpg')} alt="" width="100%"/>
</div>
<div className="slider">
<img src={require('../assets/guide-6.jpg')} alt="" width="100%"/>
</div>
</Carousel>
</div>
</div>
<BottomBar mode={2} />
</div>
)
}
export default connect()(GuidePage)
|
client/src/app/admin/panel/staff/admin-panel-departments.js | ivandiazwm/opensupports | import React from 'react';
import _ from 'lodash';
import {connect} from 'react-redux';
import i18n from 'lib-app/i18n';
import API from 'lib-app/api-call';
import ConfigActions from 'actions/config-actions';
import AreYouSure from 'app-components/are-you-sure';
import DepartmentDropDown from 'app-components/department-dropdown';
import InfoTooltip from 'core-components/info-tooltip';
import Button from 'core-components/button';
import Header from 'core-components/header';
import Listing from 'core-components/listing';
import Form from 'core-components/form';
import FormField from 'core-components/form-field';
import SubmitButton from 'core-components/submit-button';
import DropDown from 'core-components/drop-down';
import Icon from 'core-components/icon';
import Message from 'core-components/message';
class AdminPanelDepartments extends React.Component {
static defaultProps = {
items: []
};
state = {
formLoading: false,
selectedIndex: -1,
selectedDropDownIndex: 0,
edited: false,
errorMessage: null,
errors: {},
form: {
title: '',
language: 'en',
private: 0,
}
};
render() {
return (
<div className="admin-panel-departments">
<Header title={i18n('DEPARTMENTS')} description={i18n('DEPARTMENTS_DESCRIPTION')} />
<div className="row">
<div className="col-md-4">
<Listing {...this.getListingProps()}/>
</div>
<div className="col-md-8">
{(this.state.errorMessage) ? <Message type="error">{i18n(this.state.errorMessage)}</Message> : null}
<Form {...this.getFormProps()}>
<div>
<FormField className="admin-panel-departments__name" label={i18n('NAME')} name="name" validation="NAME" required fieldProps={{size: 'large'}}/>
<div className="admin-panel-departments__private-option">
<FormField label={i18n('PRIVATE')} name="private" field="checkbox"/>
<InfoTooltip className="admin-panel-departments__info-tooltip" text={i18n('PRIVATE_DEPARTMENT_DESCRIPTION')} />
</div>
</div>
<SubmitButton size="medium" className="admin-panel-departments__update-name-button" type="secondary">
{i18n((this.state.selectedIndex !== -1) ? 'UPDATE_DEPARTMENT' : 'ADD_DEPARTMENT')}
</SubmitButton>
</Form>
{(this.state.selectedIndex !== -1 && this.props.departments.length) ? this.renderOptionalButtons() : null}
</div>
</div>
</div>
);
}
renderOptionalButtons() {
return (
<div className="admin-panel-departments__optional-buttons">
<div className="admin-panel-departments__discard-button">
<Button onClick={this.onDiscardChangesClick.bind(this)} size="medium">{i18n('DISCARD_CHANGES')}</Button>
</div>
{this.props.departments.length > 1 ? this.renderDeleteButton() : null}
</div>
);
}
renderDeleteButton() {
return (
<div className="admin-panel-departments__delete-button">
<Button onClick={this.onDeleteClick.bind(this)} size="medium">{i18n('DELETE')}</Button>
</div>
);
}
renderDelete() {
return (
<div>
{i18n('WILL_DELETE_DEPARTMENT')}
<div className="admin-panel-departments__transfer-tickets">
<span className="admin-panel-departments__transfer-tickets-title">{i18n('TRANSFER_TICKETS_TO')}</span>
<DepartmentDropDown className="admin-panel-departments__transfer-tickets-drop-down" departments={this.getDropDownDepartments()} onChange={(event) => this.setState({selectedDropDownIndex: event.index})} size="medium"/>
</div>
</div>
);
}
getListingProps() {
return {
className: 'admin-panel-departments__list',
title: i18n('DEPARTMENTS'),
items: this.props.departments.map(department => {
return {
content: (
<span>
{department.name}
{department.private*1 ? <Icon className="admin-panel-departments__private-icon" name='user-secret'/> : null }
{(!department.owners) ? (
<span className="admin-panel-departments__warning">
<InfoTooltip type="warning" text={i18n('NO_STAFF_ASSIGNED')}/>
</span>
) : null}
</span>
)
};
}),
selectedIndex: this.state.selectedIndex,
enableAddNew: true,
onChange: this.onItemChange.bind(this),
onAddClick: this.onItemChange.bind(this, -1)
};
}
getFormProps() {
return {
values: this.state.form,
errors: this.state.errors,
loading: this.state.formLoading,
onChange: (form) => {this.setState({form, edited: true})},
onValidateErrors: (errors) => {this.setState({errors})},
onSubmit: this.onFormSubmit.bind(this)
};
}
onItemChange(index) {
if(this.state.edited) {
AreYouSure.openModal(i18n('WILL_LOSE_CHANGES'), this.updateForm.bind(this, index));
} else {
this.updateForm(index);
}
}
onFormSubmit(form) {
this.setState({formLoading: true, edited: false});
if(this.state.selectedIndex !== -1) {
API.call({
path: '/system/edit-department',
data: {
departmentId: this.getCurrentDepartment().id,
name: form.name,
private: form.private ? 1 : 0
}
}).then(() => {
this.setState({formLoading: false});
this.retrieveDepartments();
}).catch(result => this.setState({formLoading: false, errorMessage: result.message}));
} else {
API.call({
path: '/system/add-department',
data: {
name: form.name,
private: form.private ? 1 : 0
}
}).then(() => {
this.retrieveDepartments();
this.onItemChange(-1);
}).catch(this.onItemChange.bind(this, -1));
}
}
onDiscardChangesClick() {
this.onItemChange(this.state.selectedIndex);
}
onDeleteClick() {
this.setState({
selectedDropDownIndex: 0
});
AreYouSure.openModal(this.renderDelete(), this.deleteDepartment.bind(this));
}
deleteDepartment() {
API.call({
path: '/system/delete-department',
data: {
departmentId: this.getCurrentDepartment().id,
transferDepartmentId: this.getDropDownItemId()
}
}).then(() => {
this.retrieveDepartments();
this.onItemChange(-1);
})
.catch(result => this.setState({errorMessage: result.message}));
}
updateForm(index) {
let form = _.clone(this.state.form);
let department = this.getCurrentDepartment(index);
form.name = (department && department.name) || '';
form.private = (department && department.private) || 0;
this.setState({
selectedIndex: index,
edited: false,
formLoading: false,
form,
errorMessage: null,
errors: {}
});
}
retrieveDepartments() {
this.props.dispatch(ConfigActions.updateData());
this.setState({
edited: false
});
}
getCurrentDepartment(index) {
return this.props.departments[(index == undefined) ? this.state.selectedIndex : index];
}
getDropDownItemId() {
return this.props.departments.filter((department, index) => index !== this.state.selectedIndex)[this.state.selectedDropDownIndex].id;
}
getDropDownDepartments() {
return this.props.departments.filter((department, index) => index !== this.state.selectedIndex);
}
}
export default connect((store) => {
return {
departments: store.config.departments
};
})(AdminPanelDepartments);
|
src/components/tweet/tweet_media.js | camboio/ibis | import React from 'react';
export default class TweetMedia extends React.Component {
renderMedia(){
const media = this.props.media.map((medium) =>{
// you should probably put a switch statement here when you need to handle other media types
// just sayin'
if(medium.type === 'photo') {
return (
<div key={medium.id_str} className="tweet-media-object">
<a href={medium.expanded_url} target="_blank">
<img src={medium.media_url} />
</a>
</div>
);
}
return <div className="tweet-media-object" style="color: red;"><strong>{medium.type}</strong></div>;
});
return media;
}
render(){
// this.props.media[]
return (
<div className="tweet-media">
{this.renderMedia()}
</div>
);
}
}
|
app/containers/App.js | bird-system/bs-label-convertor | // @flow
import React, { Component } from 'react';
export default class App extends Component {
props: {
children: HTMLElement
};
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
|
src/views/icons/ShieldCrossedIcon.js | physiii/open-automation | import React from 'react';
import IconBase from './IconBase.js';
export const ShieldCrossedIcon = (props) => (
<IconBase {...props} viewBox="0 0 20 20">
<path d="M1.9 1.3c.2-.2.5-.2.7 0l15.5 15.5c.2.2.2.5 0 .7-.2.2-.5.2-.7 0L1.8 1.9c-.3-.2.1-.6.1-.6zM14.7 17.3c-1.1 1-2.6 1.8-4.5 2.7h-.4c-8.3-3.5-8.1-8.2-7.7-15.2v-.1l.9.9v.1c-.3 6-.1 10.2 7 13.3 1.7-.7 3-1.5 4-2.4l.7.7zm1.8-4.5c.8-2.6.6-5.6.4-9.2-2.5-.1-4.8-1-6.8-2.4-1.2.7-2.3 1.3-3.5 1.7l-.8-.8C7.2 1.7 8.5 1 9.7.1c.2-.1.4-.1.6 0 2.1 1.5 4.4 2.4 7 2.4.3 0 .5.2.5.5.2 4.2.6 7.7-.5 10.6l-.8-.8z" />
</IconBase>
);
export default ShieldCrossedIcon;
|
app/ui/src/components/NavbarCharacterInfo.js | pequalsnp/eve-isk-tracker | import React from 'react';
import { connect } from 'react-redux';
import {
gql,
graphql,
} from 'react-apollo';
import { withRouter } from 'react-router';
import { NavDropdown, Nav, MenuItem, NavItem } from 'react-bootstrap';
import Logout from './Logout';
const profileQuery = gql`
query ProfileQuery {
profile {
mainCharacter {
id
name
portraitURLs
}
additionalCharacters {
id
name
portraitURLs
}
}
}
`;
const NavbarCharacterInfoLoggedIn = ({data: {loading, error, profile}}) => {
if (loading) {
return <p>Loading ...</p>;
}
if (error) {
return <Logout />;
}
return (
<Nav pullRight>
<NavDropdown title={profile.mainCharacter.name} id="character-nav">
<MenuItem href="/logout">Logout</MenuItem>
</NavDropdown>
</Nav>
);
}
const NavbarCharacterInfoLoggedInWithData = graphql(profileQuery)(NavbarCharacterInfoLoggedIn)
const NavbarCharacterInfoLoggedOut = () => {
return (
<Nav pullRight>
<NavItem href="/login">Login</NavItem>
</Nav>
);
}
const mapStateToProps = state => {
return {
isLoggedIn: state.app.loggedIn
}
}
const NavbarCharacterInfo = ({isLoggedIn}) => {
console.log("isLoggedIn " + JSON.stringify(isLoggedIn));
return isLoggedIn ? <NavbarCharacterInfoLoggedInWithData /> : <NavbarCharacterInfoLoggedOut />
}
export default withRouter(connect(mapStateToProps, null)(NavbarCharacterInfo));
|
layouts/Archive.js | ShashwatMittal/react-wordpress-theme | import React from 'react';
import {connect} from 'react-redux';
import PostList from '../components/PostList';
import {bindActionCreators} from 'redux';
import * as Actions from '../actions/actions';
import Header from '../components/Header';
import Sidebar from '../components/Sidebar';
import Footer from '../components/Footer';
import Pagination from '../components/componentParts/Pagination';
class Archive extends React.Component{
constructor(props){
super(props)
const {params} = props.match
const {fetchPosts} = props.actions
fetchPosts(params.page)
}
componentWillReceiveProps(nextProps){
if(this.props.match.params.page !== nextProps.match.params.page){
const {fetchPosts} = nextProps.actions
const {page} = nextProps.match.params
fetchPosts(page)
}
}
render(){
const {receivePosts} = this.props;
const {path, url} = this.props.match;
const {currentPage, noOfPages, isLoading} = receivePosts;
return(
<div>
{isLoading ? <h2>Fetching...</h2> : <PostList {...receivePosts}/> }
{isLoading ? null : <Pagination currentPage={currentPage} noOfPages={noOfPages} path={path} url={url}/>}
</div>
);
}
}
function mapStateToProps(state){
const {receivePosts} = state;
return {
receivePosts
}
}
function mapDispatchToProps(dispatch){
return{
actions: bindActionCreators(Actions, dispatch)
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(Archive);
|
app/components/IssueIcon/index.js | mamaracas/MEventsRegistration | import React from 'react';
function IssueIcon(props) {
return (
<svg
height="1em"
width="0.875em"
className={props.className}
>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v5h2V4z m0 6H6v2h2V10z" />
</svg>
);
}
IssueIcon.propTypes = {
className: React.PropTypes.string,
};
export default IssueIcon;
|
src/snowflake.js | bartonhammond/snowflake | 'use strict'
/**
* # snowflake
* Snowflake 
*/
/**
* ## imports
*
*/
/**
* ### React
*
* Necessary components from ReactNative
*/
import React from 'react'
import {
AppRegistry,
StyleSheet,
View,
Text } from 'react-native'
/**
* ### Router-Flux
*
* Necessary components from Router-Flux
*/
import {
Router,
Scene} from 'react-native-router-flux'
/**
* ### Redux
*
* ```Provider``` will tie the React-Native to the Redux store
*/
import {
Provider} from 'react-redux'
/**
* ### configureStore
*
* ```configureStore``` will connect the ```reducers```, the
*
*/
import configureStore from './lib/configureStore'
/**
* ### Translations
*/
var I18n = require('react-native-i18n')
// Support fallbacks so en-US & en-BR both use en
I18n.fallbacks = true
import Translations from './lib/Translations'
I18n.translations = Translations
/**
* ### containers
*
* All the top level containers
*
*/
import App from './containers/App'
import Login from './containers/Login'
import Logout from './containers/Logout'
import Register from './containers/Register'
import ForgotPassword from './containers/ForgotPassword'
import Profile from './containers/Profile'
import Main from './containers/Main'
import Subview from './containers/Subview'
/**
* ### icons
*
* Add icon support for use in Tabbar
*
*/
import Icon from 'react-native-vector-icons/FontAwesome'
/**
* ## Actions
* The necessary actions for dispatching our bootstrap values
*/
import {setPlatform, setVersion} from './reducers/device/deviceActions'
import {setStore} from './reducers/global/globalActions'
/**
* ## States
* Snowflake explicitly defines initial state
*
*/
import AuthInitialState from './reducers/auth/authInitialState'
import DeviceInitialState from './reducers/device/deviceInitialState'
import GlobalInitialState from './reducers/global/globalInitialState'
import ProfileInitialState from './reducers/profile/profileInitialState'
/**
* The version of the app but not displayed yet
*/
import pack from '../package'
var VERSION = pack.version
/**
*
* ## Initial state
* Create instances for the keys of each structure in snowflake
* @returns {Object} object with 4 keys
*/
function getInitialState () {
const _initState = {
auth: new AuthInitialState(),
device: (new DeviceInitialState()).set('isMobile', true),
global: (new GlobalInitialState()),
profile: new ProfileInitialState()
}
return _initState
}
const styles = StyleSheet.create({
tabBar: {
height: 70
}
})
/**
* ## TabIcon
*
* Displays the icon for the tab w/ color dependent upon selection
*/
class TabIcon extends React.Component {
render () {
var color = this.props.selected ? '#FF3366' : '#FFB3B3'
return (
<View style={{flex: 1, flexDirection: 'column', alignItems: 'center', alignSelf: 'center'}}>
<Icon style={{color: color}} name={this.props.iconName} size={30} />
<Text style={{color: color}}>{this.props.title}</Text>
</View>
)
}
}
/**
* ## Native
*
* ```configureStore``` with the ```initialState``` and set the
* ```platform``` and ```version``` into the store by ```dispatch```.
* *Note* the ```store``` itself is set into the ```store```. This
* will be used when doing hot loading
*/
export default function native (platform) {
let Snowflake = React.createClass({
render () {
const store = configureStore(getInitialState())
// configureStore will combine reducers from snowflake and main application
// it will then create the store based on aggregate state from all reducers
store.dispatch(setPlatform(platform))
store.dispatch(setVersion(VERSION))
store.dispatch(setStore(store))
// setup the router table with App selected as the initial component
// note: See https://github.com/aksonov/react-native-router-flux/issues/948
return (
<Provider store={store}>
<Router sceneStyle={{ backgroundColor: 'white' }}>
<Scene key='root' hideNavBar>
<Scene key='App'
component={App}
type='replace'
initial />
<Scene key='InitialLoginForm'
component={Register}
type='replace' />
<Scene key='Login'
component={Login}
type='replace' />
<Scene key='Register'
component={Register}
type='replace' />
<Scene key='ForgotPassword'
component={ForgotPassword}
type='replace' />
<Scene key='Subview'
component={Subview} />
<Scene key='Tabbar'
tabs
hideNavBar
tabBarStyle={styles.tabBar}
default='Main'>
<Scene key='Logout'
title={I18n.t('Snowflake.logout')}
icon={TabIcon}
iconName={'sign-out'}
hideNavBar
component={Logout} />
<Scene key='Main'
title={I18n.t('Snowflake.main')}
iconName={'home'}
icon={TabIcon}
hideNavBar
component={Main}
initial />
<Scene key='Profile'
title={I18n.t('Snowflake.profile')}
icon={TabIcon}
iconName={'gear'}
hideNavBar
component={Profile} />
</Scene>
</Scene>
</Router>
</Provider>
)
}
})
/**
* registerComponent to the AppRegistery and off we go....
*/
AppRegistry.registerComponent('snowflake', () => Snowflake)
}
|
packages/react-app/server/index.js | threepointone/glam | // @flow
import React from 'react';
const express = require('express');
import { renderToNodeStream } from 'react-dom/server';
import App from '../src/App';
const app = express();
app.get('/', (req, res) => {
// res.send('hello world');
//open tags
res.write(`<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<title>streaming css example</title>
<style>
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
</style>
</head>
<body>
<div id='root'>`);
const stream = renderToNodeStream(<App />);
stream.pipe(res, { end: false });
stream.on('end', () => {
res.write(
'</div><script src="/static/js/main.a0924634.js"></script></body></html>',
);
res.end();
});
});
app.use(express.static('./build'));
app.listen(3000, function() {
console.log('Example app listening on port 3000!');
});
|
stargazer/assets/js/index.js | martynvandijke/Stargazer | //import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';
import Split from './SplitApp';
ReactDOM.render(
<Split />,
document.getElementById('react-app')
);
/**
* Render the app to dom node
*
*
*/
|
src/encoded/static/components/cart/remove_multiple.js | ENCODE-DCC/encoded | /**
* Displays a button to remove a specific set of datasets from the cart.
*/
// node_modules
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
// libs/ui
import { Modal, ModalHeader, ModalBody, ModalFooter } from '../../libs/ui/modal';
// components
import { hasType } from '../globals';
// local
import { removeMultipleFromCartAndSave } from './actions';
import { DEFAULT_FILE_VIEW_NAME, getReadOnlyState } from './util';
/**
* Display the modal dialog to confirm a user wants to remove the selected datasets from their
* cart, and initiate that action if they do.
*/
const CartRemoveElementsModalComponent = ({ elements, closeClickHandler, removeMultipleItems, loggedIn, inProgress }) => {
/**
* Called when a user clicks the modal button to confirm removing the selected elements from the
* cart.
*/
const handleConfirmRemoveClick = () => {
if (loggedIn && elements.length > 0) {
removeMultipleItems(elements);
closeClickHandler();
}
};
return (
<Modal labelId="label-remove-selected" descriptionId="description-remove-selected" focusId="close-remove-items">
<ModalHeader labelId="label-remove-selected" title="Remove selected datasets from cart" closeModal={closeClickHandler} />
<ModalBody>
<p id="description-remove-selected">
Remove the {elements.length === 1 ? 'currently selected dataset' : `${elements.length} currently selected datasets`} from
the cart. Series datasets remain in the cart and can only be removed as a part
of a series. This action is not reversible.
</p>
</ModalBody>
<ModalFooter
closeModal={<button type="button" id="close-remove-items" onClick={closeClickHandler} className="btn btn-default">Cancel</button>}
submitBtn={<button type="button" onClick={handleConfirmRemoveClick} disabled={inProgress} className="btn btn-danger" id="submit-remote-selected">Remove selected</button>}
dontClose
/>
</Modal>
);
};
CartRemoveElementsModalComponent.propTypes = {
/** Items in the current cart */
elements: PropTypes.array.isRequired,
/** Function to call to close the Clear Cart modal */
closeClickHandler: PropTypes.func.isRequired,
/** True if user has logged in */
loggedIn: PropTypes.bool.isRequired,
/** True if cart operation in progress */
inProgress: PropTypes.bool.isRequired,
/** Function to call to clear the selected datasets from the Redux store */
removeMultipleItems: PropTypes.func.isRequired,
};
CartRemoveElementsModalComponent.mapStateToProps = (state, ownProps) => ({
elements: ownProps.elements,
closeClickHandler: ownProps.closeClickHandler,
loggedIn: ownProps.loggedIn,
inProgress: state.inProgress,
});
CartRemoveElementsModalComponent.mapDispatchToProps = (dispatch, ownProps) => ({
removeMultipleItems: (elements) => dispatch(removeMultipleFromCartAndSave(elements, ownProps.fileViewTitle, ownProps.fetch)),
});
const CartRemoveElementsModalInternal = connect(CartRemoveElementsModalComponent.mapStateToProps, CartRemoveElementsModalComponent.mapDispatchToProps)(CartRemoveElementsModalComponent);
export const CartRemoveElementsModal = ({ elements, closeClickHandler }, reactContext) => (
<CartRemoveElementsModalInternal
elements={elements}
closeClickHandler={closeClickHandler}
fileViewTitle={DEFAULT_FILE_VIEW_NAME}
loggedIn={!!(reactContext.session && reactContext.session['auth.userid'])}
fetch={reactContext.fetch}
/>
);
CartRemoveElementsModal.propTypes = {
/** Currently selected datasets to remove from cart as array of @ids */
elements: PropTypes.array.isRequired,
/** Function to call to close the Cart Clear modal */
closeClickHandler: PropTypes.func.isRequired,
};
CartRemoveElementsModal.contextTypes = {
fetch: PropTypes.func,
session: PropTypes.object,
};
/**
* Renders a button to remove all the given datasets from the current cart.
*/
const CartRemoveElementsComponent = ({
elements,
loading,
savedCartObj,
inProgress,
}) => {
/** True if the alert modal is visible */
const [isModalVisible, setIsModalVisible] = React.useState(false);
const readOnlyState = getReadOnlyState(savedCartObj);
// Filter the given elements so we only remove non-series datasets not themselves within a
// series.
const nonSeriesDatasets = elements.filter((element) => (
!element._relatedSeries && !hasType(element, 'Series')
));
/**
* Handle a click in the actuator button to open the alert modal.
*/
const handleOpenClick = () => {
setIsModalVisible(true);
};
/**
* Handle a click for closing the modal without doing anything.
*/
const handleCloseClick = () => {
setIsModalVisible(false);
};
return (
<div className="remove-multiple-control">
<button
type="button"
disabled={nonSeriesDatasets.length === 0 || loading || inProgress || readOnlyState.any}
className="btn btn-info btn-sm"
onClick={handleOpenClick}
>
Remove selected items from cart
</button>
<div className="remove-multiple-control__note">
Any datasets belonging to a series remain after removing the selected items from the cart.
</div>
{isModalVisible && <CartRemoveElementsModal elements={nonSeriesDatasets} closeClickHandler={handleCloseClick} />}
</div>
);
};
CartRemoveElementsComponent.propTypes = {
/** Currently selected datasets to remove from cart as array of @ids */
elements: PropTypes.array.isRequired,
/** True if cart currently loading on the page */
loading: PropTypes.bool.isRequired,
/** Current cart saved object */
savedCartObj: PropTypes.object,
/** True if cart updating operation is in progress */
inProgress: PropTypes.bool.isRequired,
};
CartRemoveElementsComponent.defaultProps = {
savedCartObj: null,
};
CartRemoveElementsComponent.mapStateToProps = (state, ownProps) => ({
elements: ownProps.elements,
loading: ownProps.loading,
savedCartObj: state.savedCartObj,
inProgress: state.inProgress,
});
const CartRemoveElementsInternal = connect(CartRemoveElementsComponent.mapStateToProps)(CartRemoveElementsComponent);
// Public component used to bind to context properties.
const CartRemoveElements = ({ elements, loading }, reactContext) => (
<CartRemoveElementsInternal elements={elements} loading={loading} fetch={reactContext.fetch} />
);
CartRemoveElements.propTypes = {
/** Elements to remove from the cart as array of @ids */
elements: PropTypes.array,
/** True if cart currently loading on the page */
loading: PropTypes.bool,
};
CartRemoveElements.defaultProps = {
elements: [],
loading: false,
};
CartRemoveElements.contextTypes = {
fetch: PropTypes.func,
};
export default CartRemoveElements;
|
src/routes/register/index.js | nicolascine/site | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../components/Layout';
import Register from './Register';
const title = 'New User Registration';
export default {
path: '/register',
action() {
return {
title,
component: <Layout><Register title={title} /></Layout>,
};
},
};
|
src/interface/icons/GitHubMarkSmall.js | fyruna/WoWAnalyzer | import React from 'react';
// From the GitHub branding website.
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1000" className="icon" {...other}>
<path d="M512 0C229.25 0 0 229.25 0 512c0 226.25 146.688 418.125 350.156 485.812 25.594 4.688 34.938-11.125 34.938-24.625 0-12.188-0.469-52.562-0.719-95.312C242 908.812 211.906 817.5 211.906 817.5c-23.312-59.125-56.844-74.875-56.844-74.875-46.531-31.75 3.53-31.125 3.53-31.125 51.406 3.562 78.47 52.75 78.47 52.75 45.688 78.25 119.875 55.625 149 42.5 4.654-33 17.904-55.625 32.5-68.375C304.906 725.438 185.344 681.5 185.344 485.312c0-55.938 19.969-101.562 52.656-137.406-5.219-13-22.844-65.094 5.062-135.562 0 0 42.938-13.75 140.812 52.5 40.812-11.406 84.594-17.031 128.125-17.219 43.5 0.188 87.312 5.875 128.188 17.281 97.688-66.312 140.688-52.5 140.688-52.5 28 70.531 10.375 122.562 5.125 135.5 32.812 35.844 52.625 81.469 52.625 137.406 0 196.688-119.75 240-233.812 252.688 18.438 15.875 34.75 47 34.75 94.75 0 68.438-0.688 123.625-0.688 140.5 0 13.625 9.312 29.562 35.25 24.562C877.438 930 1024 738.125 1024 512 1024 229.25 794.75 0 512 0z" />
</svg>
);
export default Icon;
|
src/shared/components/Footer.js | Grace951/ReactAU | import { contactData} from '../Data/ContactData';
import { PureList} from "./Shared/Shared";
import React from 'react';
const FooterContactDetail = (props) => (
<li className="">
<i className={props.iconClass} /> | {
(props.link)?( <a href={props.link}> <PureList data={props.content}/> </a>)
:( <PureList data={props.content}/>)
}
</li>
);
FooterContactDetail.propTypes = {
link: React.PropTypes.string,
content: React.PropTypes.array.isRequired,
iconClass: React.PropTypes.string,
title: React.PropTypes.string
};
const Footer = (props) => (
<div id="footer">
<div className="copyright">
COPYRIGHT (C) 2017 HI-TECH DIGITAL CCTV PTY., LTD. ALL RIGHTS RESERVED.
</div>
<div className="info">
<ul>
{ contactData.map((item ,id) => ( item.iconClass) && ( <FooterContactDetail key={id} {...item}/> ) ) }
<li><i className="fa fa-home" aria-hidden="true"></i> | {contactData.map((item ,id) => (item.title === "Address") && <PureList key={id} data={item.content}/> )}</li>
</ul>
</div>
</div>);
export default Footer;
|
src/svg-icons/action/settings-bluetooth.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsBluetooth = (props) => (
<SvgIcon {...props}>
<path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"/>
</SvgIcon>
);
ActionSettingsBluetooth = pure(ActionSettingsBluetooth);
ActionSettingsBluetooth.displayName = 'ActionSettingsBluetooth';
ActionSettingsBluetooth.muiName = 'SvgIcon';
export default ActionSettingsBluetooth;
|
lib/FilterPaneSearch/FilterPaneSearch.js | folio-org/stripes-components | import React from 'react';
import PropTypes from 'prop-types';
import css from './FilterPaneSearch.css';
import Icon from '../Icon';
import FocusLink from '../FocusLink';
import IconButton from '../IconButton';
const propTypes = {
clearSearchId: PropTypes.string,
onChange: PropTypes.func,
onChangeIndex: PropTypes.func,
onClear: PropTypes.func,
placeholder: PropTypes.string,
resultsList: PropTypes.oneOfType([
PropTypes.object,
PropTypes.node,
PropTypes.element,
]),
searchableIndexes: PropTypes.arrayOf(
PropTypes.object,
),
searchAriaLabel: PropTypes.string,
searchFieldId: PropTypes.string,
selectedIndex: PropTypes.string,
value: PropTypes.string,
};
const FilterPaneSearch = props => (
<div className={css.headerSearchContainer} role="search">
{!props.searchableIndexes ?
null : (
<div className={css.selectWrap}>
<select
className={css.headerSearchSelect}
id={`${props.searchFieldId}-index`}
aria-label="Search field select"
value={props.selectedIndex}
onChange={props.onChangeIndex}
data-test-search-field-selector
>
{props.searchableIndexes.map(si => (
<option key={`${si.value}-search-option`} value={si.value} disabled={si.disabled}>{si.label}</option>
))}
</select>
<div className={css.iconWrap}>
<Icon icon="triangle-down" />
</div>
</div>
)
}
<input
className={css.headerSearchInput}
type="text"
id={props.searchFieldId}
role="searchbox"
aria-label={props.searchAriaLabel}
value={props.value}
onChange={props.onChange}
placeholder={props.placeholder || 'Search'}
data-test-search-box
/>
<IconButton
className={css.headerSearchClearButton}
id={props.clearSearchId}
onClick={props.onClear}
data-test-clear-search
aria-label="Clear search field"
icon="times-circle-solid"
/>
{ props.resultsList &&
<FocusLink
target={props.resultsList}
aria-label="Skip to results"
style={{ alignSelf: 'stretch', paddingTop: '14px' }}
component="div"
showOnFocus
data-test-results-link
>
<Icon icon="chevron-double-right" />
</FocusLink>
}
</div>
);
FilterPaneSearch.propTypes = propTypes;
export default FilterPaneSearch;
|
src/browser/app/routeConfig.js | reedlaw/read-it | // @flow
import type { State } from '../../common/types';
import HttpError from 'found/lib/HttpError';
import React from 'react';
import queryFirebase from './queryFirebase';
import { makeRouteConfig, Route } from 'found/lib/jsx';
import { onUsersPresence } from '../../common/users/actions';
import { onLoadPosts, onLoadPost } from '../../common/posts/actions';
// Pages
import App from './App';
import HomePage from '../home/HomePage';
import MePage from '../me/MePage';
import ProfilePage from '../me/ProfilePage';
import SettingsPage from '../me/SettingsPage';
import SignInPage from '../auth/SignInPage';
import UsersPage from '../users/UsersPage';
import SubmitPage from '../submit/SubmitPage';
import PostPage from '../posts/PostPage';
// Custom route to require viewer aka authenticated user.
const AuthorizedRoute = () => {};
AuthorizedRoute.createRoute = props => ({
...props,
render: ({ Component, match, props }) => {
const state: State = match.context.store.getState();
if (!state.users.viewer) {
// No redirect, just 401 Unauthorized, so we don't have to handle pesky
// redirections manually. Check app/renderError.
throw new HttpError(401);
}
return <Component {...props} />;
},
});
const routeConfig = makeRouteConfig(
<Route path="/" Component={App}>
<Route
Component={HomePage}
getData={queryFirebase(
ref => [ref.child('posts'), 'value', onLoadPosts],
)}
/>
<Route
path="posts/:postId"
Component={PostPage} />
<AuthorizedRoute path="me" Component={MePage}>
<Route path="profile" Component={ProfilePage} />
<Route path="settings" Component={SettingsPage} />
</AuthorizedRoute>
<Route path="signin" Component={SignInPage} />
<AuthorizedRoute path="submit" Component={SubmitPage} />
<Route
path="users"
Component={UsersPage}
getData={queryFirebase(
ref => [ref.child('users-presence'), 'value', onUsersPresence],
// ref => [ref.child('what-ever').limitToFirst(1), 'value', onWhatEver],
)}
/>
</Route>,
);
export default routeConfig;
|
packages/icons/src/md/hardware/KeyboardArrowDown.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdKeyboardArrowDown(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="14.83 17 24 26.17 33.17 17 36 19.83 24 31.83 12 19.83" />
</IconBase>
);
}
export default MdKeyboardArrowDown;
|
client/src/app/components/ui/SmartNestable.js | zraees/sms-project | import React from 'react'
import {findDOMNode} from 'react-dom'
import 'script-loader!smartadmin-plugins/bower_components/jquery-nestable/jquery.nestable.js'
export default class SmartNestable extends React.Component {
componentDidMount() {
let element = $(findDOMNode(this))
let options = {};
if (this.props.group) {
options.group = this.props.group;
}
element.nestable(options);
if (this.props.onChange) {
element.on('change', function () {
this.props.onChange(element.nestable('serialize'))
}.bind(this));
this.props.onChange(element.nestable('serialize'))
}
}
render() {
return (
this.props.children
)
}
} |
src/svg-icons/action/speaker-notes-off.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSpeakerNotesOff = (props) => (
<SvgIcon {...props}>
<path d="M10.54 11l-.54-.54L7.54 8 6 6.46 2.38 2.84 1.27 1.73 0 3l2.01 2.01L2 22l4-4h9l5.73 5.73L22 22.46 17.54 18l-7-7zM8 14H6v-2h2v2zm-2-3V9l2 2H6zm14-9H4.08L10 7.92V6h8v2h-7.92l1 1H18v2h-4.92l6.99 6.99C21.14 17.95 22 17.08 22 16V4c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionSpeakerNotesOff = pure(ActionSpeakerNotesOff);
ActionSpeakerNotesOff.displayName = 'ActionSpeakerNotesOff';
ActionSpeakerNotesOff.muiName = 'SvgIcon';
export default ActionSpeakerNotesOff;
|
src/components/todo/index.js | rldona/taskfire | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import * as firebase from 'firebase';
import * as todoListService from '../../todolist.service';
import Checkbox from '../checkbox';
export default class Todo extends Component {
constructor(props, context) {
super(props);
}
componentWillMount() {
this.state = {
completed: this.props.todo.completed,
}
}
changeTodoState(checked) {
this.setState({
completed: checked
});
}
render() {
return (
<Checkbox
id={this.props.todo.id}
title={this.props.todo.description}
checked={this.state.completed}
onChange={this.changeTodoState.bind(this)} />
)
}
}
|
src/containers/blankPage.js | EncontrAR/backoffice | import React, { Component } from 'react';
export default class extends Component {
render() {
return(<div className="isoLayoutContentWrapper" style={{height: "100vh"}}>
<div className="isoLayoutContent">
<h1>Blank Page</h1>
</div>
</div>);
}
};
|
build/server.js | IgorKilipenko/KTS_React | require("source-map-support").install();
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
__webpack_require__(94);
var _path = __webpack_require__(27);
var _path2 = _interopRequireDefault(_path);
var _express = __webpack_require__(111);
var _express2 = _interopRequireDefault(_express);
var _cookieParser = __webpack_require__(108);
var _cookieParser2 = _interopRequireDefault(_cookieParser);
var _bodyParser = __webpack_require__(107);
var _bodyParser2 = _interopRequireDefault(_bodyParser);
var _expressJwt = __webpack_require__(113);
var _expressJwt2 = _interopRequireDefault(_expressJwt);
var _expressGraphql = __webpack_require__(112);
var _expressGraphql2 = _interopRequireDefault(_expressGraphql);
var _jsonwebtoken = __webpack_require__(120);
var _jsonwebtoken2 = _interopRequireDefault(_jsonwebtoken);
var _server = __webpack_require__(127);
var _server2 = _interopRequireDefault(_server);
var _prettyError = __webpack_require__(126);
var _prettyError2 = _interopRequireDefault(_prettyError);
var _passport = __webpack_require__(41);
var _passport2 = _interopRequireDefault(_passport);
var _schema = __webpack_require__(45);
var _schema2 = _interopRequireDefault(_schema);
var _routes = __webpack_require__(49);
var _routes2 = _interopRequireDefault(_routes);
var _assets = __webpack_require__(93);
var _assets2 = _interopRequireDefault(_assets);
var _config = __webpack_require__(13);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var server = global.server = (0, _express2.default)();
//
// Tell any CSS tooling (such as Material UI) to use all vendor prefixes if the
// user agent is not known.
// -----------------------------------------------------------------------------
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
global.navigator = global.navigator || {};
global.navigator.userAgent = global.navigator.userAgent || 'all';
//
// Register Node.js middleware
// -----------------------------------------------------------------------------
server.use(_express2.default.static(_path2.default.join(__dirname, 'public')));
server.use((0, _cookieParser2.default)());
server.use(_bodyParser2.default.urlencoded({ extended: true }));
server.use(_bodyParser2.default.json());
//
// Authentication
// -----------------------------------------------------------------------------
server.use((0, _expressJwt2.default)({
secret: _config.auth.jwt.secret,
credentialsRequired: false,
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
getToken: function getToken(req) {
return req.cookies.id_token;
}
}));
server.use(_passport2.default.initialize());
server.get('/login/facebook', _passport2.default.authenticate('facebook', { scope: ['email', 'user_location'], session: false }));
server.get('/login/facebook/return', _passport2.default.authenticate('facebook', { failureRedirect: '/login', session: false }), function (req, res) {
var expiresIn = 60 * 60 * 24 * 180; // 180 days
var token = _jsonwebtoken2.default.sign(req.user, _config.auth.jwt.secret, { expiresIn: expiresIn });
res.cookie('id_token', token, { maxAge: 1000 * expiresIn, httpOnly: true });
res.redirect('/');
});
//
// Register API middleware
// -----------------------------------------------------------------------------
server.use('/graphql', (0, _expressGraphql2.default)(function (req) {
return {
schema: _schema2.default,
graphiql: true,
rootValue: { request: req },
pretty: ("development") !== 'production'
};
}));
//
// Register server-side rendering middleware
// -----------------------------------------------------------------------------
server.get('*', function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(req, res, next) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
return _context2.delegateYield(_regenerator2.default.mark(function _callee() {
var statusCode, template, data, css, context;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
statusCode = 200;
template = __webpack_require__(89);
data = { title: '', description: '', css: '', body: '', entry: _assets2.default.main.js };
if (false) {
data.trackingId = _config.analytics.google.trackingId;
}
css = [];
context = {
insertCss: function insertCss(styles) {
return css.push(styles._getCss());
},
onSetTitle: function onSetTitle(value) {
return data.title = value;
},
onSetMeta: function onSetMeta(key, value) {
return data[key] = value;
},
onPageNotFound: function onPageNotFound() {
return statusCode = 404;
}
};
_context.next = 8;
return _routes2.default.dispatch({ path: req.path, query: req.query, context: context }, function (state, component) {
data.body = _server2.default.renderToString(component);
data.css = css.join('');
});
case 8:
res.status(statusCode);
res.send(template(data));
case 10:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
})(), 't0', 2);
case 2:
_context2.next = 7;
break;
case 4:
_context2.prev = 4;
_context2.t1 = _context2['catch'](0);
next(_context2.t1);
case 7:
case 'end':
return _context2.stop();
}
}
}, _callee2, undefined, [[0, 4]]);
}));
return function (_x, _x2, _x3) {
return _ref.apply(this, arguments);
};
}());
//
// Error handling
// -----------------------------------------------------------------------------
var pe = new _prettyError2.default();
pe.skipNodeFiles();
pe.skipPackage('express');
server.use(function (err, req, res, next) {
// eslint-disable-line no-unused-vars
console.log(pe.render(err)); // eslint-disable-line no-console
var template = __webpack_require__(88);
var statusCode = err.status || 500;
res.status(statusCode);
res.send(template({
message: err.message,
stack: false ? '' : err.stack
}));
});
//
// Launch the server
// -----------------------------------------------------------------------------
server.listen(_config.port, function () {
/* eslint-disable no-console */
console.log('The server is running at http://localhost:' + _config.port + '/');
});
/***/ },
/* 1 */
/***/ function(module, exports) {
module.exports = require("react");
/***/ },
/* 2 */
/***/ function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
var result = [];
for(var i = 0; i < this.length; i++) {
var item = this[i];
if(item[2]) {
result.push("@media " + item[2] + "{" + item[1] + "}");
} else {
result.push(item[1]);
}
}
return result.join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _assign = __webpack_require__(24);
var _assign2 = _interopRequireDefault(_assign);
var _stringify = __webpack_require__(96);
var _stringify2 = _interopRequireDefault(_stringify);
var _slicedToArray2 = __webpack_require__(105);
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _getIterator2 = __webpack_require__(16);
var _getIterator3 = _interopRequireDefault(_getIterator2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var prefix = 's';
var inserted = {};
// Base64 encoding and decoding - The "Unicode Problem"
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
/**
* Remove style/link elements for specified node IDs
* if they are no longer referenced by UI components.
*/
function removeCss(ids) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = (0, _getIterator3.default)(ids), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var id = _step.value;
if (--inserted[id] <= 0) {
var elem = document.getElementById(prefix + id);
if (elem) {
elem.parentNode.removeChild(elem);
}
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
/**
* Example:
* // Insert CSS styles object generated by `css-loader` into DOM
* var removeCss = insertCss([[1, 'body { color: red; }']]);
*
* // Remove it from the DOM
* removeCss();
*/
function insertCss(styles, options) {
var _Object$assign = (0, _assign2.default)({
replace: false,
prepend: false
}, options);
var replace = _Object$assign.replace;
var prepend = _Object$assign.prepend;
var ids = [];
for (var i = 0; i < styles.length; i++) {
var _styles$i = (0, _slicedToArray3.default)(styles[i], 4);
var moduleId = _styles$i[0];
var css = _styles$i[1];
var media = _styles$i[2];
var sourceMap = _styles$i[3];
var id = moduleId + '-' + i;
ids.push(id);
if (inserted[id]) {
if (!replace) {
inserted[id]++;
continue;
}
}
inserted[id] = 1;
var elem = document.getElementById(prefix + id);
var create = false;
if (!elem) {
create = true;
elem = document.createElement('style');
elem.setAttribute('type', 'text/css');
elem.id = prefix + id;
if (media) {
elem.setAttribute('media', media);
}
}
var cssText = css;
if (sourceMap) {
cssText += '\n/*# sourceMappingURL=data:application/json;base64,' + b64EncodeUnicode((0, _stringify2.default)(sourceMap)) + '*/';
cssText += '\n/*# sourceURL=' + sourceMap.file + '*/';
}
if ('textContent' in elem) {
elem.textContent = cssText;
} else {
elem.styleSheet.cssText = cssText;
}
if (create) {
if (prepend) {
document.head.insertBefore(elem, document.head.childNodes[0]);
} else {
document.head.appendChild(elem);
}
}
}
return removeCss.bind(null, ids);
}
module.exports = insertCss;
/***/ },
/* 4 */
/***/ function(module, exports) {
module.exports = require("isomorphic-style-loader/lib/withStyles");
/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/asyncToGenerator");
/***/ },
/* 6 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/regenerator");
/***/ },
/* 7 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/object/get-prototype-of");
/***/ },
/* 8 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/classCallCheck");
/***/ },
/* 9 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/createClass");
/***/ },
/* 10 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/inherits");
/***/ },
/* 11 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/possibleConstructorReturn");
/***/ },
/* 12 */
/***/ function(module, exports) {
module.exports = require("graphql");
/***/ },
/* 13 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/* eslint-disable max-len */
/* jscs:disable maximumLineLength */
var port = exports.port = process.env.PORT || 3000;
var host = exports.host = process.env.WEBSITE_HOSTNAME || 'localhost:' + port;
var databaseUrl = exports.databaseUrl = process.env.DATABASE_URL || 'postgresql://demo:[email protected]:5432/membership01';
var analytics = exports.analytics = {
// https://analytics.google.com/
google: { trackingId: process.env.GOOGLE_TRACKING_ID || 'UA-XXXXX-X' }
};
var auth = exports.auth = {
jwt: { secret: process.env.JWT_SECRET || 'React Starter Kit' },
// https://developers.facebook.com/
facebook: {
id: process.env.FACEBOOK_APP_ID || '186244551745631',
secret: process.env.FACEBOOK_APP_SECRET || 'a970ae3240ab4b9b8aae0f9f0661c6fc'
},
// https://cloud.google.com/console/project
google: {
id: process.env.GOOGLE_CLIENT_ID || '251410730550-ahcg0ou5mgfhl8hlui1urru7jn5s12km.apps.googleusercontent.com',
secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd'
},
// https://apps.twitter.com/
twitter: {
key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
secret: process.env.TWITTER_CONSUMER_SECRET || 'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ'
}
};
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Response = exports.Headers = exports.Request = exports.default = undefined;
var _bluebird = __webpack_require__(17);
var _bluebird2 = _interopRequireDefault(_bluebird);
var _nodeFetch = __webpack_require__(122);
var _nodeFetch2 = _interopRequireDefault(_nodeFetch);
var _config = __webpack_require__(13);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_nodeFetch2.default.Promise = _bluebird2.default; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
_nodeFetch.Response.Promise = _bluebird2.default;
function localUrl(url) {
if (url.startsWith('//')) {
return 'https:' + url;
}
if (url.startsWith('http')) {
return url;
}
return 'http://' + _config.host + url;
}
function localFetch(url, options) {
return (0, _nodeFetch2.default)(localUrl(url), options);
}
exports.default = localFetch;
exports.Request = _nodeFetch.Request;
exports.Headers = _nodeFetch.Headers;
exports.Response = _nodeFetch.Response;
/***/ },
/* 15 */
/***/ function(module, exports) {
"use strict";
exports.__esModule = true;
exports.default = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
/***/ },
/* 16 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/get-iterator");
/***/ },
/* 17 */
/***/ function(module, exports) {
module.exports = require("bluebird");
/***/ },
/* 18 */
/***/ function(module, exports) {
module.exports = require("semantic-ui-react");
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(102);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(104);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Location = __webpack_require__(20);
var _Location2 = _interopRequireDefault(_Location);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
function isLeftClickEvent(event) {
return event.button === 0;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
var Link = function (_Component) {
(0, _inherits3.default)(Link, _Component);
function Link() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, Link);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Link.__proto__ || (0, _getPrototypeOf2.default)(Link)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) {
var allowTransition = true;
if (_this.props.onClick) {
_this.props.onClick(event);
}
if (isModifiedEvent(event) || !isLeftClickEvent(event)) {
return;
}
if (event.defaultPrevented === true) {
allowTransition = false;
}
event.preventDefault();
if (allowTransition) {
if (_this.props.to) {
_Location2.default.push(_this.props.to);
} else {
_Location2.default.push({
pathname: event.currentTarget.pathname,
search: event.currentTarget.search
});
}
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
} // eslint-disable-line react/prefer-stateless-function
(0, _createClass3.default)(Link, [{
key: 'render',
value: function render() {
var _props = this.props,
to = _props.to,
props = (0, _objectWithoutProperties3.default)(_props, ['to']); // eslint-disable-line no-use-before-define
return _react2.default.createElement('a', (0, _extends3.default)({ href: _Location2.default.createHref(to) }, props, { onClick: this.handleClick }));
}
}]);
return Link;
}(_react.Component);
Link.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired,
onClick: _react.PropTypes.func
};
exports.default = Link;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createBrowserHistory = __webpack_require__(116);
var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
var _createMemoryHistory = __webpack_require__(117);
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
var _useQueries = __webpack_require__(118);
var _useQueries2 = _interopRequireDefault(_useQueries);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var location = (0, _useQueries2.default)( false ? _createBrowserHistory2.default : _createMemoryHistory2.default)(); /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = location;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(110), __esModule: true };
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _defineProperty = __webpack_require__(98);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
(0, _defineProperty2.default)(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
/**
* Merge two attribute objects giving precedence
* to values in object `b`. Classes are special-cased
* allowing for arrays and merging/joining appropriately
* resulting in a string.
*
* @param {Object} a
* @param {Object} b
* @return {Object} a
* @api private
*/
exports.merge = function merge(a, b) {
if (arguments.length === 1) {
var attrs = a[0];
for (var i = 1; i < a.length; i++) {
attrs = merge(attrs, a[i]);
}
return attrs;
}
var ac = a['class'];
var bc = b['class'];
if (ac || bc) {
ac = ac || [];
bc = bc || [];
if (!Array.isArray(ac)) ac = [ac];
if (!Array.isArray(bc)) bc = [bc];
a['class'] = ac.concat(bc).filter(nulls);
}
for (var key in b) {
if (key != 'class') {
a[key] = b[key];
}
}
return a;
};
/**
* Filter null `val`s.
*
* @param {*} val
* @return {Boolean}
* @api private
*/
function nulls(val) {
return val != null && val !== '';
}
/**
* join array as classes.
*
* @param {*} val
* @return {String}
*/
exports.joinClasses = joinClasses;
function joinClasses(val) {
return (Array.isArray(val) ? val.map(joinClasses) :
(val && typeof val === 'object') ? Object.keys(val).filter(function (key) { return val[key]; }) :
[val]).filter(nulls).join(' ');
}
/**
* Render the given classes.
*
* @param {Array} classes
* @param {Array.<Boolean>} escaped
* @return {String}
*/
exports.cls = function cls(classes, escaped) {
var buf = [];
for (var i = 0; i < classes.length; i++) {
if (escaped && escaped[i]) {
buf.push(exports.escape(joinClasses([classes[i]])));
} else {
buf.push(joinClasses(classes[i]));
}
}
var text = joinClasses(buf);
if (text.length) {
return ' class="' + text + '"';
} else {
return '';
}
};
exports.style = function (val) {
if (val && typeof val === 'object') {
return Object.keys(val).map(function (style) {
return style + ':' + val[style];
}).join(';');
} else {
return val;
}
};
/**
* Render the given attribute.
*
* @param {String} key
* @param {String} val
* @param {Boolean} escaped
* @param {Boolean} terse
* @return {String}
*/
exports.attr = function attr(key, val, escaped, terse) {
if (key === 'style') {
val = exports.style(val);
}
if ('boolean' == typeof val || null == val) {
if (val) {
return ' ' + (terse ? key : key + '="' + key + '"');
} else {
return '';
}
} else if (0 == key.indexOf('data') && 'string' != typeof val) {
if (JSON.stringify(val).indexOf('&') !== -1) {
console.warn('Since Jade 2.0.0, ampersands (`&`) in data attributes ' +
'will be escaped to `&`');
};
if (val && typeof val.toISOString === 'function') {
console.warn('Jade will eliminate the double quotes around dates in ' +
'ISO form after 2.0.0');
}
return ' ' + key + "='" + JSON.stringify(val).replace(/'/g, ''') + "'";
} else if (escaped) {
if (val && typeof val.toISOString === 'function') {
console.warn('Jade will stringify dates in ISO form after 2.0.0');
}
return ' ' + key + '="' + exports.escape(val) + '"';
} else {
if (val && typeof val.toISOString === 'function') {
console.warn('Jade will stringify dates in ISO form after 2.0.0');
}
return ' ' + key + '="' + val + '"';
}
};
/**
* Render the given attributes object.
*
* @param {Object} obj
* @param {Object} escaped
* @return {String}
*/
exports.attrs = function attrs(obj, terse){
var buf = [];
var keys = Object.keys(obj);
if (keys.length) {
for (var i = 0; i < keys.length; ++i) {
var key = keys[i]
, val = obj[key];
if ('class' == key) {
if (val = joinClasses(val)) {
buf.push(' ' + key + '="' + val + '"');
}
} else {
buf.push(exports.attr(key, val, false, terse));
}
}
}
return buf.join('');
};
/**
* Escape the given string of `html`.
*
* @param {String} html
* @return {String}
* @api private
*/
var jade_encode_html_rules = {
'&': '&',
'<': '<',
'>': '>',
'"': '"'
};
var jade_match_html = /[&<>"]/g;
function jade_encode_char(c) {
return jade_encode_html_rules[c] || c;
}
exports.escape = jade_escape;
function jade_escape(html){
var result = String(html).replace(jade_match_html, jade_encode_char);
if (result === '' + html) return html;
else return result;
};
/**
* Re-throw the given `err` in context to the
* the jade in `filename` at the given `lineno`.
*
* @param {Error} err
* @param {String} filename
* @param {String} lineno
* @api private
*/
exports.rethrow = function rethrow(err, filename, lineno, str){
if (!(err instanceof Error)) throw err;
if ((typeof window != 'undefined' || !filename) && !str) {
err.message += ' on line ' + lineno;
throw err;
}
try {
str = str || __webpack_require__(26).readFileSync(filename, 'utf8')
} catch (ex) {
rethrow(err, null, lineno)
}
var context = 3
, lines = str.split('\n')
, start = Math.max(lineno - context, 0)
, end = Math.min(lines.length, lineno + context);
// Error context
var context = lines.slice(start, end).map(function(line, i){
var curr = i + start + 1;
return (curr == lineno ? ' > ' : ' ')
+ curr
+ '| '
+ line;
}).join('\n');
// Alter exception message
err.path = filename;
err.message = (filename || 'Jade') + ':' + lineno
+ '\n' + context + '\n\n' + err.message;
throw err;
};
exports.DebugItem = function DebugItem(lineno, filename) {
this.lineno = lineno;
this.filename = filename;
}
/***/ },
/* 24 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/object/assign");
/***/ },
/* 25 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/promise");
/***/ },
/* 26 */
/***/ function(module, exports) {
module.exports = require("fs");
/***/ },
/* 27 */
/***/ function(module, exports) {
module.exports = require("path");
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _create = __webpack_require__(21);
var _create2 = _interopRequireDefault(_create);
var _classCallCheck2 = __webpack_require__(15);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Routing | http://www.kriasoft.com/react-routing
* Copyright (c) Konstantin Tarkus <[email protected]> | The MIT License
*/
var Match = function Match(route, path, keys, match) {
(0, _classCallCheck3.default)(this, Match);
this.route = route;
this.path = path;
this.params = (0, _create2.default)(null);
for (var i = 1; i < match.length; i++) {
this.params[keys[i - 1].name] = decodeParam(match[i]);
}
};
function decodeParam(val) {
if (!(typeof val === 'string' || val instanceof String)) {
return val;
}
try {
return decodeURIComponent(val);
} catch (e) {
var err = new TypeError('Failed to decode param \'' + val + '\'');
err.status = 400;
throw err;
}
}
exports.default = Match;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(15);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(22);
var _createClass3 = _interopRequireDefault(_createClass2);
var _pathToRegexp = __webpack_require__(90);
var _pathToRegexp2 = _interopRequireDefault(_pathToRegexp);
var _Match = __webpack_require__(28);
var _Match2 = _interopRequireDefault(_Match);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Routing | http://www.kriasoft.com/react-routing
* Copyright (c) Konstantin Tarkus <[email protected]> | The MIT License
*/
var Route = function () {
function Route(path, handlers) {
(0, _classCallCheck3.default)(this, Route);
this.path = path;
this.handlers = handlers;
this.regExp = (0, _pathToRegexp2.default)(path, this.keys = []);
}
(0, _createClass3.default)(Route, [{
key: 'match',
value: function match(path) {
var m = this.regExp.exec(path);
return m ? new _Match2.default(this, path, this.keys, m) : null;
}
}]);
return Route;
}();
exports.default = Route;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray2 = __webpack_require__(60);
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _regenerator = __webpack_require__(61);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _getIterator2 = __webpack_require__(58);
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _asyncToGenerator2 = __webpack_require__(59);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _create = __webpack_require__(21);
var _create2 = _interopRequireDefault(_create);
var _classCallCheck2 = __webpack_require__(15);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(22);
var _createClass3 = _interopRequireDefault(_createClass2);
var _Route = __webpack_require__(29);
var _Route2 = _interopRequireDefault(_Route);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var emptyFunction = function emptyFunction() {}; /**
* React Routing | http://www.kriasoft.com/react-routing
* Copyright (c) Konstantin Tarkus <[email protected]> | The MIT License
*/
var Router = function () {
/**
* Creates a new instance of the `Router` class.
*/
function Router(initialize) {
(0, _classCallCheck3.default)(this, Router);
this.routes = [];
this.events = (0, _create2.default)(null);
if (typeof initialize === 'function') {
initialize(this.on.bind(this));
}
}
/**
* Adds a new route to the routing table or registers an event listener.
*
* @param {String} path A string in the Express format, an array of strings, or a regular expression.
* @param {Function|Array} handlers Asynchronous route handler function(s).
*/
(0, _createClass3.default)(Router, [{
key: 'on',
value: function on(path) {
for (var _len = arguments.length, handlers = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
handlers[_key - 1] = arguments[_key];
}
if (path === 'error') {
this.events[path] = handlers[0];
} else {
this.routes.push(new _Route2.default(path, handlers));
}
}
}, {
key: 'dispatch',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(state, cb) {
var next = function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
var _handlers$next;
var _value, _value2, match, handler;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
if (!((_handlers$next = handlers.next(), value = _handlers$next.value, done = _handlers$next.done, _handlers$next) && !done)) {
_context2.next = 13;
break;
}
_value = value, _value2 = (0, _slicedToArray3.default)(_value, 2), match = _value2[0], handler = _value2[1];
state.params = match.params;
if (!(handler.length > 1)) {
_context2.next = 9;
break;
}
_context2.next = 6;
return handler(state, next);
case 6:
_context2.t0 = _context2.sent;
_context2.next = 12;
break;
case 9:
_context2.next = 11;
return handler(state);
case 11:
_context2.t0 = _context2.sent;
case 12:
return _context2.abrupt('return', _context2.t0);
case 13:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
}));
return function next() {
return _ref2.apply(this, arguments);
};
}();
var routes, handlers, value, result, done;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
if (typeof state === 'string' || state instanceof String) {
state = { path: state };
}
cb = cb || emptyFunction;
routes = this.routes;
handlers = _regenerator2.default.mark(function _callee() {
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, route, match, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, handler;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context.prev = 3;
_iterator = (0, _getIterator3.default)(routes);
case 5:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context.next = 38;
break;
}
route = _step.value;
match = route.match(state.path);
if (!match) {
_context.next = 35;
break;
}
_iteratorNormalCompletion2 = true;
_didIteratorError2 = false;
_iteratorError2 = undefined;
_context.prev = 12;
_iterator2 = (0, _getIterator3.default)(match.route.handlers);
case 14:
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
_context.next = 21;
break;
}
handler = _step2.value;
_context.next = 18;
return [match, handler];
case 18:
_iteratorNormalCompletion2 = true;
_context.next = 14;
break;
case 21:
_context.next = 27;
break;
case 23:
_context.prev = 23;
_context.t0 = _context['catch'](12);
_didIteratorError2 = true;
_iteratorError2 = _context.t0;
case 27:
_context.prev = 27;
_context.prev = 28;
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
case 30:
_context.prev = 30;
if (!_didIteratorError2) {
_context.next = 33;
break;
}
throw _iteratorError2;
case 33:
return _context.finish(30);
case 34:
return _context.finish(27);
case 35:
_iteratorNormalCompletion = true;
_context.next = 5;
break;
case 38:
_context.next = 44;
break;
case 40:
_context.prev = 40;
_context.t1 = _context['catch'](3);
_didIteratorError = true;
_iteratorError = _context.t1;
case 44:
_context.prev = 44;
_context.prev = 45;
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
case 47:
_context.prev = 47;
if (!_didIteratorError) {
_context.next = 50;
break;
}
throw _iteratorError;
case 50:
return _context.finish(47);
case 51:
return _context.finish(44);
case 52:
case 'end':
return _context.stop();
}
}
}, _callee, this, [[3, 40, 44, 52], [12, 23, 27, 35], [28,, 30, 34], [45,, 47, 51]]);
})();
value = void 0, result = void 0, done = false;
case 5:
if (done) {
_context3.next = 15;
break;
}
_context3.next = 8;
return next();
case 8:
result = _context3.sent;
if (!result) {
_context3.next = 13;
break;
}
state.statusCode = typeof state.statusCode === 'number' ? state.statusCode : 200;
cb(state, result);
return _context3.abrupt('return');
case 13:
_context3.next = 5;
break;
case 15:
if (!this.events.error) {
_context3.next = 31;
break;
}
_context3.prev = 16;
state.statusCode = 404;
_context3.next = 20;
return this.events.error(state, new Error('Cannot found a route matching \'' + state.path + '\'.'));
case 20:
result = _context3.sent;
cb(state, result);
_context3.next = 31;
break;
case 24:
_context3.prev = 24;
_context3.t0 = _context3['catch'](16);
state.statusCode = 500;
_context3.next = 29;
return this.events.error(state, _context3.t0);
case 29:
result = _context3.sent;
cb(state, result);
case 31:
case 'end':
return _context3.stop();
}
}
}, _callee3, this, [[16, 24]]);
}));
function dispatch(_x, _x2) {
return _ref.apply(this, arguments);
}
return dispatch;
}()
}]);
return Router;
}();
exports.default = Router;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _emptyFunction = __webpack_require__(114);
var _emptyFunction2 = _interopRequireDefault(_emptyFunction);
var _App = __webpack_require__(76);
var _App2 = _interopRequireDefault(_App);
var _Header = __webpack_require__(36);
var _Header2 = _interopRequireDefault(_Header);
var _Feedback = __webpack_require__(34);
var _Feedback2 = _interopRequireDefault(_Feedback);
var _Footer = __webpack_require__(35);
var _Footer2 = _interopRequireDefault(_Footer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var App = function (_Component) {
(0, _inherits3.default)(App, _Component);
function App() {
(0, _classCallCheck3.default)(this, App);
return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments));
}
(0, _createClass3.default)(App, [{
key: 'getChildContext',
value: function getChildContext() {
var context = this.props.context;
return {
insertCss: context.insertCss || _emptyFunction2.default,
onSetTitle: context.onSetTitle || _emptyFunction2.default,
onSetMeta: context.onSetMeta || _emptyFunction2.default,
onPageNotFound: context.onPageNotFound || _emptyFunction2.default
};
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
var insertCss = this.props.context.insertCss;
this.removeCss = insertCss(_App2.default);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.removeCss();
}
}, {
key: 'render',
value: function render() {
return !this.props.error ? _react2.default.createElement(
'div',
null,
_react2.default.createElement(_Header2.default, null),
this.props.children,
_react2.default.createElement(_Feedback2.default, null),
_react2.default.createElement(_Footer2.default, null)
) : this.props.children;
}
}]);
return App;
}(_react.Component);
App.propTypes = {
context: _react.PropTypes.shape({
insertCss: _react.PropTypes.func,
onSetTitle: _react.PropTypes.func,
onSetMeta: _react.PropTypes.func,
onPageNotFound: _react.PropTypes.func
}),
children: _react.PropTypes.element.isRequired,
error: _react.PropTypes.object
};
App.childContextTypes = {
insertCss: _react.PropTypes.func.isRequired,
onSetTitle: _react.PropTypes.func.isRequired,
onSetMeta: _react.PropTypes.func.isRequired,
onPageNotFound: _react.PropTypes.func.isRequired
};
exports.default = App;
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _ContentPage = __webpack_require__(77);
var _ContentPage2 = _interopRequireDefault(_ContentPage);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ContentPage = function (_Component) {
(0, _inherits3.default)(ContentPage, _Component);
function ContentPage() {
(0, _classCallCheck3.default)(this, ContentPage);
return (0, _possibleConstructorReturn3.default)(this, (ContentPage.__proto__ || (0, _getPrototypeOf2.default)(ContentPage)).apply(this, arguments));
}
(0, _createClass3.default)(ContentPage, [{
key: 'componentWillMount',
value: function componentWillMount() {
this.context.onSetTitle(this.props.title);
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
{ className: _ContentPage2.default.root },
_react2.default.createElement(
'div',
{ className: _ContentPage2.default.container },
this.props.path === '/' ? null : _react2.default.createElement(
'h1',
null,
this.props.title
),
_react2.default.createElement('div', { dangerouslySetInnerHTML: { __html: this.props.content || '' } })
)
);
}
}]);
return ContentPage;
}(_react.Component); /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
ContentPage.propTypes = {
path: _react.PropTypes.string.isRequired,
content: _react.PropTypes.string.isRequired,
title: _react.PropTypes.string
};
ContentPage.contextTypes = {
onSetTitle: _react.PropTypes.func.isRequired
};
exports.default = (0, _withStyles2.default)(ContentPage, _ContentPage2.default);
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _ErrorPage = __webpack_require__(78);
var _ErrorPage2 = _interopRequireDefault(_ErrorPage);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var title = 'Error'; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var ErrorPage = function (_Component) {
(0, _inherits3.default)(ErrorPage, _Component);
function ErrorPage() {
(0, _classCallCheck3.default)(this, ErrorPage);
return (0, _possibleConstructorReturn3.default)(this, (ErrorPage.__proto__ || (0, _getPrototypeOf2.default)(ErrorPage)).apply(this, arguments));
}
(0, _createClass3.default)(ErrorPage, [{
key: 'componentWillMount',
value: function componentWillMount() {
this.context.onSetTitle(title);
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'h1',
null,
title
),
_react2.default.createElement(
'p',
null,
'Sorry, an critical error occurred on this page.'
)
);
}
}]);
return ErrorPage;
}(_react.Component);
ErrorPage.contextTypes = {
onSetTitle: _react.PropTypes.func.isRequired,
onPageNotFound: _react.PropTypes.func.isRequired
};
exports.default = (0, _withStyles2.default)(ErrorPage, _ErrorPage2.default);
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Feedback = __webpack_require__(79);
var _Feedback2 = _interopRequireDefault(_Feedback);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Feedback() {
return _react2.default.createElement(
'div',
{ className: _Feedback2.default.root },
_react2.default.createElement(
'div',
{ className: _Feedback2.default.container },
_react2.default.createElement(
'a',
{
className: _Feedback2.default.link,
href: 'https://gitter.im/kriasoft/react-starter-kit'
},
'Ask a question'
),
_react2.default.createElement(
'span',
{ className: _Feedback2.default.spacer },
'|'
),
_react2.default.createElement(
'a',
{
className: _Feedback2.default.link,
href: 'https://github.com/kriasoft/react-starter-kit/issues/new'
},
'Report an issue'
)
)
);
} /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = (0, _withStyles2.default)(Feedback, _Feedback2.default);
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Footer = __webpack_require__(80);
var _Footer2 = _interopRequireDefault(_Footer);
var _Link = __webpack_require__(19);
var _Link2 = _interopRequireDefault(_Link);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
function Footer() {
return _react2.default.createElement(
'div',
{ className: _Footer2.default.root },
_react2.default.createElement(
'div',
{ className: _Footer2.default.container },
_react2.default.createElement(
'span',
{ className: _Footer2.default.text },
'\xA9 Your Company'
),
_react2.default.createElement(
'span',
{ className: _Footer2.default.spacer },
'\xB7'
),
_react2.default.createElement(
_Link2.default,
{ className: _Footer2.default.link, to: '/' },
'Home'
),
_react2.default.createElement(
'span',
{ className: _Footer2.default.spacer },
'\xB7'
),
_react2.default.createElement(
_Link2.default,
{ className: _Footer2.default.link, to: '/privacy' },
'Privacy'
),
_react2.default.createElement(
'span',
{ className: _Footer2.default.spacer },
'\xB7'
),
_react2.default.createElement(
_Link2.default,
{ className: _Footer2.default.link, to: '/not-found' },
'Not Found'
)
)
);
}
exports.default = (0, _withStyles2.default)(Footer, _Footer2.default);
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Header = __webpack_require__(81);
var _Header2 = _interopRequireDefault(_Header);
var _Link = __webpack_require__(19);
var _Link2 = _interopRequireDefault(_Link);
var _Navigation = __webpack_require__(38);
var _Navigation2 = _interopRequireDefault(_Navigation);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Header() {
return _react2.default.createElement(
'div',
{ className: _Header2.default.root },
_react2.default.createElement(
'div',
{ className: _Header2.default.container },
_react2.default.createElement(_Navigation2.default, { className: _Header2.default.nav }),
_react2.default.createElement(
_Link2.default,
{ className: _Header2.default.brand, to: '/' },
_react2.default.createElement('img', { src: __webpack_require__(128), width: '400', height: '200', alt: 'React' }),
_react2.default.createElement(
'span',
{ className: _Header2.default.brandTxt },
'Your Company'
)
),
_react2.default.createElement(
'div',
{ className: _Header2.default.banner },
_react2.default.createElement(
'h1',
{ className: _Header2.default.bannerTitle },
'React'
),
_react2.default.createElement(
'p',
{ className: _Header2.default.bannerDesc },
'Complex web apps made easy'
)
)
)
);
} /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = (0, _withStyles2.default)(Header, _Header2.default);
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _get2 = __webpack_require__(103);
var _get3 = _interopRequireDefault(_get2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Location = __webpack_require__(20);
var _Location2 = _interopRequireDefault(_Location);
var _semanticUiReact = __webpack_require__(18);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// import React from 'react';
function isLeftClickEvent(event) {
return event.button === 0;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
var MenuItem = function (_Menu$Item) {
(0, _inherits3.default)(MenuItem, _Menu$Item);
function MenuItem() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, MenuItem);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) {
var allowTransition = true;
if (isModifiedEvent(event) || !isLeftClickEvent(event)) {
return;
}
if (event.defaultPrevented === true) {
allowTransition = false;
}
event.preventDefault();
if (allowTransition) {
if (_this.props.to) {
_Location2.default.push(_this.props.to);
} else {
_Location2.default.push({
pathname: event.currentTarget.pathname,
search: event.currentTarget.search
});
}
}
var onClick = _this.props.onClick;
if (onClick) onClick(event, _this.props);
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
} // eslint-disable-line react/prefer-stateless-function
(0, _createClass3.default)(MenuItem, [{
key: 'render',
value: function render() {
return (0, _get3.default)(MenuItem.prototype.__proto__ || (0, _getPrototypeOf2.default)(MenuItem.prototype), 'render', this).call(this);
}
}]);
return MenuItem;
}(_semanticUiReact.Menu.Item);
exports.default = MenuItem;
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Navigation = __webpack_require__(82);
var _Navigation2 = _interopRequireDefault(_Navigation);
var _MenuItem = __webpack_require__(37);
var _MenuItem2 = _interopRequireDefault(_MenuItem);
var _semanticUiReact = __webpack_require__(18);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// import Link from '../Link';
// import cx from 'classnames';
var Navigation = function (_Component) {
(0, _inherits3.default)(Navigation, _Component);
function Navigation() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, Navigation);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Navigation.__proto__ || (0, _getPrototypeOf2.default)(Navigation)).call.apply(_ref, [this].concat(args))), _this), _this.state = { activeItem: 'home' }, _this.handleItemClick = function (e, _ref2) {
var name = _ref2.name;
return _this.setState({ activeItem: name });
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(Navigation, [{
key: 'render',
value: function render() {
var activeItem = this.state.activeItem;
return _react2.default.createElement(
_semanticUiReact.Menu,
{ pointing: true, secondary: true, vertical: true },
_react2.default.createElement(_MenuItem2.default, { name: 'home', active: activeItem === 'home', onClick: this.handleItemClick, to: '/' }),
_react2.default.createElement(_MenuItem2.default, { name: 'messages', active: activeItem === 'messages', onClick: this.handleItemClick, to: '/contact' }),
_react2.default.createElement(_MenuItem2.default, { name: 'friends', active: activeItem === 'friends', onClick: this.handleItemClick })
);
}
}]);
return Navigation;
}(_react.Component);
// import { Sidebar, Segment, Button, Menu, Image, Icon, Header } from 'semantic-ui-react';
// import MainMenu from '../MainMenu';
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
Navigation.propTypes = {
className: _react.PropTypes.string
};
exports.default = (0, _withStyles2.default)(Navigation, _Navigation2.default);
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = __webpack_require__(7);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(8);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(9);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(11);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(10);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _NotFoundPage = __webpack_require__(83);
var _NotFoundPage2 = _interopRequireDefault(_NotFoundPage);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var title = 'Page Not Found'; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var NotFoundPage = function (_Component) {
(0, _inherits3.default)(NotFoundPage, _Component);
function NotFoundPage() {
(0, _classCallCheck3.default)(this, NotFoundPage);
return (0, _possibleConstructorReturn3.default)(this, (NotFoundPage.__proto__ || (0, _getPrototypeOf2.default)(NotFoundPage)).apply(this, arguments));
}
(0, _createClass3.default)(NotFoundPage, [{
key: 'componentWillMount',
value: function componentWillMount() {
this.context.onSetTitle(title);
this.context.onPageNotFound();
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'h1',
null,
title
),
_react2.default.createElement(
'p',
null,
'Sorry, but the page you were trying to view does not exist.'
)
);
}
}]);
return NotFoundPage;
}(_react.Component);
NotFoundPage.contextTypes = {
onSetTitle: _react.PropTypes.func.isRequired,
onPageNotFound: _react.PropTypes.func.isRequired
};
exports.default = (0, _withStyles2.default)(NotFoundPage, _NotFoundPage2.default);
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _pg = __webpack_require__(125);
var _pg2 = _interopRequireDefault(_pg);
var _bluebird = __webpack_require__(17);
var _bluebird2 = _interopRequireDefault(_bluebird);
var _config = __webpack_require__(13);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// TODO: Customize database connection settings
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
_pg2.default.defaults.ssl = true; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
_pg2.default.defaults.poolSize = 2;
_pg2.default.defaults.application_name = 'RSK';
/* jscs:enable requireCamelCaseOrUpperCaseIdentifiers */
/**
* Promise-based wrapper for pg.Client
* https://github.com/brianc/node-postgres/wiki/Client
*/
function AsyncClient(client) {
this.client = client;
this.query = this.query.bind(this);
this.end = this.end.bind(this);
}
AsyncClient.prototype.query = function query(sql) {
var _this = this;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return new _bluebird2.default(function (resolve, reject) {
if (args.length) {
_this.client.query(sql, args, function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
} else {
_this.client.query(sql, function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
}
});
};
AsyncClient.prototype.end = function end() {
this.client.end();
};
/**
* Promise-based wrapper for pg.connect()
* https://github.com/brianc/node-postgres/wiki/pg
*/
_pg2.default.connect = function (connect) {
return function (callback) {
return new _bluebird2.default(function (resolve, reject) {
connect.call(_pg2.default, _config.databaseUrl, function (err, client, done) {
if (err) {
if (client) {
done(client);
}
reject(err);
} else {
callback(new AsyncClient(client)).then(function () {
done();
resolve();
}).catch(function (error) {
done(client);
reject(error);
});
}
});
});
};
}(_pg2.default.connect);
exports.default = _pg2.default;
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _passport = __webpack_require__(123);
var _passport2 = _interopRequireDefault(_passport);
var _passportFacebook = __webpack_require__(124);
var _db = __webpack_require__(40);
var _db2 = _interopRequireDefault(_db);
var _config = __webpack_require__(13);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Sign in with Facebook.
*/
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/**
* Passport.js reference implementation.
* The database schema used in this sample is available at
* https://github.com/membership/membership.db/tree/master/postgres
*/
_passport2.default.use(new _passportFacebook.Strategy({
clientID: _config.auth.facebook.id,
clientSecret: _config.auth.facebook.secret,
callbackURL: '/login/facebook/return',
profileFields: ['name', 'email', 'link', 'locale', 'timezone'],
passReqToCallback: true
}, function (req, accessToken, refreshToken, profile, done) {
var loginName = 'facebook';
_db2.default.connect(function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(_ref2) {
var query = _ref2.query;
var result, _result, userId;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!req.user) {
_context.next = 24;
break;
}
_context.next = 3;
return query('SELECT 1 FROM user_login WHERE name = $1 AND key = $2', loginName, profile.id);
case 3:
result = _context.sent;
if (!result.rowCount) {
_context.next = 8;
break;
}
// There is already a Facebook account that belongs to you.
// Sign in with that account or delete it, then link it with your current account.
done();
_context.next = 22;
break;
case 8:
_context.next = 10;
return query('\n INSERT INTO user_account (id, email) SELECT $1, $2::character\n WHERE NOT EXISTS (SELECT 1 FROM user_account WHERE id = $1);', req.user.id, profile._json.email);
case 10:
_context.next = 12;
return query('\n INSERT INTO user_login (user_id, name, key) VALUES ($1, \'facebook\', $2);', req.user.id, profile.id);
case 12:
_context.next = 14;
return query('\n INSERT INTO user_claim (user_id, type, value) VALUES\n ($1, \'urn:facebook:access_token\', $3);', req.user.id, profile.id);
case 14:
_context.next = 16;
return query('\n INSERT INTO user_profile (user_id) SELECT $1\n WHERE NOT EXISTS (SELECT 1 FROM user_profile WHERE user_id = $1);', req.user.id);
case 16:
_context.next = 18;
return query('\n UPDATE user_profile SET\n display_name = COALESCE(NULLIF(display_name, \'\'), $2),\n gender = COALESCE(NULLIF(gender, \'\'), $3),\n picture = COALESCE(NULLIF(picture, \'\'), $4),\n WHERE user_id = $1;', req.user.id, profile.displayName, profile._json.gender, 'https://graph.facebook.com/' + profile.id + '/picture?type=large');
case 18:
_context.next = 20;
return query('\n SELECT id, email FROM user_account WHERE id = $1;', req.user.id);
case 20:
result = _context.sent;
done(null, result.rows[0]);
case 22:
_context.next = 52;
break;
case 24:
_context.next = 26;
return query('\n SELECT u.id, u.email FROM user_account AS u\n LEFT JOIN user_login AS l ON l.user_id = u.id\n WHERE l.name = $1 AND l.key = $2', loginName, profile.id);
case 26:
_result = _context.sent;
if (!_result.rowCount) {
_context.next = 31;
break;
}
done(null, _result.rows[0]);
_context.next = 52;
break;
case 31:
_context.next = 33;
return query('SELECT 1 FROM user_account WHERE email = $1', profile._json.email);
case 33:
_result = _context.sent;
if (!_result.rowCount) {
_context.next = 38;
break;
}
// There is already an account using this email address. Sign in to
// that account and link it with Facebook manually from Account Settings.
done(null);
_context.next = 52;
break;
case 38:
_context.next = 40;
return query('\n INSERT INTO user_account (email) VALUES ($1) RETURNING (id)', profile._json.email);
case 40:
_result = _context.sent;
userId = _result.rows[0].id;
_context.next = 44;
return query('\n INSERT INTO user_login (user_id, name, key) VALUES ($1, \'facebook\', $2)', userId, profile.id);
case 44:
_context.next = 46;
return query('\n INSERT INTO user_claim (user_id, type, value) VALUES\n ($1, \'urn:facebook:access_token\', $2);', userId, accessToken);
case 46:
_context.next = 48;
return query('\n INSERT INTO user_profile (user_id, display_name, gender, picture)\n VALUES ($1, $2, $3, $4);', userId, profile.displayName, profile._json.gender, 'https://graph.facebook.com/' + profile.id + '/picture?type=large');
case 48:
_context.next = 50;
return query('SELECT id, email FROM user_account WHERE id = $1;', userId);
case 50:
_result = _context.sent;
done(null, _result.rows[0]);
case 52:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function (_x) {
return _ref.apply(this, arguments);
};
}()).catch(done);
}));
exports.default = _passport2.default;
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getIterator2 = __webpack_require__(16);
var _getIterator3 = _interopRequireDefault(_getIterator2);
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _assign = __webpack_require__(24);
var _assign2 = _interopRequireDefault(_assign);
var resolveExtension = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(path, extension) {
var fileNameBase, ext, fileName;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
fileNameBase = (0, _path.join)(CONTENT_DIR, '' + (path === '/' ? '/index' : path));
ext = extension;
if (!ext.startsWith('.')) {
ext = '.' + extension;
}
fileName = fileNameBase + ext;
_context.next = 6;
return fileExists(fileName);
case 6:
if (_context.sent) {
_context.next = 9;
break;
}
fileNameBase = (0, _path.join)(CONTENT_DIR, path + '/index');
fileName = fileNameBase + ext;
case 9:
_context.next = 11;
return fileExists(fileName);
case 11:
if (_context.sent) {
_context.next = 13;
break;
}
return _context.abrupt('return', { success: false });
case 13:
return _context.abrupt('return', { success: true, fileName: fileName });
case 14:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
return function resolveExtension(_x, _x2) {
return _ref.apply(this, arguments);
};
}();
var resolveFileName = function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(path) {
var extensions, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, extension, maybeFileName;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
extensions = ['.jade', '.md', '.html'];
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context2.prev = 4;
_iterator = (0, _getIterator3.default)(extensions);
case 6:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context2.next = 16;
break;
}
extension = _step.value;
_context2.next = 10;
return resolveExtension(path, extension);
case 10:
maybeFileName = _context2.sent;
if (!maybeFileName.success) {
_context2.next = 13;
break;
}
return _context2.abrupt('return', { success: true, fileName: maybeFileName.fileName, extension: extension });
case 13:
_iteratorNormalCompletion = true;
_context2.next = 6;
break;
case 16:
_context2.next = 22;
break;
case 18:
_context2.prev = 18;
_context2.t0 = _context2['catch'](4);
_didIteratorError = true;
_iteratorError = _context2.t0;
case 22:
_context2.prev = 22;
_context2.prev = 23;
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
case 25:
_context2.prev = 25;
if (!_didIteratorError) {
_context2.next = 28;
break;
}
throw _iteratorError;
case 28:
return _context2.finish(25);
case 29:
return _context2.finish(22);
case 30:
return _context2.abrupt('return', { success: false, fileName: null, extension: null });
case 31:
case 'end':
return _context2.stop();
}
}
}, _callee2, this, [[4, 18, 22, 30], [23,, 25, 29]]);
}));
return function resolveFileName(_x3) {
return _ref2.apply(this, arguments);
};
}();
var _fs = __webpack_require__(26);
var _fs2 = _interopRequireDefault(_fs);
var _path = __webpack_require__(27);
var _bluebird = __webpack_require__(17);
var _bluebird2 = _interopRequireDefault(_bluebird);
var _jade = __webpack_require__(119);
var _jade2 = _interopRequireDefault(_jade);
var _frontMatter = __webpack_require__(115);
var _frontMatter2 = _interopRequireDefault(_frontMatter);
var _markdownIt = __webpack_require__(121);
var _markdownIt2 = _interopRequireDefault(_markdownIt);
var _graphql = __webpack_require__(12);
var _ContentType = __webpack_require__(46);
var _ContentType2 = _interopRequireDefault(_ContentType);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var md = new _markdownIt2.default();
// A folder with Jade/Markdown/HTML content pages
var CONTENT_DIR = (0, _path.join)(__dirname, './content');
// Extract 'front matter' metadata and generate HTML
var parseContent = function parseContent(path, fileContent, extension) {
var fmContent = (0, _frontMatter2.default)(fileContent);
var htmlContent = void 0;
switch (extension) {
case '.jade':
htmlContent = _jade2.default.render(fmContent.body);
break;
case '.md':
htmlContent = md.render(fmContent.body);
break;
case '.html':
htmlContent = fmContent.body;
break;
default:
return null;
}
var smth = (0, _assign2.default)({ path: path, content: htmlContent }, fmContent.attributes);
return smth;
};
var readFile = _bluebird2.default.promisify(_fs2.default.readFile);
var fileExists = function fileExists(filename) {
return new _bluebird2.default(function (resolve) {
_fs2.default.exists(filename, resolve);
});
};
var content = {
type: _ContentType2.default,
args: {
path: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) }
},
resolve: function resolve(_ref3, _ref4) {
var _this = this;
var request = _ref3.request;
var path = _ref4.path;
return (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3() {
var _ref5, success, fileName, extension, source;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return resolveFileName(path);
case 2:
_ref5 = _context3.sent;
success = _ref5.success;
fileName = _ref5.fileName;
extension = _ref5.extension;
if (success) {
_context3.next = 8;
break;
}
return _context3.abrupt('return', null);
case 8:
_context3.next = 10;
return readFile(fileName, { encoding: 'utf8' });
case 10:
source = _context3.sent;
return _context3.abrupt('return', parseContent(path, source, extension));
case 12:
case 'end':
return _context3.stop();
}
}
}, _callee3, _this);
}))();
}
};
exports.default = content;
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _UserType = __webpack_require__(48);
var _UserType2 = _interopRequireDefault(_UserType);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var me = {
type: _UserType2.default,
resolve: function resolve(_ref) {
var request = _ref.request;
return request.user && {
id: request.user.id,
email: request.user.email
};
}
}; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = me;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _graphql = __webpack_require__(12);
var _fetch = __webpack_require__(14);
var _fetch2 = _interopRequireDefault(_fetch);
var _NewsItemType = __webpack_require__(47);
var _NewsItemType2 = _interopRequireDefault(_NewsItemType);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// React.js News Feed (RSS)
var url = 'http://ajax.googleapis.com/ajax/services/feed/load' + '?v=1.0&num=10&q=https://reactjsnews.com/feed.xml'; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var items = [];
var lastFetchTask = void 0;
var lastFetchTime = new Date(1970, 0, 1);
var news = {
type: new _graphql.GraphQLList(_NewsItemType2.default),
resolve: function resolve() {
if (lastFetchTask) {
return lastFetchTask;
}
if (new Date() - lastFetchTime > 1000 * 3 /* 10 mins */) {
lastFetchTime = new Date();
lastFetchTask = (0, _fetch2.default)(url).then(function (response) {
return response.json();
}).then(function (data) {
if (data.responseStatus === 200) {
items = data.responseData.feed.entries;
}
return items;
}).finally(function () {
lastFetchTask = null;
});
if (items.length) {
return items;
}
return lastFetchTask;
}
return items;
}
};
exports.default = news;
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _graphql = __webpack_require__(12);
var _me = __webpack_require__(43);
var _me2 = _interopRequireDefault(_me);
var _content = __webpack_require__(42);
var _content2 = _interopRequireDefault(_content);
var _news = __webpack_require__(44);
var _news2 = _interopRequireDefault(_news);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var schema = new _graphql.GraphQLSchema({
query: new _graphql.GraphQLObjectType({
name: 'Query',
fields: {
me: _me2.default,
content: _content2.default,
news: _news2.default
}
})
});
exports.default = schema;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _graphql = __webpack_require__(12);
var ContentType = new _graphql.GraphQLObjectType({
name: 'Content',
fields: {
path: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
title: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
content: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
component: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) }
}
}); /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = ContentType;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _graphql = __webpack_require__(12);
var NewsItemType = new _graphql.GraphQLObjectType({
name: 'NewsItem',
fields: {
title: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
link: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
author: { type: _graphql.GraphQLString },
publishedDate: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) },
contentSnippet: { type: _graphql.GraphQLString }
}
}); /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = NewsItemType;
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _graphql = __webpack_require__(12);
var UserType = new _graphql.GraphQLObjectType({
name: 'User',
fields: {
id: { type: new _graphql.GraphQLNonNull(_graphql.GraphQLID) },
email: { type: _graphql.GraphQLString }
}
}); /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
exports.default = UserType;
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Router = __webpack_require__(30);
var _Router2 = _interopRequireDefault(_Router);
var _fetch = __webpack_require__(14);
var _fetch2 = _interopRequireDefault(_fetch);
var _App = __webpack_require__(31);
var _App2 = _interopRequireDefault(_App);
var _ContentPage = __webpack_require__(32);
var _ContentPage2 = _interopRequireDefault(_ContentPage);
var _NotFoundPage = __webpack_require__(39);
var _NotFoundPage2 = _interopRequireDefault(_NotFoundPage);
var _ErrorPage = __webpack_require__(33);
var _ErrorPage2 = _interopRequireDefault(_ErrorPage);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var routes = [__webpack_require__(53), __webpack_require__(51), __webpack_require__(55), __webpack_require__(57)]; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var router = new _Router2.default(function (on) {
on('*', function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(state, next) {
var component;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return next();
case 2:
component = _context.sent;
return _context.abrupt('return', component && _react2.default.createElement(
_App2.default,
{ context: state.context },
component
));
case 4:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function (_x, _x2) {
return _ref.apply(this, arguments);
};
}());
routes.forEach(function (route) {
on(route.path, route.action);
});
on('*', function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(state) {
var query, response, _ref3, data;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
query = '/graphql?query={content(path:"' + state.path + '"){path,title,content,component}}';
_context2.next = 3;
return (0, _fetch2.default)(query);
case 3:
response = _context2.sent;
_context2.next = 6;
return response.json();
case 6:
_ref3 = _context2.sent;
data = _ref3.data;
return _context2.abrupt('return', data && data.content && _react2.default.createElement(_ContentPage2.default, data.content));
case 9:
case 'end':
return _context2.stop();
}
}
}, _callee2, undefined);
}));
return function (_x3) {
return _ref2.apply(this, arguments);
};
}());
on('error', function (state, error) {
return state.statusCode === 404 ? _react2.default.createElement(
_App2.default,
{ context: state.context, error: error },
_react2.default.createElement(_NotFoundPage2.default, null)
) : _react2.default.createElement(
_App2.default,
{ context: state.context, error: error },
_react2.default.createElement(_ErrorPage2.default, null)
);
});
});
exports.default = router;
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Contact = __webpack_require__(84);
var _Contact2 = _interopRequireDefault(_Contact);
var _semanticUiReact = __webpack_require__(18);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
function Contact(_ref) {
var title = _ref.title;
return _react2.default.createElement(
'div',
{ className: _Contact2.default.root },
_react2.default.createElement(
'div',
{ className: _Contact2.default.container },
_react2.default.createElement(
'h1',
null,
title
),
_react2.default.createElement(
'p',
null,
'\u041C\u043E\u0439 \u0442\u0435\u0441\u044211155gggg5555'
),
_react2.default.createElement(
'div',
null,
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true },
'Standard'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'red' },
'Red'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'orange' },
'Orange'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'yellow' },
'Yellow'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'olive' },
'Olive'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'green' },
'Green'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'teal' },
'Teal'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'blue' },
'Blue'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'violet' },
'Violet'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'purple' },
'Purple'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'pink' },
'Pink'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'brown' },
'Brown'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'grey' },
'Grey'
),
_react2.default.createElement(
_semanticUiReact.Button,
{ basic: true, color: 'black' },
'Black'
)
)
)
);
}
Contact.propTypes = { title: _react.PropTypes.string.isRequired };
exports.default = (0, _withStyles2.default)(Contact, _Contact2.default);
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.action = exports.path = undefined;
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Contact = __webpack_require__(50);
var _Contact2 = _interopRequireDefault(_Contact);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var path = exports.path = '/contact';
var action = exports.action = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(state) {
var title;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
title = 'Связаться с нами';
state.context.onSetTitle(title);
return _context.abrupt('return', _react2.default.createElement(_Contact2.default, { title: title }));
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function action(_x) {
return _ref.apply(this, arguments);
};
}();
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Home = __webpack_require__(85);
var _Home2 = _interopRequireDefault(_Home);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Home(_ref) {
var news = _ref.news;
return _react2.default.createElement(
'div',
{ className: _Home2.default.root },
_react2.default.createElement(
'div',
{ className: _Home2.default.container },
_react2.default.createElement(
'h1',
{ className: _Home2.default.title },
'React.js News'
),
_react2.default.createElement(
'ul',
{ className: _Home2.default.news },
news.map(function (item, index) {
return _react2.default.createElement(
'li',
{ key: index, className: _Home2.default.newsItem },
_react2.default.createElement(
'a',
{ href: item.link, className: _Home2.default.newsTitle },
item.title
),
_react2.default.createElement('span', {
className: _Home2.default.newsDesc,
dangerouslySetInnerHTML: { __html: item.contentSnippet }
})
);
})
)
)
);
} /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
Home.propTypes = {
news: _react.PropTypes.arrayOf(_react.PropTypes.shape({
title: _react.PropTypes.string.isRequired,
link: _react.PropTypes.string.isRequired,
contentSnippet: _react.PropTypes.string
})).isRequired
};
exports.default = (0, _withStyles2.default)(Home, _Home2.default);
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.action = exports.path = undefined;
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Home = __webpack_require__(52);
var _Home2 = _interopRequireDefault(_Home);
var _fetch = __webpack_require__(14);
var _fetch2 = _interopRequireDefault(_fetch);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var path = exports.path = '/'; /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var action = exports.action = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(state) {
var response, _ref2, data;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _fetch2.default)('/graphql?query={news{title,link,contentSnippet}}');
case 2:
response = _context.sent;
_context.next = 5;
return response.json();
case 5:
_ref2 = _context.sent;
data = _ref2.data;
state.context.onSetTitle('React.js Starter Kit');
return _context.abrupt('return', _react2.default.createElement(_Home2.default, { news: data.news }));
case 9:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function action(_x) {
return _ref.apply(this, arguments);
};
}();
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Login = __webpack_require__(86);
var _Login2 = _interopRequireDefault(_Login);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Login(_ref) {
var title = _ref.title;
return _react2.default.createElement(
'div',
{ className: _Login2.default.root },
_react2.default.createElement(
'div',
{ className: _Login2.default.container },
_react2.default.createElement(
'h1',
null,
title
),
_react2.default.createElement(
'p',
null,
'...'
)
)
);
} /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
Login.propTypes = { title: _react.PropTypes.string.isRequired };
exports.default = (0, _withStyles2.default)(Login, _Login2.default);
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.action = exports.path = undefined;
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Login = __webpack_require__(54);
var _Login2 = _interopRequireDefault(_Login);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var path = exports.path = '/login';
var action = exports.action = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(state) {
var title;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
title = 'Log In';
state.context.onSetTitle(title);
return _context.abrupt('return', _react2.default.createElement(_Login2.default, { title: title }));
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function action(_x) {
return _ref.apply(this, arguments);
};
}();
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _withStyles = __webpack_require__(4);
var _withStyles2 = _interopRequireDefault(_withStyles);
var _Register = __webpack_require__(87);
var _Register2 = _interopRequireDefault(_Register);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Register(_ref) {
var title = _ref.title;
return _react2.default.createElement(
'div',
{ className: _Register2.default.root },
_react2.default.createElement(
'div',
{ className: _Register2.default.container },
_react2.default.createElement(
'h1',
null,
title
),
_react2.default.createElement(
'p',
null,
'...'
)
)
);
} /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
Register.propTypes = { title: _react.PropTypes.string.isRequired };
exports.default = (0, _withStyles2.default)(Register, _Register2.default);
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.action = exports.path = undefined;
var _regenerator = __webpack_require__(6);
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = __webpack_require__(5);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _Register = __webpack_require__(56);
var _Register2 = _interopRequireDefault(_Register);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
var path = exports.path = '/register';
var action = exports.action = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(state) {
var title;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
title = 'New User Registration';
state.context.onSetTitle(title);
return _context.abrupt('return', _react2.default.createElement(_Register2.default, { title: title }));
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function action(_x) {
return _ref.apply(this, arguments);
};
}();
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(109), __esModule: true };
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _promise = __webpack_require__(25);
var _promise2 = _interopRequireDefault(_promise);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (fn) {
return function () {
var gen = fn.apply(this, arguments);
return new _promise2.default(function (resolve, reject) {
function step(key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
return _promise2.default.resolve(value).then(function (value) {
return step("next", value);
}, function (err) {
return step("throw", err);
});
}
}
return step("next");
});
};
};
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _isIterable2 = __webpack_require__(95);
var _isIterable3 = _interopRequireDefault(_isIterable2);
var _getIterator2 = __webpack_require__(16);
var _getIterator3 = _interopRequireDefault(_getIterator2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if ((0, _isIterable3.default)(Object(arr))) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
// This method of obtaining a reference to the global object needs to be
// kept identical to the way it is obtained in runtime.js
var g =
typeof global === "object" ? global :
typeof window === "object" ? window :
typeof self === "object" ? self : this;
// Use `getOwnPropertyNames` because not all browsers support calling
// `hasOwnProperty` on the global `self` object in a worker. See #183.
var hadRuntime = g.regeneratorRuntime &&
Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
// Save the old regeneratorRuntime in case it needs to be restored later.
var oldRuntime = hadRuntime && g.regeneratorRuntime;
// Force reevalutation of runtime.js.
g.regeneratorRuntime = undefined;
module.exports = __webpack_require__(62);
if (hadRuntime) {
// Restore the original runtime.
g.regeneratorRuntime = oldRuntime;
} else {
// Remove the global property added by runtime.js.
try {
delete g.regeneratorRuntime;
} catch(e) {
g.regeneratorRuntime = undefined;
}
}
module.exports = { "default": module.exports, __esModule: true };
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {"use strict";
var _promise = __webpack_require__(25);
var _promise2 = _interopRequireDefault(_promise);
var _setPrototypeOf = __webpack_require__(99);
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
var _create = __webpack_require__(97);
var _create2 = _interopRequireDefault(_create);
var _typeof2 = __webpack_require__(106);
var _typeof3 = _interopRequireDefault(_typeof2);
var _iterator = __webpack_require__(101);
var _iterator2 = _interopRequireDefault(_iterator);
var _symbol = __webpack_require__(100);
var _symbol2 = _interopRequireDefault(_symbol);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the PATENTS file in
* the same directory.
*/
!function (global) {
"use strict";
var hasOwn = Object.prototype.hasOwnProperty;
var undefined; // More compressible than void 0.
var iteratorSymbol = typeof _symbol2.default === "function" && _iterator2.default || "@@iterator";
var inModule = ( false ? "undefined" : (0, _typeof3.default)(module)) === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
// If regeneratorRuntime is defined globally and we're in a module,
// make the exports object identical to regeneratorRuntime.
module.exports = runtime;
}
// Don't bother evaluating the rest of this file if the runtime was
// already defined globally.
return;
}
// Define the runtime globally (as expected by generated code) as either
// module.exports (if we're in a module) or a new, empty object.
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided, then outerFn.prototype instanceof Generator.
var generator = (0, _create2.default)((outerFn || Generator).prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
prototype[method] = function (arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor ? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
};
runtime.mark = function (genFun) {
if (_setPrototypeOf2.default) {
(0, _setPrototypeOf2.default)(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
}
genFun.prototype = (0, _create2.default)(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `value instanceof AwaitArgument` to determine if the yielded value is
// meant to be awaited. Some may consider the name of this method too
// cutesy, but they are curmudgeons.
runtime.awrap = function (arg) {
return new AwaitArgument(arg);
};
function AwaitArgument(arg) {
this.arg = arg;
}
function AsyncIterator(generator) {
// This invoke function is written in a style that assumes some
// calling function (or Promise) will handle exceptions.
function invoke(method, arg) {
var result = generator[method](arg);
var value = result.value;
return value instanceof AwaitArgument ? _promise2.default.resolve(value.arg).then(invokeNext, invokeThrow) : _promise2.default.resolve(value).then(function (unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// result for this iteration will be rejected with the same
// reason. Note that rejections of yielded Promises are not
// thrown back into the generator function, as is the case
// when an awaited Promise is rejected. This difference in
// behavior between yield and await is important, because it
// allows the consumer to decide what to do with the yielded
// rejection (swallow it and continue, manually .throw it back
// into the generator, abandon iteration, whatever). With
// await, by contrast, there is no opportunity to examine the
// rejection reason outside the generator function, so the
// only option is to throw it from the await expression, and
// let the generator function handle the exception.
result.value = unwrapped;
return result;
});
}
if ((typeof process === "undefined" ? "undefined" : (0, _typeof3.default)(process)) === "object" && process.domain) {
invoke = process.domain.bind(invoke);
}
var invokeNext = invoke.bind(generator, "next");
var invokeThrow = invoke.bind(generator, "throw");
var invokeReturn = invoke.bind(generator, "return");
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return invoke(method, arg);
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg) : new _promise2.default(function (resolve) {
resolve(callInvokeWithMethodAndArg());
});
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
runtime.async = function (innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
while (true) {
var delegate = context.delegate;
if (delegate) {
if (method === "return" || method === "throw" && delegate.iterator[method] === undefined) {
// A return or throw (when the delegate iterator has no throw
// method) always terminates the yield* loop.
context.delegate = null;
// If the delegate iterator has a return method, give it a
// chance to clean up.
var returnMethod = delegate.iterator["return"];
if (returnMethod) {
var record = tryCatch(returnMethod, delegate.iterator, arg);
if (record.type === "throw") {
// If the return method threw an exception, let that
// exception prevail over the original return or throw.
method = "throw";
arg = record.arg;
continue;
}
}
if (method === "return") {
// Continue with the outer return, now that the delegate
// iterator has been terminated.
continue;
}
}
var record = tryCatch(delegate.iterator[method], delegate.iterator, arg);
if (record.type === "throw") {
context.delegate = null;
// Like returning generator.throw(uncaught), but without the
// overhead of an extra function call.
method = "throw";
arg = record.arg;
continue;
}
// Delegate generator ran and handled its own exceptions so
// regardless of what the method was, we continue as if it is
// "next" with an undefined arg.
method = "next";
arg = undefined;
var info = record.arg;
if (info.done) {
context[delegate.resultName] = info.value;
context.next = delegate.nextLoc;
} else {
state = GenStateSuspendedYield;
return info;
}
context.delegate = null;
}
if (method === "next") {
context._sent = arg;
if (state === GenStateSuspendedYield) {
context.sent = arg;
} else {
context.sent = undefined;
}
} else if (method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw arg;
}
if (context.dispatchException(arg)) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
method = "next";
arg = undefined;
}
} else if (method === "return") {
context.abrupt("return", arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
var info = {
value: record.arg,
done: context.done
};
if (record.arg === ContinueSentinel) {
if (context.delegate && method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
arg = undefined;
}
} else {
return info;
}
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(arg) call above.
method = "throw";
arg = record.arg;
}
}
};
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[iteratorSymbol] = function () {
return this;
};
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1,
next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function reset(skipTempReset) {
this.prev = 0;
this.next = 0;
this.sent = undefined;
this.done = false;
this.delegate = null;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function stop() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function dispatchException(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function abrupt(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.next = finallyEntry.finallyLoc;
} else {
this.complete(record);
}
return ContinueSentinel;
},
complete: function complete(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" || record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = record.arg;
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
},
finish: function finish(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function _catch(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
return ContinueSentinel;
}
};
}(
// Among the various tricks for obtaining a reference to the global
// object, this seems to be the most reliable technique that does not
// use indirect eval (which violates Content Security Policy).
(typeof global === "undefined" ? "undefined" : (0, _typeof3.default)(global)) === "object" ? global : (typeof window === "undefined" ? "undefined" : (0, _typeof3.default)(window)) === "object" ? window : (typeof self === "undefined" ? "undefined" : (0, _typeof3.default)(self)) === "object" ? self : undefined);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(92)(module)))
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS and IE text size adjust after device orientation change,\n * without disabling user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\n * and Firefox.\n * Correct `block` display not defined for `main` in IE 11.\n */\n\narticle, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio, canvas, progress, video {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9/10.\n * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n */\n\n[hidden], template {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * Improve readability of focused elements when they are also in an\n * active/hover state.\n */\n\na:active, a:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n */\n\nb, strong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9/10.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow not hidden in IE 9/10/11.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode, kbd, pre, samp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n */\n\nbutton, input, optgroup, select, textarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton, select {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton, html input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled], html input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner, input::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"], input[type=\"radio\"] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\"number\"]::-webkit-inner-spin-button, input[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n */\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n -webkit-box-sizing: content-box;\n box-sizing: content-box; /* 2 */\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button, input[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9/10/11.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd, th {\n padding: 0;\n}\n\n/*! React Starter Kit | MIT License | https://www.reactstarterkit.com/ */\n\n/*\r\n * Colors\r\n * ========================================================================== */\n\n/* #222 */\n\n/* #404040 */\n\n/* #555 */\n\n/* #777 */\n\n/* #eee */\n\n/*\r\n * Typography\r\n * ========================================================================== */\n\n/*\r\n * Layout\r\n * ========================================================================== */\n\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\n\n/* Extra small screen / phone */\n\n/* Small screen / tablet */\n\n/* Medium screen / desktop */\n\n/* Large screen / wide desktop */\n\n/*\r\n * Animations\r\n * ========================================================================== */\n\n/*\r\n * Основные настройки\r\n * ========================================================================== */\n\n/*\n * Base styles\n * ========================================================================== */\n\nhtml {\n /* color: #222; */\n font-weight: 100;\n font-size: 1em; /* ~16px; */\n font-family: 'Segoe UI','HelveticaNeue-Light',sans-serif;\n line-height: 1.375; /* ~22px */\n}\n\nbody {\n color: #444;\n background: #F2F1ED;\n}\n\n/*\n * Remove text-shadow in selection highlight:\n * https://twitter.com/miketaylr/status/12228805301\n *\n * These selection rule sets have to be separate.\n * Customize the background color to match your design.\n */\n\n::-moz-selection {\n background: #b3d4fc;\n text-shadow: none;\n}\n\n::selection {\n background: #b3d4fc;\n text-shadow: none;\n}\n\n/*\n * A better looking default horizontal rule\n */\n\nhr {\n display: block;\n height: 1px;\n border: 0;\n border-top: 1px solid #ccc;\n margin: 1em 0;\n padding: 0;\n}\n\n/*\n * Remove the gap between audio, canvas, iframes,\n * images, videos and the bottom of their containers:\n * https://github.com/h5bp/html5-boilerplate/issues/440\n */\n\naudio, canvas, iframe, img, svg, video {\n vertical-align: middle;\n}\n\n/*\n * Remove default fieldset styles.\n */\n\nfieldset {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n/*\n * Allow only vertical resizing of textareas.\n */\n\ntextarea {\n resize: vertical;\n}\n\n/*\n * Browser upgrade prompt\n * ========================================================================== */\n\n.browserupgrade {\n margin: 0.2em 0;\n background: #ccc;\n color: #000;\n padding: 0.2em 0;\n}\n\n/*\n * Print styles\n * Inlined to avoid the additional HTTP request:\n * http://www.phpied.com/delay-loading-your-print-css/\n * ========================================================================== */\n\n@media print {\n *, *:before, *:after {\n background: transparent !important;\n color: #000 !important; /* Black prints faster: http://www.sanbeiji.com/archives/953 */\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a, a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n /*\n * Don't show links that are fragment identifiers,\n * or use the `javascript:` pseudo protocol\n */\n\n a[href^=\"#\"]:after, a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre, blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n /*\n * Printing Tables:\n * http://css-discuss.incutio.com/wiki/Printing_Tables\n */\n\n thead {\n display: table-header-group;\n }\n\n tr, img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p, h2, h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2, h3 {\n page-break-after: avoid;\n }\n}\n", "", {"version":3,"sources":["/./src/components/App/App.scss","/./node_modules/normalize.css/normalize.css","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH,4EAA4E;;AAE5E;;;;GAIG;;AAEH;EACE,wBAAwB,CAAC,OAAO;EAChC,2BAA2B,CAAC,OAAO;EACnC,+BAA+B,CAAC,OAAO;CACxC;;AAED;;GAEG;;AAEH;EACE,UAAU;CACX;;AAED;gFACgF;;AAEhF;;;;;GAKG;;AAEH;EAaE,eAAe;CAChB;;AAED;;;GAGG;;AAEH;EAIE,sBAAsB,CAAC,OAAO;EAC9B,yBAAyB,CAAC,OAAO;CAClC;;AAED;;;GAGG;;AAEH;EACE,cAAc;EACd,UAAU;CACX;;AAED;;;GAGG;;AAEH;EAEE,cAAc;CACf;;AAED;gFACgF;;AAEhF;;GAEG;;AAEH;EACE,8BAA8B;CAC/B;;AAED;;;GAGG;;AAEH;EAEE,WAAW;CACZ;;AAED;gFACgF;;AAEhF;;GAEG;;AAEH;EACE,0BAA0B;CAC3B;;AAED;;GAEG;;AAEH;EAEE,kBAAkB;CACnB;;AAED;;GAEG;;AAEH;EACE,mBAAmB;CACpB;;AAED;;;GAGG;;AAEH;EACE,eAAe;EACf,iBAAiB;CAClB;;AAED;;GAEG;;AAEH;EACE,iBAAiB;EACjB,YAAY;CACb;;AAED;;GAEG;;AAEH;EACE,eAAe;CAChB;;AAED;;GAEG;;AAEH;EAEE,eAAe;EACf,eAAe;EACf,mBAAmB;EACnB,yBAAyB;CAC1B;;AAED;EACE,YAAY;CACb;;AAED;EACE,gBAAgB;CACjB;;AAED;gFACgF;;AAEhF;;GAEG;;AAEH;EACE,UAAU;CACX;;AAED;;GAEG;;AAEH;EACE,iBAAiB;CAClB;;AAED;gFACgF;;AAEhF;;GAEG;;AAEH;EACE,iBAAiB;CAClB;;AAED;;GAEG;;AAEH;EACE,gCAAwB;UAAxB,wBAAwB;EACxB,UAAU;CACX;;AAED;;GAEG;;AAEH;EACE,eAAe;CAChB;;AAED;;GAEG;;AAEH;EAIE,kCAAkC;EAClC,eAAe;CAChB;;AAED;gFACgF;;AAEhF;;;GAGG;;AAEH;;;;;GAKG;;AAEH;EAKE,eAAe,CAAC,OAAO;EACvB,cAAc,CAAC,OAAO;EACtB,UAAU,CAAC,OAAO;CACnB;;AAED;;GAEG;;AAEH;EACE,kBAAkB;CACnB;;AAED;;;;;GAKG;;AAEH;EAEE,qBAAqB;CACtB;;AAED;;;;;;GAMG;;AAEH;EAIE,2BAA2B,CAAC,OAAO;EACnC,gBAAgB,CAAC,OAAO;CACzB;;AAED;;GAEG;;AAEH;EAEE,gBAAgB;CACjB;;AAED;;GAEG;;AAEH;EAEE,UAAU;EACV,WAAW;CACZ;;AAED;;;GAGG;;AAEH;EACE,oBAAoB;CACrB;;AAED;;;;;;GAMG;;AAEH;EAEE,+BAAuB;UAAvB,uBAAuB,CAAC,OAAO;EAC/B,WAAW,CAAC,OAAO;CACpB;;AAED;;;;GAIG;;AAEH;EAEE,aAAa;CACd;;AAED;;;GAGG;;AAEH;EACE,8BAA8B,CAAC,OAAO;EACtC,gCAAwB;UAAxB,wBAAwB,CAAC,OAAO;CACjC;;AAED;;;;GAIG;;AAEH;EAEE,yBAAyB;CAC1B;;AAED;;GAEG;;AAEH;EACE,0BAA0B;EAC1B,cAAc;EACd,+BAA+B;CAChC;;AAED;;;GAGG;;AAEH;EACE,UAAU,CAAC,OAAO;EAClB,WAAW,CAAC,OAAO;CACpB;;AAED;;GAEG;;AAEH;EACE,eAAe;CAChB;;AAED;;;GAGG;;AAEH;EACE,kBAAkB;CACnB;;AAED;gFACgF;;AAEhF;;GAEG;;AAEH;EACE,0BAA0B;EAC1B,kBAAkB;CACnB;;AAED;EAEE,WAAW;CACZ;;AD5ZD,yEAAyE;;AEXzE;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AFzBhF;;gFAEgF;;AAEhF;EACE,kBAAkB;EAClB,iBAAiB;EACjB,eAAe,CAAC,YAAY;EAC5B,yDAA+B;EAC/B,mBAAmB,CAAC,WAAW;CAChC;;AAED;EACE,YAAc;EACd,oBAAwB;CACzB;;AAED;;;;;;GAMG;;AAEH;EACE,oBAAoB;EACpB,kBAAkB;CACnB;;AAED;EACE,oBAAoB;EACpB,kBAAkB;CACnB;;AAED;;GAEG;;AAEH;EACE,eAAe;EACf,YAAY;EACZ,UAAU;EACV,2BAA2B;EAC3B,cAAc;EACd,WAAW;CACZ;;AAED;;;;GAIG;;AAEH;EAME,uBAAuB;CACxB;;AAED;;GAEG;;AAEH;EACE,UAAU;EACV,UAAU;EACV,WAAW;CACZ;;AAED;;GAEG;;AAEH;EACE,iBAAiB;CAClB;;AAED;;gFAEgF;;AAEhF;EACE,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAClB;;AAED;;;;gFAIgF;;AAEhF;EACE;IAGE,mCAAmC;IACnC,uBAAuB,CAAC,+DAA+D;IACvF,oCAA4B;YAA5B,4BAA4B;IAC5B,6BAA6B;GAC9B;;EAED;IAEE,2BAA2B;GAC5B;;EAED;IACE,6BAA6B;GAC9B;;EAED;IACE,8BAA8B;GAC/B;;EAED;;;KAGG;;EAEH;IAEE,YAAY;GACb;;EAED;IAEE,uBAAuB;IACvB,yBAAyB;GAC1B;;EAED;;;KAGG;;EAEH;IACE,4BAA4B;GAC7B;;EAED;IAEE,yBAAyB;GAC1B;;EAED;IACE,2BAA2B;GAC5B;;EAED;IAGE,WAAW;IACX,UAAU;GACX;;EAED;IAEE,wBAAwB;GACzB;CACF","file":"App.scss","sourcesContent":["/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n@import '../../../node_modules/normalize.css/normalize.css';\n\n/*! React Starter Kit | MIT License | https://www.reactstarterkit.com/ */\n\n@import '../variables.scss';\n\n/*\n * Base styles\n * ========================================================================== */\n\nhtml {\n /* color: #222; */\n font-weight: 100;\n font-size: 1em; /* ~16px; */\n font-family: $font-family-base;\n line-height: 1.375; /* ~22px */\n}\n\nbody {\n color: $color;\n background: $background;\n}\n\n/*\n * Remove text-shadow in selection highlight:\n * https://twitter.com/miketaylr/status/12228805301\n *\n * These selection rule sets have to be separate.\n * Customize the background color to match your design.\n */\n\n::-moz-selection {\n background: #b3d4fc;\n text-shadow: none;\n}\n\n::selection {\n background: #b3d4fc;\n text-shadow: none;\n}\n\n/*\n * A better looking default horizontal rule\n */\n\nhr {\n display: block;\n height: 1px;\n border: 0;\n border-top: 1px solid #ccc;\n margin: 1em 0;\n padding: 0;\n}\n\n/*\n * Remove the gap between audio, canvas, iframes,\n * images, videos and the bottom of their containers:\n * https://github.com/h5bp/html5-boilerplate/issues/440\n */\n\naudio,\ncanvas,\niframe,\nimg,\nsvg,\nvideo {\n vertical-align: middle;\n}\n\n/*\n * Remove default fieldset styles.\n */\n\nfieldset {\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n/*\n * Allow only vertical resizing of textareas.\n */\n\ntextarea {\n resize: vertical;\n}\n\n/*\n * Browser upgrade prompt\n * ========================================================================== */\n\n:global(.browserupgrade) {\n margin: 0.2em 0;\n background: #ccc;\n color: #000;\n padding: 0.2em 0;\n}\n\n/*\n * Print styles\n * Inlined to avoid the additional HTTP request:\n * http://www.phpied.com/delay-loading-your-print-css/\n * ========================================================================== */\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; /* Black prints faster: http://www.sanbeiji.com/archives/953 */\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n /*\n * Don't show links that are fragment identifiers,\n * or use the `javascript:` pseudo protocol\n */\n\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n /*\n * Printing Tables:\n * http://css-discuss.incutio.com/wiki/Printing_Tables\n */\n\n thead {\n display: table-header-group;\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n}\n","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS and IE text size adjust after device orientation change,\n * without disabling user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\n * and Firefox.\n * Correct `block` display not defined for `main` in IE 11.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9/10.\n * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * Improve readability of focused elements when they are also in an\n * active/hover state.\n */\n\na:active,\na:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n */\n\nb,\nstrong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9/10.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow not hidden in IE 9/10/11.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n */\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n box-sizing: content-box; /* 2 */\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9/10/11.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n/* #222 */\r\n\r\n/* #404040 */\r\n\r\n/* #555 */\r\n\r\n/* #777 */\r\n\r\n/* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n/* Extra small screen / phone */\r\n\r\n/* Small screen / tablet */\r\n\r\n/* Medium screen / desktop */\r\n\r\n/* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n.ContentPage_root_9Fj {\r\n background: #F2F1ED;\r\n}\r\n\r\n.ContentPage_container_2WS {\r\n margin: 0 auto;\r\n padding: 0 0 40px;\r\n max-width: 1000px;\r\n}\r\n", "", {"version":3,"sources":["/./src/components/ContentPage/ContentPage.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,oBAAoB;CACrB;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;CAC/B","file":"ContentPage.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n@import '../variables.scss';\r\n\r\n.root {\r\n background: #F2F1ED;\r\n}\r\n\r\n.container {\r\n margin: 0 auto;\r\n padding: 0 0 40px;\r\n max-width: $max-content-width;\r\n}\r\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "ContentPage_root_9Fj",
"container": "ContentPage_container_2WS"
};
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n* {\r\n margin: 0;\r\n line-height: 1.2;\r\n}\r\n\r\nhtml {\r\n display: table;\r\n width: 100%;\r\n height: 100%;\r\n color: #888;\r\n text-align: center;\r\n font-family: sans-serif;\r\n}\r\n\r\nbody {\r\n display: table-cell;\r\n margin: 2em auto;\r\n vertical-align: middle;\r\n}\r\n\r\nh1 {\r\n color: #555;\r\n font-weight: 400;\r\n font-size: 2em;\r\n}\r\n\r\np {\r\n margin: 0 auto;\r\n width: 280px;\r\n}\r\n\r\n@media only screen and (max-width: 280px) {\r\n\r\n body, p {\r\n width: 95%;\r\n }\r\n\r\n h1 {\r\n font-size: 1.5em;\r\n margin: 0 0 0.3em;\r\n\r\n }\r\n\r\n}\r\n", "", {"version":3,"sources":["/./src/components/ErrorPage/ErrorPage.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;AAEH;EACE,UAAU;EACV,iBAAiB;CAClB;;AAED;EACE,eAAe;EACf,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,mBAAmB;EACnB,wBAAwB;CACzB;;AAED;EACE,oBAAoB;EACpB,iBAAiB;EACjB,uBAAuB;CACxB;;AAED;EACE,YAAY;EACZ,iBAAiB;EACjB,eAAe;CAChB;;AAED;EACE,eAAe;EACf,aAAa;CACd;;AAED;;EAEE;IACE,WAAW;GACZ;;EAED;IACE,iBAAiB;IACjB,kBAAkB;;GAEnB;;CAEF","file":"ErrorPage.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n* {\r\n margin: 0;\r\n line-height: 1.2;\r\n}\r\n\r\nhtml {\r\n display: table;\r\n width: 100%;\r\n height: 100%;\r\n color: #888;\r\n text-align: center;\r\n font-family: sans-serif;\r\n}\r\n\r\nbody {\r\n display: table-cell;\r\n margin: 2em auto;\r\n vertical-align: middle;\r\n}\r\n\r\nh1 {\r\n color: #555;\r\n font-weight: 400;\r\n font-size: 2em;\r\n}\r\n\r\np {\r\n margin: 0 auto;\r\n width: 280px;\r\n}\r\n\r\n@media only screen and (max-width: 280px) {\r\n\r\n body, p {\r\n width: 95%;\r\n }\r\n\r\n h1 {\r\n font-size: 1.5em;\r\n margin: 0 0 0.3em;\r\n\r\n }\r\n\r\n}\r\n"],"sourceRoot":"webpack://"}]);
// exports
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n/* #222 */\r\n\r\n/* #404040 */\r\n\r\n/* #555 */\r\n\r\n/* #777 */\r\n\r\n/* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n/* Extra small screen / phone */\r\n\r\n/* Small screen / tablet */\r\n\r\n/* Medium screen / desktop */\r\n\r\n/* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n.Feedback_root_BQQ {\r\n background: #f5f5f5;\r\n color: #333;\r\n}\r\n\r\n.Feedback_container_Te7 {\r\n margin: 0 auto;\r\n padding: 20px 8px;\r\n max-width: 1000px;\r\n text-align: center;\r\n font-size: 1.5em; /* ~24px */\r\n}\r\n\r\n.Feedback_link_1_D, .Feedback_link_1_D:active, .Feedback_link_1_D:hover, .Feedback_link_1_D:visited {\r\n color: #333;\r\n text-decoration: none;\r\n}\r\n\r\n.Feedback_link_1_D:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.Feedback_spacer_39X {\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n}\r\n", "", {"version":3,"sources":["/./src/components/Feedback/Feedback.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,oBAAoB;EACpB,YAAY;CACb;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;EAC9B,mBAAmB;EACnB,iBAAiB,CAAC,WAAW;CAC9B;;AAED;EAIE,YAAY;EACZ,sBAAsB;CACvB;;AAED;EACE,2BAA2B;CAC5B;;AAED;EACE,oBAAoB;EACpB,mBAAmB;CACpB","file":"Feedback.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n@import '../variables.scss';\r\n\r\n.root {\r\n background: #f5f5f5;\r\n color: #333;\r\n}\r\n\r\n.container {\r\n margin: 0 auto;\r\n padding: 20px 8px;\r\n max-width: $max-content-width;\r\n text-align: center;\r\n font-size: 1.5em; /* ~24px */\r\n}\r\n\r\n.link,\r\n.link:active,\r\n.link:hover,\r\n.link:visited {\r\n color: #333;\r\n text-decoration: none;\r\n}\r\n\r\n.link:hover {\r\n text-decoration: underline;\r\n}\r\n\r\n.spacer {\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n}\r\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Feedback_root_BQQ",
"container": "Feedback_container_Te7",
"link": "Feedback_link_1_D",
"spacer": "Feedback_spacer_39X"
};
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n/* #222 */\r\n\r\n/* #404040 */\r\n\r\n/* #555 */\r\n\r\n/* #777 */\r\n\r\n/* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n/* Extra small screen / phone */\r\n\r\n/* Small screen / tablet */\r\n\r\n/* Medium screen / desktop */\r\n\r\n/* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n.Footer_root_2bW {\r\n background: #333;\r\n color: #fff;\r\n}\r\n\r\n.Footer_container_2UR {\r\n margin: 0 auto;\r\n padding: 20px 15px;\r\n max-width: 1000px;\r\n text-align: center;\r\n}\r\n\r\n.Footer_text_3NI {\r\n color: rgba(255, 255, 255, .5);\r\n}\r\n\r\n.Footer_textMuted_1Me {\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n\r\n.Footer_spacer_22t {\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n\r\n.Footer_text_3NI, .Footer_link_wim {\r\n padding: 2px 5px;\r\n font-size: 1em;\r\n}\r\n\r\n.Footer_link_wim, .Footer_link_wim:active, .Footer_link_wim:visited {\r\n color: rgba(255, 255, 255, .6);\r\n text-decoration: none;\r\n}\r\n\r\n.Footer_link_wim:hover {\r\n color: rgba(255, 255, 255, 1);\r\n}\r\n", "", {"version":3,"sources":["/./src/components/Footer/Footer.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,iBAAiB;EACjB,YAAY;CACb;;AAED;EACE,eAAe;EACf,mBAAmB;EACnB,kBAA8B;EAC9B,mBAAmB;CACpB;;AAED;EACE,+BAA+B;CAChC;;AAED;EAEE,+BAA+B;CAChC;;AAED;EACE,+BAA+B;CAChC;;AAED;EAEE,iBAAiB;EACjB,eAAe;CAChB;;AAED;EAGE,+BAA+B;EAC/B,sBAAsB;CACvB;;AAED;EACE,8BAA8B;CAC/B","file":"Footer.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n@import '../variables.scss';\r\n\r\n.root {\r\n background: #333;\r\n color: #fff;\r\n}\r\n\r\n.container {\r\n margin: 0 auto;\r\n padding: 20px 15px;\r\n max-width: $max-content-width;\r\n text-align: center;\r\n}\r\n\r\n.text {\r\n color: rgba(255, 255, 255, .5);\r\n}\r\n\r\n.textMuted {\r\n composes: text;\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n\r\n.spacer {\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n\r\n.text,\r\n.link {\r\n padding: 2px 5px;\r\n font-size: 1em;\r\n}\r\n\r\n.link,\r\n.link:active,\r\n.link:visited {\r\n color: rgba(255, 255, 255, .6);\r\n text-decoration: none;\r\n}\r\n\r\n.link:hover {\r\n color: rgba(255, 255, 255, 1);\r\n}\r\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Footer_root_2bW",
"container": "Footer_container_2UR",
"text": "Footer_text_3NI",
"textMuted": "Footer_textMuted_1Me Footer_text_3NI",
"spacer": "Footer_spacer_22t",
"link": "Footer_link_wim"
};
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n/* #222 */\r\n\r\n/* #404040 */\r\n\r\n/* #555 */\r\n\r\n/* #777 */\r\n\r\n/* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n/* Extra small screen / phone */\r\n\r\n/* Small screen / tablet */\r\n\r\n/* Medium screen / desktop */\r\n\r\n/* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n.Header_root_1Mv {\r\n background: #fff;\r\n color: #444;\r\n}\r\n\r\n.Header_container_1jj {\r\n margin: 0 auto;\r\n padding: 20px 0;\r\n max-width: 1000px;\r\n}\r\n\r\n.Header_brand_3Km {\r\n color: rgb(94, 94, 94);\r\n text-decoration: none;\r\n font-size: 1.75em; /* ~28px */\r\n}\r\n\r\n.Header_brandTxt_fin {\r\n margin-left: 10px;\r\n}\r\n\r\n.Header_nav_3h2 {\r\n float: right;\r\n margin-top: 6px;\r\n}\r\n\r\n.Header_banner_3Ep {\r\n text-align: center;\r\n}\r\n\r\n.Header_bannerTitle_313 {\r\n margin: 0;\r\n padding: 10px;\r\n font-weight: normal;\r\n font-size: 4em;\r\n line-height: 1em;\r\n}\r\n\r\n.Header_bannerDesc_3Bf {\r\n padding: 0;\r\n color: rgba(255, 255, 255, .5);\r\n font-size: 1.25em;\r\n margin: 0;\r\n}\r\n", "", {"version":3,"sources":["/./src/components/Header/Header.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD3BhF;EACE,iBAAiB;EACjB,YAAY;CACb;;AAED;EACE,eAAe;EACf,gBAAgB;EAChB,kBAA8B;CAC/B;;AAED;EACE,uBAA2C;EAC3C,sBAAsB;EACtB,kBAAkB,CAAC,WAAW;CAC/B;;AAED;EACE,kBAAkB;CACnB;;AAED;EACE,aAAa;EACb,gBAAgB;CACjB;;AAED;EACE,mBAAmB;CACpB;;AAED;EACE,UAAU;EACV,cAAc;EACd,oBAAoB;EACpB,eAAe;EACf,iBAAiB;CAClB;;AAED;EACE,WAAW;EACX,+BAA+B;EAC/B,kBAAkB;EAClB,UAAU;CACX","file":"Header.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n@import '../variables.scss';\r\n\r\n$brand-color: #444;\r\n\r\n.root {\r\n background: #fff;\r\n color: #444;\r\n}\r\n\r\n.container {\r\n margin: 0 auto;\r\n padding: 20px 0;\r\n max-width: $max-content-width;\r\n}\r\n\r\n.brand {\r\n color: color($brand-color lightness(+10%));\r\n text-decoration: none;\r\n font-size: 1.75em; /* ~28px */\r\n}\r\n\r\n.brandTxt {\r\n margin-left: 10px;\r\n}\r\n\r\n.nav {\r\n float: right;\r\n margin-top: 6px;\r\n}\r\n\r\n.banner {\r\n text-align: center;\r\n}\r\n\r\n.bannerTitle {\r\n margin: 0;\r\n padding: 10px;\r\n font-weight: normal;\r\n font-size: 4em;\r\n line-height: 1em;\r\n}\r\n\r\n.bannerDesc {\r\n padding: 0;\r\n color: rgba(255, 255, 255, .5);\r\n font-size: 1.25em;\r\n margin: 0;\r\n}\r\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Header_root_1Mv",
"container": "Header_container_1jj",
"brand": "Header_brand_3Km",
"brandTxt": "Header_brandTxt_fin",
"nav": "Header_nav_3h2",
"banner": "Header_banner_3Ep",
"bannerTitle": "Header_bannerTitle_313",
"bannerDesc": "Header_bannerDesc_3Bf"
};
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n.Navigation_root_1Ac {\r\n\r\n}\r\n\r\n.Navigation_link_mRw {\r\n display: inline-block;\r\n padding: 3px 8px;\r\n text-decoration: none;\r\n font-size: 1.125em; /* ~18px */\r\n}\r\n\r\n.Navigation_link_mRw, .Navigation_link_mRw:active, .Navigation_link_mRw:visited {\r\n color: rgba(255, 255, 255, .6);\r\n}\r\n\r\n.Navigation_link_mRw:hover {\r\n color: rgba(255, 255, 255, 1);\r\n}\r\n\r\n.Navigation_highlight_1Uj {\r\n margin-right: 8px;\r\n margin-left: 8px;\r\n border-radius: 3px;\r\n background: rgba(0, 0, 0, .15);\r\n color: #fff;\r\n}\r\n\r\n.Navigation_highlight_1Uj:hover {\r\n background: rgba(0, 0, 0, .3);\r\n}\r\n\r\n.Navigation_spacer_11z {\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n", "", {"version":3,"sources":["/./src/components/Navigation/Navigation.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;AAEH;;CAEC;;AAED;EACE,sBAAsB;EACtB,iBAAiB;EACjB,sBAAsB;EACtB,mBAAmB,CAAC,WAAW;CAChC;;AAED;EAGE,+BAA+B;CAChC;;AAED;EACE,8BAA8B;CAC/B;;AAED;EACE,kBAAkB;EAClB,iBAAiB;EACjB,mBAAmB;EACnB,+BAA+B;EAC/B,YAAY;CACb;;AAED;EACE,8BAA8B;CAC/B;;AAED;EACE,+BAA+B;CAChC","file":"Navigation.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n.root {\r\n\r\n}\r\n\r\n.link {\r\n display: inline-block;\r\n padding: 3px 8px;\r\n text-decoration: none;\r\n font-size: 1.125em; /* ~18px */\r\n}\r\n\r\n.link,\r\n.link:active,\r\n.link:visited {\r\n color: rgba(255, 255, 255, .6);\r\n}\r\n\r\n.link:hover {\r\n color: rgba(255, 255, 255, 1);\r\n}\r\n\r\n.highlight {\r\n margin-right: 8px;\r\n margin-left: 8px;\r\n border-radius: 3px;\r\n background: rgba(0, 0, 0, .15);\r\n color: #fff;\r\n}\r\n\r\n.highlight:hover {\r\n background: rgba(0, 0, 0, .3);\r\n}\r\n\r\n.spacer {\r\n color: rgba(255, 255, 255, .3);\r\n}\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Navigation_root_1Ac",
"link": "Navigation_link_mRw",
"highlight": "Navigation_highlight_1Uj",
"spacer": "Navigation_spacer_11z"
};
/***/ },
/* 70 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n* {\r\n margin: 0;\r\n line-height: 1.2;\r\n}\r\n\r\nhtml {\r\n display: table;\r\n width: 100%;\r\n height: 100%;\r\n color: #888;\r\n text-align: center;\r\n font-family: sans-serif;\r\n}\r\n\r\nbody {\r\n display: table-cell;\r\n margin: 2em auto;\r\n vertical-align: middle;\r\n}\r\n\r\nh1 {\r\n color: #555;\r\n font-weight: 400;\r\n font-size: 2em;\r\n}\r\n\r\np {\r\n margin: 0 auto;\r\n width: 280px;\r\n}\r\n\r\n@media only screen and (max-width: 280px) {\r\n\r\n body, p {\r\n width: 95%;\r\n }\r\n\r\n h1 {\r\n font-size: 1.5em;\r\n margin: 0 0 0.3em;\r\n }\r\n\r\n}\r\n", "", {"version":3,"sources":["/./src/components/NotFoundPage/NotFoundPage.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;AAEH;EACE,UAAU;EACV,iBAAiB;CAClB;;AAED;EACE,eAAe;EACf,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,mBAAmB;EACnB,wBAAwB;CACzB;;AAED;EACE,oBAAoB;EACpB,iBAAiB;EACjB,uBAAuB;CACxB;;AAED;EACE,YAAY;EACZ,iBAAiB;EACjB,eAAe;CAChB;;AAED;EACE,eAAe;EACf,aAAa;CACd;;AAED;;EAEE;IACE,WAAW;GACZ;;EAED;IACE,iBAAiB;IACjB,kBAAkB;GACnB;;CAEF","file":"NotFoundPage.scss","sourcesContent":["/**\r\n * React Starter Kit (https://www.reactstarterkit.com/)\r\n *\r\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n* {\r\n margin: 0;\r\n line-height: 1.2;\r\n}\r\n\r\nhtml {\r\n display: table;\r\n width: 100%;\r\n height: 100%;\r\n color: #888;\r\n text-align: center;\r\n font-family: sans-serif;\r\n}\r\n\r\nbody {\r\n display: table-cell;\r\n margin: 2em auto;\r\n vertical-align: middle;\r\n}\r\n\r\nh1 {\r\n color: #555;\r\n font-weight: 400;\r\n font-size: 2em;\r\n}\r\n\r\np {\r\n margin: 0 auto;\r\n width: 280px;\r\n}\r\n\r\n@media only screen and (max-width: 280px) {\r\n\r\n body, p {\r\n width: 95%;\r\n }\r\n\r\n h1 {\r\n font-size: 1.5em;\r\n margin: 0 0 0.3em;\r\n }\r\n\r\n}\r\n"],"sourceRoot":"webpack://"}]);
// exports
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n/*\r\n * Colors\r\n * ========================================================================== */\n\n/* #222 */\n\n/* #404040 */\n\n/* #555 */\n\n/* #777 */\n\n/* #eee */\n\n/*\r\n * Typography\r\n * ========================================================================== */\n\n/*\r\n * Layout\r\n * ========================================================================== */\n\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\n\n/* Extra small screen / phone */\n\n/* Small screen / tablet */\n\n/* Medium screen / desktop */\n\n/* Large screen / wide desktop */\n\n/*\r\n * Animations\r\n * ========================================================================== */\n\n/*\r\n * Основные настройки\r\n * ========================================================================== */\n\n.Contact_root_8Bk {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.Contact_container_OAH {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: 1000px;\n}\n", "", {"version":3,"sources":["/./src/routes/contact/Contact.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,mBAAmB;EACnB,oBAAoB;CACrB;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;CAC/B","file":"Contact.scss","sourcesContent":["/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n@import '../../components/variables.scss';\n\n.root {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.container {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: $max-content-width;\n}\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Contact_root_8Bk",
"container": "Contact_container_OAH"
};
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n/*\r\n * Colors\r\n * ========================================================================== */\n\n/* #222 */\n\n/* #404040 */\n\n/* #555 */\n\n/* #777 */\n\n/* #eee */\n\n/*\r\n * Typography\r\n * ========================================================================== */\n\n/*\r\n * Layout\r\n * ========================================================================== */\n\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\n\n/* Extra small screen / phone */\n\n/* Small screen / tablet */\n\n/* Medium screen / desktop */\n\n/* Large screen / wide desktop */\n\n/*\r\n * Animations\r\n * ========================================================================== */\n\n/*\r\n * Основные настройки\r\n * ========================================================================== */\n\n.Home_root_2lG {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.Home_container_2tH {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: 1000px;\n}\n\n.Home_news_R5l {\n padding: 0;\n}\n\n.Home_newsItem_3sI {\n list-style-type: none;\n padding-bottom: 6px;\n}\n\n.Home_newsTitle_3Un {\n font-size: 1.125em;\n}\n\n.Home_newsTitle_3Un, .Home_newsDesc_tSl {\n display: block;\n}\n", "", {"version":3,"sources":["/./src/routes/home/Home.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,mBAAmB;EACnB,oBAAoB;CACrB;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;CAC/B;;AAED;EACE,WAAW;CACZ;;AAED;EACE,sBAAsB;EACtB,oBAAoB;CACrB;;AAED;EACE,mBAAmB;CACpB;;AAED;EACE,eAAe;CAChB","file":"Home.scss","sourcesContent":["/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n@import '../../components/variables.scss';\n\n.root {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.container {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: $max-content-width;\n}\n\n.news {\n padding: 0;\n}\n\n.newsItem {\n list-style-type: none;\n padding-bottom: 6px;\n}\n\n.newsTitle {\n font-size: 1.125em;\n}\n\n.newsTitle, .newsDesc {\n display: block;\n}\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Home_root_2lG",
"container": "Home_container_2tH",
"news": "Home_news_R5l",
"newsItem": "Home_newsItem_3sI",
"newsTitle": "Home_newsTitle_3Un",
"newsDesc": "Home_newsDesc_tSl"
};
/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n/*\r\n * Colors\r\n * ========================================================================== */\n\n/* #222 */\n\n/* #404040 */\n\n/* #555 */\n\n/* #777 */\n\n/* #eee */\n\n/*\r\n * Typography\r\n * ========================================================================== */\n\n/*\r\n * Layout\r\n * ========================================================================== */\n\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\n\n/* Extra small screen / phone */\n\n/* Small screen / tablet */\n\n/* Medium screen / desktop */\n\n/* Large screen / wide desktop */\n\n/*\r\n * Animations\r\n * ========================================================================== */\n\n/*\r\n * Основные настройки\r\n * ========================================================================== */\n\n.Login_root_2P3 {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.Login_container_2r7 {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: 1000px;\n}\n", "", {"version":3,"sources":["/./src/routes/login/Login.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,mBAAmB;EACnB,oBAAoB;CACrB;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;CAC/B","file":"Login.scss","sourcesContent":["/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n@import '../../components/variables.scss';\n\n.root {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.container {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: $max-content-width;\n}\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Login_root_2P3",
"container": "Login_container_2r7"
};
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(2)();
// imports
// module
exports.push([module.id, "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n/*\r\n * Colors\r\n * ========================================================================== */\n\n/* #222 */\n\n/* #404040 */\n\n/* #555 */\n\n/* #777 */\n\n/* #eee */\n\n/*\r\n * Typography\r\n * ========================================================================== */\n\n/*\r\n * Layout\r\n * ========================================================================== */\n\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\n\n/* Extra small screen / phone */\n\n/* Small screen / tablet */\n\n/* Medium screen / desktop */\n\n/* Large screen / wide desktop */\n\n/*\r\n * Animations\r\n * ========================================================================== */\n\n/*\r\n * Основные настройки\r\n * ========================================================================== */\n\n.Register_root_3XX {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.Register_container_2IL {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: 1000px;\n}\n", "", {"version":3,"sources":["/./src/routes/register/Register.scss","/./src/components/variables.scss"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;ACPH;;gFAEgF;;AAGxB,UAAU;;AACV,aAAa;;AACb,UAAU;;AACV,UAAU;;AACV,UAAU;;AAElE;;gFAEgF;;AAIhF;;gFAEgF;;AAIhF;;gFAEgF;;AAEhD,gCAAgC;;AAChC,2BAA2B;;AAC3B,6BAA6B;;AAC7B,iCAAiC;;AAEjE;;gFAEgF;;AAIhF;;gFAEgF;;AD7BhF;EACE,mBAAmB;EACnB,oBAAoB;CACrB;;AAED;EACE,eAAe;EACf,kBAAkB;EAClB,kBAA8B;CAC/B","file":"Register.scss","sourcesContent":["/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\n@import '../../components/variables.scss';\n\n.root {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.container {\n margin: 0 auto;\n padding: 0 0 40px;\n max-width: $max-content-width;\n}\n","/*\r\n * Colors\r\n * ========================================================================== */\r\n\r\n$white-base: hsl(255, 255, 255);\r\n$gray-darker: color(black lightness(+13.5%)); /* #222 */\r\n$gray-dark: color(black lightness(+25%)); /* #404040 */\r\n$gray: color(black lightness(+33.5%)); /* #555 */\r\n$gray-light: color(black lightness(+46.7%)); /* #777 */\r\n$gray-lighter: color(black lightness(+93.5%)); /* #eee */\r\n\r\n/*\r\n * Typography\r\n * ========================================================================== */\r\n\r\n$font-family-base: 'Segoe UI', 'HelveticaNeue-Light', sans-serif;\r\n\r\n/*\r\n * Layout\r\n * ========================================================================== */\r\n\r\n$max-content-width: 1000px;\r\n\r\n/*\r\n * Media queries breakpoints\r\n * ========================================================================== */\r\n\r\n$screen-xs-min: 480px; /* Extra small screen / phone */\r\n$screen-sm-min: 768px; /* Small screen / tablet */\r\n$screen-md-min: 992px; /* Medium screen / desktop */\r\n$screen-lg-min: 1200px; /* Large screen / wide desktop */\r\n\r\n/*\r\n * Animations\r\n * ========================================================================== */\r\n\r\n$animation-swift-out: .45s cubic-bezier(0.3, 1, 0.4, 1) 0s;\r\n\r\n/*\r\n * Основные настройки\r\n * ========================================================================== */\r\n\r\n $background: #F2F1ED;\r\n $color: #444;\r\n"],"sourceRoot":"webpack://"}]);
// exports
exports.locals = {
"root": "Register_root_3XX",
"container": "Register_container_2IL"
};
/***/ },
/* 75 */
/***/ function(module, exports) {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(63);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./App.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./App.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(64);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./ContentPage.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./ContentPage.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(65);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./ErrorPage.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./ErrorPage.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(66);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Feedback.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Feedback.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(67);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Footer.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Footer.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(68);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Header.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Header.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(69);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Navigation.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Navigation.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(70);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./NotFoundPage.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./NotFoundPage.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(71);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Contact.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Contact.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(72);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Home.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Home.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(73);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Login.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Login.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
var content = __webpack_require__(74);
var insertCss = __webpack_require__(3);
if (typeof content === 'string') {
content = [[module.id, content, '']];
}
module.exports = content.locals || {};
module.exports._getCss = function() { return content.toString(); };
module.exports._insertCss = insertCss.bind(null, content);
var removeCss = function() {};
// Hot Module Replacement
// https://webpack.github.io/docs/hot-module-replacement
// Only activated in browser context
if (false) {
module.hot.accept("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Register.scss", function() {
var newContent = require("!!./../../../node_modules/css-loader/index.js?sourceMap&modules&localIdentName=[name]_[local]_[hash:base64:3]!./../../../node_modules/postcss-loader/index.js?parser=postcss-scss!./Register.scss");
if (typeof newContent === 'string') {
newContent = [[module.id, content, '']];
}
removeCss = insertCss(newContent, { replace: true });
});
module.hot.dispose(function() { removeCss(); });
}
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(23);
module.exports = function template(locals) {
var jade_debug = [ new jade.DebugItem( 1, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ) ];
try {
var buf = [];
var jade_mixins = {};
var jade_interp;
;var locals_for_with = (locals || {});(function (stack) {
jade_debug.unshift(new jade.DebugItem( 0, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
jade_debug.unshift(new jade.DebugItem( 1, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<!DOCTYPE html>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 2, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<html lang=\"ru\">");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 3, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<head>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 4, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<meta charset=\"utf-8\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 5, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<title>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 5, jade_debug[0].filename ));
buf.push("Internal Server Error");
jade_debug.shift();
jade_debug.shift();
buf.push("</title>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 6, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 7, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<style>");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("* {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" line-height: 1.2;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" margin: 0;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("html {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" color: #888;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" display: table;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" font-family: sans-serif;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" height: 100%;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" text-align: center;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" width: 100%;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("body {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" display: table-cell;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" vertical-align: middle;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" margin: 2em auto;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("h1 {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" color: #555;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" font-size: 2em;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" font-weight: 400;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("p {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" margin: 0 auto;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" width: 280px;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("pre {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" text-align: left;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" max-width: 1000px;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" margin: 0 auto;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("@media only screen and (max-width: 280px) {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" body, p {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" width: 95%;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" }");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" h1 {");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" font-size: 1.5em;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" margin: 0 0 0.3em;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push(" }");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("}");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 58, jade_debug[0].filename ));
buf.push("");
jade_debug.shift();
jade_debug.shift();
buf.push("</style>");
jade_debug.shift();
jade_debug.shift();
buf.push("</head>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 59, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<body>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 60, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<h1>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 60, jade_debug[0].filename ));
buf.push("Internal Server Error");
jade_debug.shift();
jade_debug.shift();
buf.push("</h1>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 61, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<p>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 61, jade_debug[0].filename ));
buf.push("Sorry, something went wrong.");
jade_debug.shift();
jade_debug.shift();
buf.push("</p>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 62, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<pre>" + (jade.escape(null == (jade_interp = stack) ? "" : jade_interp)));
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</pre>");
jade_debug.shift();
jade_debug.shift();
buf.push("</body>");
jade_debug.shift();
jade_debug.shift();
buf.push("</html>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 63, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx-->");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 64, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 65, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\error.jade" ));
buf.push("<!--ffffffffffffffffffffffffffffff-->");
jade_debug.shift();
jade_debug.shift();}.call(this,"stack" in locals_for_with?locals_for_with.stack:typeof stack!=="undefined"?stack:undefined));;return buf.join("");
} catch (err) {
jade.rethrow(err, jade_debug[0].filename, jade_debug[0].lineno, "doctype html\nhtml(lang=\"ru\")\n head\n meta(charset=\"utf-8\")\n title Internal Server Error\n meta(name=\"viewport\", content=\"width=device-width, initial-scale=1\")\n style.\n\n * {\n line-height: 1.2;\n margin: 0;\n }\n\n html {\n color: #888;\n display: table;\n font-family: sans-serif;\n height: 100%;\n text-align: center;\n width: 100%;\n }\n\n body {\n display: table-cell;\n vertical-align: middle;\n margin: 2em auto;\n }\n\n h1 {\n color: #555;\n font-size: 2em;\n font-weight: 400;\n }\n\n p {\n margin: 0 auto;\n width: 280px;\n }\n\n pre {\n text-align: left;\n max-width: 1000px;\n margin: 0 auto;\n }\n\n @media only screen and (max-width: 280px) {\n\n body, p {\n width: 95%;\n }\n\n h1 {\n font-size: 1.5em;\n margin: 0 0 0.3em;\n }\n\n }\n\n body\n h1 Internal Server Error\n p Sorry, something went wrong.\n pre= stack\n// IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx\n\n//ffffffffffffffffffffffffffffff\n");
}
}
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(23);
module.exports = function template(locals) {
var jade_debug = [ new jade.DebugItem( 1, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ) ];
try {
var buf = [];
var jade_mixins = {};
var jade_interp;
;var locals_for_with = (locals || {});(function (body, css, description, entry, title, trackingId) {
jade_debug.unshift(new jade.DebugItem( 0, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
jade_debug.unshift(new jade.DebugItem( 1, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<!DOCTYPE html>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 2, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<html lang=\"ru\" class=\"no-js\">");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 3, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<head>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 4, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<meta charset=\"utf-8\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 5, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<meta http-equiv=\"x-ua-compatible\" content=\"ie=edge\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 6, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<title>" + (jade.escape(null == (jade_interp = title) ? "" : jade_interp)));
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</title>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 7, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<meta name=\"description\"" + (jade.attr("description", description, true, true)) + ">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 8, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 9, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<link rel=\"apple-touch-icon\" href=\"apple-touch-icon.png\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 11, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 11, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<link rel=\"stylesheet\" href=\"//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css\">");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 12, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<style id=\"css\">" + (null == (jade_interp = css) ? "" : jade_interp));
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</style>");
jade_debug.shift();
jade_debug.shift();
buf.push("</head>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 13, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<body>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 14, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<div id=\"app\">" + (null == (jade_interp = body) ? "" : jade_interp));
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</div>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 15, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<script" + (jade.attr("src", entry, true, true)) + ">");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</script>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 16, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<script>");
jade_debug.unshift(new jade.DebugItem( 18, jade_debug[0].filename ));
jade_debug.unshift(new jade.DebugItem( 18, jade_debug[0].filename ));
buf.push("window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;");
jade_debug.shift();
buf.push("\n");
jade_debug.unshift(new jade.DebugItem( 18, jade_debug[0].filename ));
buf.push("ga('create','" + (jade.escape((jade_interp = trackingId) == null ? '' : jade_interp)) + "','auto');ga('send','pageview')");
jade_debug.shift();
jade_debug.shift();
buf.push("</script>");
jade_debug.shift();
jade_debug.unshift(new jade.DebugItem( 19, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
if ( trackingId)
{
jade_debug.unshift(new jade.DebugItem( 20, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
jade_debug.unshift(new jade.DebugItem( 20, "C:\\Users\\Igor.Kilipenko\\WebstormProjects\\KTS_React\\src\\views\\index.jade" ));
buf.push("<script src=\"https://www.google-analytics.com/analytics.js\" async defer>");
jade_debug.unshift(new jade.DebugItem( undefined, jade_debug[0].filename ));
jade_debug.shift();
buf.push("</script>");
jade_debug.shift();
jade_debug.shift();
}
jade_debug.shift();
jade_debug.shift();
buf.push("</body>");
jade_debug.shift();
jade_debug.shift();
buf.push("</html>");
jade_debug.shift();
jade_debug.shift();}.call(this,"body" in locals_for_with?locals_for_with.body:typeof body!=="undefined"?body:undefined,"css" in locals_for_with?locals_for_with.css:typeof css!=="undefined"?css:undefined,"description" in locals_for_with?locals_for_with.description:typeof description!=="undefined"?description:undefined,"entry" in locals_for_with?locals_for_with.entry:typeof entry!=="undefined"?entry:undefined,"title" in locals_for_with?locals_for_with.title:typeof title!=="undefined"?title:undefined,"trackingId" in locals_for_with?locals_for_with.trackingId:typeof trackingId!=="undefined"?trackingId:undefined));;return buf.join("");
} catch (err) {
jade.rethrow(err, jade_debug[0].filename, jade_debug[0].lineno, "doctype html\nhtml(class=\"no-js\", lang=\"ru\")\n head\n meta(charset=\"utf-8\")\n meta(http-equiv=\"x-ua-compatible\", content=\"ie=edge\")\n title= title\n meta(name=\"description\", description=description)\n meta(name=\"viewport\", content=\"width=device-width, initial-scale=1\")\n link(rel=\"apple-touch-icon\", href=\"apple-touch-icon.png\")\n //- link(rel=\"stylesheet\", href=\"https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css\")\n link(rel=\"stylesheet\" href=\"//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css\")\n style#css!= css\n body\n #app!= body\n script(src=entry)\n script.\n window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;\n ga('create','#{trackingId}','auto');ga('send','pageview')\n if trackingId\n script(src=\"https://www.google-analytics.com/analytics.js\", async=true, defer=true)\n");
}
}
/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {
var isarray = __webpack_require__(75)
/**
* Expose `pathToRegexp`.
*/
module.exports = pathToRegexp
module.exports.parse = parse
module.exports.compile = compile
module.exports.tokensToFunction = tokensToFunction
module.exports.tokensToRegExp = tokensToRegExp
/**
* The main path matching regexp utility.
*
* @type {RegExp}
*/
var PATH_REGEXP = new RegExp([
// Match escaped characters that would otherwise appear in future matches.
// This allows the user to escape special characters that won't transform.
'(\\\\.)',
// Match Express-style parameters and un-named parameters with a prefix
// and optional suffixes. Matches appear as:
//
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
].join('|'), 'g')
/**
* Parse a string for the raw tokens.
*
* @param {string} str
* @param {Object=} options
* @return {!Array}
*/
function parse (str, options) {
var tokens = []
var key = 0
var index = 0
var path = ''
var defaultDelimiter = options && options.delimiter || '/'
var res
while ((res = PATH_REGEXP.exec(str)) != null) {
var m = res[0]
var escaped = res[1]
var offset = res.index
path += str.slice(index, offset)
index = offset + m.length
// Ignore already escaped sequences.
if (escaped) {
path += escaped[1]
continue
}
var next = str[index]
var prefix = res[2]
var name = res[3]
var capture = res[4]
var group = res[5]
var modifier = res[6]
var asterisk = res[7]
// Push the current path onto the tokens.
if (path) {
tokens.push(path)
path = ''
}
var partial = prefix != null && next != null && next !== prefix
var repeat = modifier === '+' || modifier === '*'
var optional = modifier === '?' || modifier === '*'
var delimiter = res[2] || defaultDelimiter
var pattern = capture || group
tokens.push({
name: name || key++,
prefix: prefix || '',
delimiter: delimiter,
optional: optional,
repeat: repeat,
partial: partial,
asterisk: !!asterisk,
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
})
}
// Match any characters still remaining.
if (index < str.length) {
path += str.substr(index)
}
// If the path exists, push it onto the end.
if (path) {
tokens.push(path)
}
return tokens
}
/**
* Compile a string to a template function for the path.
*
* @param {string} str
* @param {Object=} options
* @return {!function(Object=, Object=)}
*/
function compile (str, options) {
return tokensToFunction(parse(str, options))
}
/**
* Prettier encoding of URI path segments.
*
* @param {string}
* @return {string}
*/
function encodeURIComponentPretty (str) {
return encodeURI(str).replace(/[\/?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
*
* @param {string}
* @return {string}
*/
function encodeAsterisk (str) {
return encodeURI(str).replace(/[?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Expose a method for transforming tokens into the path function.
*/
function tokensToFunction (tokens) {
// Compile all the tokens into regexps.
var matches = new Array(tokens.length)
// Compile all the patterns before compilation.
for (var i = 0; i < tokens.length; i++) {
if (typeof tokens[i] === 'object') {
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')
}
}
return function (obj, opts) {
var path = ''
var data = obj || {}
var options = opts || {}
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
path += token
continue
}
var value = data[token.name]
var segment
if (value == null) {
if (token.optional) {
// Prepend partial segment prefixes.
if (token.partial) {
path += token.prefix
}
continue
} else {
throw new TypeError('Expected "' + token.name + '" to be defined')
}
}
if (isarray(value)) {
if (!token.repeat) {
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
}
if (value.length === 0) {
if (token.optional) {
continue
} else {
throw new TypeError('Expected "' + token.name + '" to not be empty')
}
}
for (var j = 0; j < value.length; j++) {
segment = encode(value[j])
if (!matches[i].test(segment)) {
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
}
path += (j === 0 ? token.prefix : token.delimiter) + segment
}
continue
}
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
if (!matches[i].test(segment)) {
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
}
path += token.prefix + segment
}
return path
}
}
/**
* Escape a regular expression string.
*
* @param {string} str
* @return {string}
*/
function escapeString (str) {
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
}
/**
* Escape the capturing group by escaping special characters and meaning.
*
* @param {string} group
* @return {string}
*/
function escapeGroup (group) {
return group.replace(/([=!:$\/()])/g, '\\$1')
}
/**
* Attach the keys as a property of the regexp.
*
* @param {!RegExp} re
* @param {Array} keys
* @return {!RegExp}
*/
function attachKeys (re, keys) {
re.keys = keys
return re
}
/**
* Get the flags for a regexp from the options.
*
* @param {Object} options
* @return {string}
*/
function flags (options) {
return options.sensitive ? '' : 'i'
}
/**
* Pull out keys from a regexp.
*
* @param {!RegExp} path
* @param {!Array} keys
* @return {!RegExp}
*/
function regexpToRegexp (path, keys) {
// Use a negative lookahead to match only capturing groups.
var groups = path.source.match(/\((?!\?)/g)
if (groups) {
for (var i = 0; i < groups.length; i++) {
keys.push({
name: i,
prefix: null,
delimiter: null,
optional: false,
repeat: false,
partial: false,
asterisk: false,
pattern: null
})
}
}
return attachKeys(path, keys)
}
/**
* Transform an array into a regexp.
*
* @param {!Array} path
* @param {Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function arrayToRegexp (path, keys, options) {
var parts = []
for (var i = 0; i < path.length; i++) {
parts.push(pathToRegexp(path[i], keys, options).source)
}
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
return attachKeys(regexp, keys)
}
/**
* Create a path regexp from string input.
*
* @param {string} path
* @param {!Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function stringToRegexp (path, keys, options) {
return tokensToRegExp(parse(path, options), keys, options)
}
/**
* Expose a function for taking tokens and returning a RegExp.
*
* @param {!Array} tokens
* @param {(Array|Object)=} keys
* @param {Object=} options
* @return {!RegExp}
*/
function tokensToRegExp (tokens, keys, options) {
if (!isarray(keys)) {
options = /** @type {!Object} */ (keys || options)
keys = []
}
options = options || {}
var strict = options.strict
var end = options.end !== false
var route = ''
// Iterate over the tokens and create our regexp string.
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
route += escapeString(token)
} else {
var prefix = escapeString(token.prefix)
var capture = '(?:' + token.pattern + ')'
keys.push(token)
if (token.repeat) {
capture += '(?:' + prefix + capture + ')*'
}
if (token.optional) {
if (!token.partial) {
capture = '(?:' + prefix + '(' + capture + '))?'
} else {
capture = prefix + '(' + capture + ')?'
}
} else {
capture = prefix + '(' + capture + ')'
}
route += capture
}
}
var delimiter = escapeString(options.delimiter || '/')
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
// In non-strict mode we allow a slash at the end of match. If the path to
// match already ends with a slash, we remove it for consistency. The slash
// is valid at the end of a path match, not in the middle. This is important
// in non-ending mode, where "/test/" shouldn't match "/test//route".
if (!strict) {
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
}
if (end) {
route += '$'
} else {
// In non-ending mode, we need the capturing groups to match as much as
// possible by using a positive lookahead to the end or next path segment.
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
}
return attachKeys(new RegExp('^' + route, flags(options)), keys)
}
/**
* Normalize the given path string, returning a regular expression.
*
* An empty array can be passed in for the keys, which will hold the
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
*
* @param {(string|RegExp|Array)} path
* @param {(Array|Object)=} keys
* @param {Object=} options
* @return {!RegExp}
*/
function pathToRegexp (path, keys, options) {
if (!isarray(keys)) {
options = /** @type {!Object} */ (keys || options)
keys = []
}
options = options || {}
if (path instanceof RegExp) {
return regexpToRegexp(path, /** @type {!Array} */ (keys))
}
if (isarray(path)) {
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
}
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
}
/***/ },
/* 91 */,
/* 92 */
/***/ function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ },
/* 93 */
/***/ function(module, exports) {
module.exports = require("./assets");
/***/ },
/* 94 */
/***/ function(module, exports) {
module.exports = require("babel-polyfill");
/***/ },
/* 95 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/is-iterable");
/***/ },
/* 96 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/json/stringify");
/***/ },
/* 97 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/object/create");
/***/ },
/* 98 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/object/define-property");
/***/ },
/* 99 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/object/set-prototype-of");
/***/ },
/* 100 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/symbol");
/***/ },
/* 101 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/core-js/symbol/iterator");
/***/ },
/* 102 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/extends");
/***/ },
/* 103 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/get");
/***/ },
/* 104 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/objectWithoutProperties");
/***/ },
/* 105 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/slicedToArray");
/***/ },
/* 106 */
/***/ function(module, exports) {
module.exports = require("babel-runtime/helpers/typeof");
/***/ },
/* 107 */
/***/ function(module, exports) {
module.exports = require("body-parser");
/***/ },
/* 108 */
/***/ function(module, exports) {
module.exports = require("cookie-parser");
/***/ },
/* 109 */
/***/ function(module, exports) {
module.exports = require("core-js/library/fn/get-iterator");
/***/ },
/* 110 */
/***/ function(module, exports) {
module.exports = require("core-js/library/fn/object/create");
/***/ },
/* 111 */
/***/ function(module, exports) {
module.exports = require("express");
/***/ },
/* 112 */
/***/ function(module, exports) {
module.exports = require("express-graphql");
/***/ },
/* 113 */
/***/ function(module, exports) {
module.exports = require("express-jwt");
/***/ },
/* 114 */
/***/ function(module, exports) {
module.exports = require("fbjs/lib/emptyFunction");
/***/ },
/* 115 */
/***/ function(module, exports) {
module.exports = require("front-matter");
/***/ },
/* 116 */
/***/ function(module, exports) {
module.exports = require("history/lib/createBrowserHistory");
/***/ },
/* 117 */
/***/ function(module, exports) {
module.exports = require("history/lib/createMemoryHistory");
/***/ },
/* 118 */
/***/ function(module, exports) {
module.exports = require("history/lib/useQueries");
/***/ },
/* 119 */
/***/ function(module, exports) {
module.exports = require("jade");
/***/ },
/* 120 */
/***/ function(module, exports) {
module.exports = require("jsonwebtoken");
/***/ },
/* 121 */
/***/ function(module, exports) {
module.exports = require("markdown-it");
/***/ },
/* 122 */
/***/ function(module, exports) {
module.exports = require("node-fetch");
/***/ },
/* 123 */
/***/ function(module, exports) {
module.exports = require("passport");
/***/ },
/* 124 */
/***/ function(module, exports) {
module.exports = require("passport-facebook");
/***/ },
/* 125 */
/***/ function(module, exports) {
module.exports = require("pg");
/***/ },
/* 126 */
/***/ function(module, exports) {
module.exports = require("pretty-error");
/***/ },
/* 127 */
/***/ function(module, exports) {
module.exports = require("react-dom/server");
/***/ },
/* 128 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "ca2f7f48e539ddf09a49c7d86d5ae84e.jpg";
/***/ }
/******/ ]);
//# sourceMappingURL=server.js.map |
components/MapModal.js | vaskort/react-native | import React, { Component } from 'react';
import { View, Text, Modal, StyleSheet} from 'react-native';
import MapView from 'react-native-maps';
import {Button, Icon} from 'react-native-elements';
import Promise from 'bluebird';
class MapModal extends React.Component {
state = {
firstTime: true,
region: {
latitude: this.props.initialLatitude,
longitude: this.props.initialLongitude,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
},
markerPosition: {
latitude: 'undefined',
longitude: 'undefined'
}
}
setMarkerRef = (ref) => {
this.marker = ref
}
componentWillReceiveProps(nextProps){
if (nextProps.initialLatitude !== this.state.latitude || nextProps.initialLongitude !== this.state.longitude) {
this.setState({
region: {
...this.state.region,
latitude: nextProps.initialLatitude,
longitude: nextProps.initialLongitude,
}
})
}
console.log(nextProps);
}
// this function moves marker and region to the user location
_moveMarkerRegion = (location) => {
console.log('inside move marker region func');
console.log(location, this.state.region);
this.setState({
region: {
...this.state.region,
latitude: location.coords.latitude,
longitude: location.coords.longitude
}
})
}
_resetMarkerPosition = () => {
this.setState({
markerPosition: {
latitude: this.props.initialLatitude,
longitude: this.props.initialLongitude
}
})
}
render() {
let markerLocation = this.state.markerPosition.latitude !== 'undefined' ? this.state.markerPosition : this.state.region ;
let self = this;
return (
<Modal
animationType={"fade"}
transparent={true}
visible={this.props.isMapModalVisible}
onRequestClose={() => {}}
>
<View style={styles.container}>
<MapView
ref = {(mapView) => { _mapView = mapView; }}
region={this.state.region}
style={styles.map}
showsUserLocation={true}
showsMyLocationButton={false}
toolbarEnabled={false}
moveOnMarkerPress={true}
followsUserLocation={false}
showsCompass={false}
onRegionChangeComplete={() =>
{
if (this.state.firstTime === true) {
this.marker.showCallout();
this.setState({
firstTime: false
})
}
}
}
>
<MapView.Marker
ref={this.setMarkerRef}
draggable
coordinate={markerLocation}
title='Marker'
description='Keep tapping to drag'
onDragEnd={
(e) => {
this.setState({
region: _mapView.__lastRegion,
});
this.setState({
markerPosition: {
latitude: e.nativeEvent.coordinate.latitude,
longitude: e.nativeEvent.coordinate.longitude
}
});
this.marker.hideCallout();
// _mapView.animateToCoordinate({
// latitude: e.nativeEvent.coordinate.latitude,
// longitude: e.nativeEvent.coordinate.longitude
// }, 500)
}
}
/>
</MapView>
<View style={styles.bubble}>
<Text className="locationCoords">
{this.state.markerPosition.latitude !== 'undefined' ? this.state.markerPosition.latitude.toPrecision(7) : this.state.region.latitude},
{this.state.markerPosition.longitude !== 'undefined' ? this.state.markerPosition.longitude.toPrecision(7) : this.state.region.longitude}
</Text>
</View>
<View className="buttonWrapper" style={styles.buttonWrapper}>
<Button
title='Close'
buttonStyle={styles.button}
onPress={
(e) => {
// close the modal
self.props.closeMapModal();
// reset the marker
self._resetMarkerPosition();
}
}
/>
<Button
title='Add marker location'
buttonStyle={styles.button}
onPress={
(e) => {
// add location
self.props.onAddLocation(markerLocation);
// reset the marker
self._resetMarkerPosition();
}
}
/>
</View>
{/* find my location button inside the map modal */}
<Icon
containerStyle={[styles.findUserLocationContainer, styles.findUsersLocation]}
large
name='target-two'
type='foundation'
color='#000000'
size={40}
underlayColor='transparent'
onPress = {
(e) => {
// TODO: make the following as a promise
self.props.onFindLocation();
this._moveMarkerRegion(self.props.userLocation);
console.log('button pressed');
}
}
/>
</View>
</Modal>
);
}
}
const styles = StyleSheet.create({
container: {
...StyleSheet.absoluteFillObject,
justifyContent: 'flex-end',
alignItems: 'center',
},
map: {
...StyleSheet.absoluteFillObject,
},
buttonWrapper: {
// flex: 1,
flexDirection: 'row',
alignItems: 'flex-end',
justifyContent: 'center',
paddingBottom: 10
},
button: {
backgroundColor: '#00998a',
borderRadius: 5,
marginTop: 20,
},
findUserLocationContainer: {
position: 'absolute',
top:30,
left:20,
flex: 1
},
bubble: {
backgroundColor: 'rgba(255,255,255,0.7)',
paddingHorizontal: 18,
paddingVertical: 12,
borderRadius: 20,
}
})
module.exports = MapModal;
|
src/components/common/svg-icons/places/beach-access.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesBeachAccess = (props) => (
<SvgIcon {...props}>
<path d="M13.127 14.56l1.43-1.43 6.44 6.443L19.57 21zm4.293-5.73l2.86-2.86c-3.95-3.95-10.35-3.96-14.3-.02 3.93-1.3 8.31-.25 11.44 2.88zM5.95 5.98c-3.94 3.95-3.93 10.35.02 14.3l2.86-2.86C5.7 14.29 4.65 9.91 5.95 5.98zm.02-.02l-.01.01c-.38 3.01 1.17 6.88 4.3 10.02l5.73-5.73c-3.13-3.13-7.01-4.68-10.02-4.3z"/>
</SvgIcon>
);
PlacesBeachAccess = pure(PlacesBeachAccess);
PlacesBeachAccess.displayName = 'PlacesBeachAccess';
PlacesBeachAccess.muiName = 'SvgIcon';
export default PlacesBeachAccess;
|
client/src/components/nav/NavLabel.js | JasonProcka/venos | import React from 'react';
export default class NavLabel extends React.Component {
render() {
return (
<li {...this.props} className="navLabel">{this.props.children}</li>
);
}
}
|
src/js/components/n-text.js | bradwoo8621/parrot2 | import React from 'react'
import ReactDOM from 'react-dom'
import jQuery from 'jquery'
import classnames from 'classnames'
let $ = jQuery;
import {Envs} from '../envs'
import {NComponent, NAddonComponent} from './n-component'
class NText extends NAddonComponent {
// lifecycle
postDidUpdate() {
let value = this.getValueFromModel();
if (!$(ReactDOM.findDOMNode(this.refs.focusLine)).hasClass('focus')) {
value = this.formatValue(value);
}
if (this.getComponentText() != value) {
this.getComponent().val(value);
}
}
postDidMount() {
this.getComponent().val(this.formatValue(this.getValueFromModel()));
}
renderText() {
return (<input type={this.getInputKind()}
className='n-control'
disabled={!this.isEnabled()}
placeholder={this.getPlaceholder()}
onChange={this.onComponentChanged}
onFocus={this.onComponentFocused}
onBlur={this.onComponentBlurred}
ref='txt'/>);
}
renderInNormal() {
let className = classnames(this.getComponentStyle(), {
'has-addon': this.hasAddon()
});
return (<div className={className}
ref='me'>
{this.renderLead()}
{this.renderText()}
{this.renderTail()}
{this.renderNormalLine()}
{this.renderFocusLine()}
</div>);
}
isViewModeSameAsNormal() {
return false;
}
getValueFromModel() {
var value = super.getValueFromModel();
var transformer = this.getTextTransformer();
if (transformer && transformer.display) {
return transformer.display.call(this, value);
} else {
return value;
}
}
setValueToModel(value) {
var transformer = this.getTextTransformer();
if (transformer && transformer.model) {
super.setValueToModel(transformer.model.call(this, value));
} else {
super.setValueToModel(value);
}
}
getComponent() {
return $(ReactDOM.findDOMNode(this.refs.txt));
}
// style
getComponentClassName() {
return 'n-text';
}
// option value
getInputKind() {
return this.getLayoutOptionValue('kind', 'text');
}
getPlaceholder() {
return this.getLayoutOptionValue('placeholder');
}
getTextFormatter() {
return this.getLayoutOptionValue('formatter');
}
getTextTransformer() {
return this.getLayoutOptionValue('transformer');
}
isAutoTrim() {
return this.getLayoutOptionValue('trim', false);
}
getComponentText() {
let value = this.getComponent().val();
return this.isAutoTrim() ? value.trim() : value;
}
// data event
onComponentChanged = (evt) => {
// compare the formatted text
let newValue = this.getComponentText();
let oldValue = this.getValueFromModel();
if (!this.textEquals(newValue, oldValue)) {
//evt.preventDefault();
if (this.state.valueChangeTimeoutId) {
clearTimeout(this.state.valueChangeTimeoutId);
}
this.state.valueChangeTimeoutId = setTimeout(() => {
delete this.state.valueChangeTimeoutId;
this.setValueToModel(newValue);
}, Envs.TEXT_CHANGE_DELAY);
}
}
// dom event
onComponentFocused = (evt) => {
this.onComponentFocusChanged();
// when focus, show the unformatted value
let value = this.getValueFromModel();
if (value != this.getComponent().val()) {
// might be formatted or something else, however not same
// evt.preventDefault();
this.getComponent().val(value);
}
}
onComponentBlurred = (evt) => {
this.onComponentFocusChanged();
let text = this.formatValue(this.getComponentText());
if (text) {
let value = this.formatValue(this.getValueFromModel());
if (text != value) {
// this moment, value of component is not formatted
// evt.preventDefault();
this.setValueToModel(text);
}
this.getComponent().val(this.formatValue(text));
} else {
// evt.preventDefault();
this.setValueToModel(null);
}
}
// others
formatValue(value) {
let formatter = this.getTextFormatter();
if (formatter && formatter.display) {
return formatter.display.call(this, value);
} else {
return value;
}
}
parseText(text) {
let formatter = this.getTextFormatter();
if (formatter && formatter.model) {
return formatter.model.call(this, text);
} else {
return text;
}
}
textEquals(v1, v2) {
let hasText1 = !this.isNoValueAssigned(v1);
let hasText2 = !this.isNoValueAssigned(v2);
if (hasText1) {
let strV1 = v1 + '';
let strV2 = v2 + '';
return strV1 === strV2;
} else {
return !hasText2
}
}
}
Envs.COMPONENT_TYPES.TEXT = {type: 'n-text', label: true, error: true};
Envs.setRenderer(Envs.COMPONENT_TYPES.TEXT.type, function (options) {
return <NText {...options} />;
});
export {NText}
|
src/molecules/Breadcrumbs/breadcrumbs.stories.js | sjofartstidningen/bryggan | /* eslint-disable import/no-extraneous-dependencies */
import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import Breadcrumbs from './index';
class Wrapper extends Component<*, *> {
state = {
path: '/blog/2018/123456',
};
routes = [
{ path: '/:root', title: ({ root }) => root },
{
path: '/:root/:year',
title: ({ year }) => year,
routes: [
{ path: '/blog/2015', title: '2015' },
{ path: '/blog/2016', title: '2016' },
{ path: '/blog/2017', title: '2017' },
{ path: '/blog/2018', title: '2018' },
],
},
{
path: '/:root/:year/:id',
title: ({ id }) => id,
routes: [
{ path: '/blog/2018/123', title: '123' },
{ path: '/blog/2018/456', title: '456' },
{ path: '/blog/2018/789', title: '789' },
{ path: '/blog/2018/012', title: '012' },
],
},
];
handleChange = e => {
const { value } = e.target;
this.setState(() => ({ path: value }));
};
render() {
const { path } = this.state;
const location = { pathname: path, search: '', hash: '' };
return (
<div>
<Breadcrumbs location={location} routes={this.routes} />
<input
type="text"
value={path}
onChange={this.handleChange}
style={{ position: 'absolute', bottom: '1rem', left: '1rem' }}
/>
</div>
);
}
}
storiesOf('molecules/Breadcrumbs', module).add('standard', () => <Wrapper />);
|
old/view/indexOld.js | bburns/neomem | import React from 'react'
import ReactDOM from 'react-dom'
import App from './components/App'
ReactDOM.render(<App />, document.getElementById('root'))
|
client/components/organisms/ConfirmModal/ConfirmModal.js | djizco/boilerplate-react | import React from 'react';
import PropTypes from 'prop-types';
import Modal from 'react-bulma-companion/lib/Modal';
import ConfirmDeleteTodo from '_organisms/ConfirmDeleteTodo';
export default function ConfirmModal({ confirm, closeModal, deleteTodo }) {
return (
<Modal className="confirm-modal" active={confirm}>
<Modal.Background />
<Modal.Content>
<ConfirmDeleteTodo closeModal={closeModal} deleteTodo={deleteTodo} />
</Modal.Content>
<Modal.Close size="large" aria-label="close" onClick={closeModal} />
</Modal>
);
}
ConfirmModal.propTypes = {
confirm: PropTypes.bool.isRequired,
closeModal: PropTypes.func.isRequired,
deleteTodo: PropTypes.func.isRequired,
};
|
sandbox-react-redux/src/components/pages/PageBar.js | ohtomi/sandbox | import React from 'react'
import HeaderContainer from '../organisms/HeaderContainer'
import CountContainer from '../organisms/CountContainer'
import CalcContainer from '../organisms/CalcContainer'
import Link from '../atoms/Link'
const PageBar = ({ state: { misc: { locked }, routing: { pathname } }, actions }) => {
return (
<div className={locked ? 'App App-locked' : 'App'}>
<HeaderContainer />
<p className="App-intro">
<CountContainer />
</p>
<p className="App-intro">
<CalcContainer />
</p>
<p className="App-intro">
[ {pathname} ]
[ <Link to="/" {...actions.routing}>go to root</Link> ]
[ <Link to="/foo/12345" {...actions.routing}>go to foo</Link> ]
</p>
</div>
)
}
export default PageBar
|
src/svg-icons/action/android.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAndroid = (props) => (
<SvgIcon {...props}>
<path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/>
</SvgIcon>
);
ActionAndroid = pure(ActionAndroid);
ActionAndroid.displayName = 'ActionAndroid';
ActionAndroid.muiName = 'SvgIcon';
export default ActionAndroid;
|
src/main/ScrollBox.js | smikhalevski/react-scroll-box | import React from 'react';
import {GenericScrollBox} from './GenericScrollBox';
export class ScrollBox extends React.Component {
render() {
return (
<GenericScrollBox {...this.props}>
<div className="scroll-box__viewport">
{this.props.children}
</div>
</GenericScrollBox>
);
}
}
|
examples/real-world/index.js | javascriptjedi/redux-select | import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { browserHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import Root from './containers/Root'
import configureStore from './store/configureStore'
const store = configureStore()
const history = syncHistoryWithStore(browserHistory, store)
render(
<Root store={store} history={history} />,
document.getElementById('root')
)
|
src/js/components/tests/editor-row-textbook-modal.js | daniel-madera/pijs | import React from 'react'
import { observer, inject } from 'mobx-react'
import { Modal, FormControl, FormGroup, Button, Form, ListGroup, ListGroupItem } from 'react-bootstrap'
import { SimpleInput } from '../others/form'
import { SimpleList } from '../others/lists'
@inject('testStore', 'textbookPublicStore', 'textbookStore')
@observer
export default class EditorRowTextbookModal extends React.Component {
componentDidMount() {
this.props.textbookStore.fetch()
this.props.textbookPublicStore.fetch()
this.props.textbookPublicStore.filterValue = undefined
}
filterChanged = e => {
this.props.textbookPublicStore.filterValue = e.target.value
}
selectTextbook(textbook, e) {
this.props.textbookPublicStore.selectedTextbook = textbook.id
this.props.textbookPublicStore.selectedTextbookTitle = textbook.title
}
render() {
const { filteredTextbooks, selectedTextbook } = this.props.textbookPublicStore
const { textbooks } = this.props.textbookStore
return (
<Modal show={this.props.show} onHide={this.props.close} className='modal-large'>
<Form className="tiny" inline>
<Modal.Header closeButton>
<h4>Výběr učebnice</h4>
</Modal.Header>
<Modal.Body>
<div className="column-split">
<h4>Moje učebnice</h4>
<SimpleInput
className="full-width filter-input"
placeholder="Hledejte dle názvu"
type="text"
disabled="true"
/>
<ListGroup>
{textbooks.map(t =>
<ListGroupItem key={t.id} onClick={this.selectTextbook.bind(this, t)} active={selectedTextbook === t.id}>
{t.title}
</ListGroupItem>
)}
</ListGroup>
</div>
<div className="column-split">
<h4>Všechny učebnice</h4>
<SimpleInput
className="full-width filter-input"
placeholder="Hledejte dle názvu, vlastníka nebo jazyku"
type="text"
onChange={this.filterChanged}
/>
<ListGroup>
{filteredTextbooks.map(t =>
<ListGroupItem key={t.id} onClick={this.selectTextbook.bind(this, t)} active={selectedTextbook === t.id}>
{`${t.title} (${t.language})`}<span className="pull-right">{t.owner}</span>
</ListGroupItem>
)}
</ListGroup>
</div>
<div className="clearfix"></div>
</Modal.Body>
<Modal.Footer>
<Button bsStyle="info" onClick={this.props.close}>Vybrat</Button>
</Modal.Footer>
</Form>
</Modal>
);
}
}
|
client/src/adventures/Adventures.js | petertrotman/adventurelookup | import React from 'react';
const Adventures = () => (
<div>
<h2>Adventures</h2>
<p>Getting this continuously deployed was a mini adventure :-D</p>
</div>
);
export default Adventures;
|
blog-post-4/src/www/js/components/demo-table.js | training4developers/react-flux-blog | 'use strict';
import React from 'react'; // eslint-disable-line no-unused-vars
import DemoRow from './demo-row'; // eslint-disable-line no-unused-vars
export default (props) => <table className='table table-striped'>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{props.demos.map(demo => <DemoRow key={demo.name} demo={demo} />)}
</tbody>
</table>;
|
text-dream/webapp/src/components/cards/LayersComponent.js | PAIR-code/interpretability | /**
* @license
* Copyright 2018 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import {bindActionCreators} from 'redux';
import * as actions from '../../actions';
import {Grid, ExpansionPanel, ExpansionPanelSummary, ExpansionPanelDetails,
Typography} from '@material-ui/core';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import ReconstructSentence from '../reconstruct/ReconstructSentence';
import ExplanationHead from '../heads/ExplanationHeadComponent';
import {getDreamProps, getReconstructProps,
getMagnitudesLayerProps} from '../../cardcontentprocessing';
import {getCardColors} from '../../colors';
/**
* Provides a Card Component to render multiple Layers.
*/
class Layers extends React.PureComponent {
/**
* Called after the component mounted to one-time add the colors this card
* needs.
*/
componentDidMount() {
const cardType = this.props.layers[0].type;
const colors = cardType === 'magnitudes' ?
getCardColors('layerMagnitudes') : getCardColors(cardType);
this.props.actions.addActiveColors(colors);
}
/**
* Renders all the layers of this Card.
*
* @return {jsx} the card with the layers to be rendered
*/
render() {
let props;
switch (this.props.layers[0].type) {
case 'dream':
props = getDreamProps(this.props.layers);
break;
case 'reconstruct':
props = getReconstructProps(this.props.layers);
break;
case 'magnitudes':
props = getMagnitudesLayerProps(this.props.layers);
break;
default:
break;
}
props.sentenceParams.headWidth = props.sentenceParams.headWidth + 14;
return (
<Grid container direction='column' className='fullHeight' wrap='nowrap'>
<ExplanationHead
topic={props.topic}
params={props.headParams}
elementIndex={this.props.elementIndex}/>
{props.head}
<div className='overflow'>
{props.bodies.map((body, index) =>
<ExpansionPanel key={index}>
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
<Grid container direction='row' spacing={1} alignItems="center">
<Grid item style={{width: props.sentenceParams.headWidth}}>
<Typography variant="body1" color="inherit">
{props.layerIDs[index]}
</Typography>
</Grid>
<Grid item>
<ReconstructSentence
sentence={props.sentences[index]}
target={props.sentenceParams.target}
original={props.sentenceParams.original}
colors={props.sentenceParams.colors}/>
</Grid>
</Grid>
</ExpansionPanelSummary>
<ExpansionPanelDetails>
{body}
</ExpansionPanelDetails>
</ExpansionPanel>
)}
</div>
</Grid>
);
}
}
Layers.propTypes = {
layers: PropTypes.array.isRequired,
elementIndex: PropTypes.number.isRequired,
actions: PropTypes.object.isRequired,
};
/**
* Mapping the actions of redux to this component.
*
* @param {function} dispatch - called whenever an action is to be dispatched.
* @return {object} all the actions bound to this component.
*/
function mapDispatchToProps(dispatch) {
return {actions: bindActionCreators(actions, dispatch)};
}
export default connect(null, mapDispatchToProps)(Layers);
|
pages/counter.js | abhilashsajeev/shopping-cart-universal | import React from 'react';
import { store } from '../redux/store';
import { Counter } from '../components/Counter';
import { addNewCounter, removeCounter, incrementCounter, decrementCounter } from '../redux/actions/counterActions';
import { connectWithStore } from '../redux/connectWithStore';
import Layout from '../components/layout';
class CounterContainer extends React.Component {
renderCounters(counters) {
const onIncrement = this.props.onIncrement;
const onDecrement = this.props.onDecrement;
const onRemoveCounter = this.props.onRemoveCounter;
return counters.map((c, i) => {
return (
<Counter
key={i}
value={c}
onIncrement={() => { onIncrement(i) }}
onDecrement={() => { onDecrement(i) }}
onRemoveCounter={ () => { onRemoveCounter(i) }}
/>
);
});
}
render () {
const counters = this.props.counters;
const onAddNewCounter = this.props.onAddNewCounter;
return (
<Layout>
<div>
{ this.renderCounters(counters) }
<br/>
<button onClick={onAddNewCounter}>Add New Counter</button>
</div>
</Layout>
)
}
}
const mapStateToProps = (state) => {
return {
counters: state.counterReducer
}
};
const mapDispatchToProps = (dispatch) => {
return {
onAddNewCounter: () => {
dispatch(addNewCounter());
},
onIncrement: (index) => {
dispatch(incrementCounter(index));
},
onDecrement: (index) => {
dispatch(decrementCounter(index));
},
onRemoveCounter: (index) => {
dispatch(removeCounter(index));
},
}
};
export default connectWithStore(store, CounterContainer, mapStateToProps, mapDispatchToProps); |
src/components/Footer/index.js | westoncolemanl/tabbr-web | import React from 'react'
import Responsive from 'react-responsive'
import LargeFooter from './LargeFooter'
import SmallFooter from './SmallFooter'
export default () =>
<div>
<Responsive
minWidth={961}
>
<LargeFooter />
</Responsive>
<Responsive
maxWidth={960}
minWidth={601}
>
<SmallFooter />
</Responsive>
<Responsive
maxWidth={600}
>
<SmallFooter />
</Responsive>
</div>
|
node_modules/semantic-ui-react/dist/es/elements/Step/StepTitle.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { childrenUtils, customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* A step can contain a title.
*/
function StepTitle(props) {
var children = props.children,
className = props.className,
title = props.title;
var classes = cx('title', className);
var rest = getUnhandledProps(StepTitle, props);
var ElementType = getElementType(StepTitle, props);
return React.createElement(
ElementType,
_extends({}, rest, { className: classes }),
childrenUtils.isNil(children) ? title : children
);
}
StepTitle.handledProps = ['as', 'children', 'className', 'title'];
StepTitle._meta = {
name: 'StepTitle',
parent: 'Step',
type: META.TYPES.ELEMENT
};
StepTitle.propTypes = process.env.NODE_ENV !== "production" ? {
/** An element type to render as (string or function). */
as: customPropTypes.as,
/** Primary content. */
children: PropTypes.node,
/** Additional classes. */
className: PropTypes.string,
/** Shorthand for primary content. */
title: customPropTypes.contentShorthand
} : {};
export default StepTitle; |
src/components/main.js | sourabh-garg/react-starter-kit | import React from 'react';
import {connect} from 'react-redux';
import Navbar from './CommonComponent/Navbar/navbar';
import Footer from './CommonComponent/Footer/footer';
class Main extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="container">
<Navbar/>
{this.props.children}
<Footer />
</div>
);
}
}
function mapStateToProps(state) {
return {};
}
export default connect(mapStateToProps)(Main);
|
lib/index.js | openstardrive/flight-director | import React from 'react'
import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import reducer from './station/reducer'
import Station from './station'
require('./index.css')
let createStoreWithThunks = applyMiddleware(thunk)(createStore)
let store = createStoreWithThunks(reducer)
render(
<Provider store={store}>
<Station />
</Provider>,
document.getElementById("app")
)
|
app/javascript/mastodon/features/account_timeline/index.js | amazedkoumei/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import StatusList from '../../components/status_list';
import LoadingIndicator from '../../components/loading_indicator';
import Column from '../ui/components/column';
import HeaderContainer from './containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
import { List as ImmutableList } from 'immutable';
import ImmutablePureComponent from 'react-immutable-pure-component';
const mapStateToProps = (state, { params: { accountId }, withReplies = false }) => {
const path = withReplies ? `${accountId}:with_replies` : accountId;
return {
statusIds: state.getIn(['timelines', `account:${path}`, 'items'], ImmutableList()),
featuredStatusIds: withReplies ? ImmutableList() : state.getIn(['timelines', `account:${accountId}:pinned`, 'items'], ImmutableList()),
isLoading: state.getIn(['timelines', `account:${path}`, 'isLoading']),
hasMore: state.getIn(['timelines', `account:${path}`, 'hasMore']),
};
};
@connect(mapStateToProps)
export default class AccountTimeline extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
shouldUpdateScroll: PropTypes.func,
statusIds: ImmutablePropTypes.list,
featuredStatusIds: ImmutablePropTypes.list,
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
withReplies: PropTypes.bool,
};
componentWillMount () {
const { params: { accountId }, withReplies } = this.props;
this.props.dispatch(fetchAccount(accountId));
if (!withReplies) {
this.props.dispatch(expandAccountFeaturedTimeline(accountId));
}
this.props.dispatch(expandAccountTimeline(accountId, { withReplies }));
}
componentWillReceiveProps (nextProps) {
if ((nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) || nextProps.withReplies !== this.props.withReplies) {
this.props.dispatch(fetchAccount(nextProps.params.accountId));
if (!nextProps.withReplies) {
this.props.dispatch(expandAccountFeaturedTimeline(nextProps.params.accountId));
}
this.props.dispatch(expandAccountTimeline(nextProps.params.accountId, { withReplies: nextProps.params.withReplies }));
}
}
handleLoadMore = maxId => {
this.props.dispatch(expandAccountTimeline(this.props.params.accountId, { maxId, withReplies: this.props.withReplies }));
}
render () {
const { shouldUpdateScroll, statusIds, featuredStatusIds, isLoading, hasMore } = this.props;
if (!statusIds && isLoading) {
return (
<Column>
<LoadingIndicator />
</Column>
);
}
return (
<Column>
<ColumnBackButton />
<StatusList
prepend={<HeaderContainer accountId={this.props.params.accountId} />}
scrollKey='account_timeline'
statusIds={statusIds}
featuredStatusIds={featuredStatusIds}
isLoading={isLoading}
hasMore={hasMore}
onLoadMore={this.handleLoadMore}
shouldUpdateScroll={shouldUpdateScroll}
/>
</Column>
);
}
}
|
docs/src/app/components/pages/components/Snackbar/Page.js | hai-cea/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import SnackbarReadmeText from './README';
import SnackbarExampleSimple from './ExampleSimple';
import SnackbarExampleSimpleCode from '!raw!./ExampleSimple';
import SnackbarExampleAction from './ExampleAction';
import SnackbarExampleActionCode from '!raw!./ExampleAction';
import SnackbarExampleTwice from './ExampleTwice';
import SnackbarExampleTwiceCode from '!raw!./ExampleTwice';
import SnackbarCode from '!raw!material-ui/Snackbar/Snackbar';
const descriptions = {
simple: '`Snackbar` is a controlled component, and is displayed when `open` is `true`. Click away from the ' +
'Snackbar to close it, or wait for `autoHideDuration` to expire.',
action: 'A single `action` can be added to the Snackbar, and triggers `onActionClick`. Edit the textfield to ' +
'change `autoHideDuration`',
consecutive: 'Changing `message` causes the Snackbar to animate - it isn\'t necessary to close and reopen the ' +
'Snackbar with the open prop.',
};
const SnackbarPage = () => {
return (
<div>
<Title render={(previousTitle) => `Snackbar - ${previousTitle}`} />
<MarkdownElement text={SnackbarReadmeText} />
<CodeExample
title="Simple example"
description={descriptions.simple}
code={SnackbarExampleSimpleCode}
>
<SnackbarExampleSimple />
</CodeExample>
<CodeExample
title="Example action"
description={descriptions.action}
code={SnackbarExampleActionCode}
>
<SnackbarExampleAction />
</CodeExample>
<CodeExample
title="Consecutive Snackbars"
description={descriptions.consecutive}
code={SnackbarExampleTwiceCode}
>
<SnackbarExampleTwice />
</CodeExample>
<PropTypeDescription code={SnackbarCode} />
</div>
);
};
export default SnackbarPage;
|
packages/components/src/List/ListComposition.stories.js | Talend/ui | import React from 'react';
import { action } from '@storybook/addon-actions';
import { simpleCollection } from './ListComposition/collection';
import ActionBar from '../ActionBar';
import List from '.';
const titleProps = rowData => ({
onClick: action('onTitleClick'),
'data-feature': `list.item.title.${rowData.id}`,
actionsKey: 'titleActions',
persistentActionsKey: 'persistentActions',
displayModeKey: 'display',
iconKey: 'icon',
onEditCancel: action('cancel-edit'),
onEditSubmit: action('submit-edit'),
iconTooltip: 'TDP',
});
function CustomList(props) {
return (
<List.VList id="my-vlist" {...props}>
<List.VList.Text label="Id" dataKey="id" />
<List.VList.Title label="Name" dataKey="name" columnData={titleProps} />
<List.VList.IconText label="IconText" dataKey="iconAndText" />
<List.VList.IconText
label="IconText"
columnData={{
getIcon: () => 'talend-tdp-colored',
getIconTooltip: ({ iconAndTextWithGetter }) => `${iconAndTextWithGetter}--icon tooltip`,
}}
dataKey="iconAndTextWithGetter"
/>
<List.VList.Boolean label="Valid" dataKey="isValid1" />
<List.VList.Boolean
label="ValidWithIcon"
dataKey="isValid2"
columnData={{ displayMode: List.VList.Boolean.displayMode.ICON }}
/>
<List.VList.QualityBar label="Quality" dataKey="quality" />
<List.VList.Label label="TagLabel" dataKey="tagLabel" />
<List.VList.Badge label="Tag" dataKey="tag" columnData={{ selected: true }} disableSort />
<List.VList.Text label="Description" dataKey="description" disableSort />
<List.VList.Text label="Author" dataKey="author" />
<List.VList.Datetime label="Created" dataKey="created" columnData={{ mode: 'format' }} />
<List.VList.Datetime label="Modified" dataKey="modified" columnData={{ mode: 'format' }} />
</List.VList>
);
}
function CustomListResizable(props) {
return (
<List.VList id="my-vlist" {...props}>
<List.VList.Text
label="Id"
dataKey="id"
resizable
width={400}
headerRenderer={List.VList.headerDictionary.resizable}
/>
<List.VList.Title
label="Name"
dataKey="name"
columnData={titleProps}
resizable
width={400}
headerRenderer={List.VList.headerDictionary.resizable}
/>
<List.VList.Badge
label="Tag"
dataKey="tag"
columnData={{ selected: true }}
disableSort
resizable
width={400}
/>
</List.VList>
);
}
function CustomListLazyLoading(props) {
return (
<List.LazyLoadingList id="my-infinite-scroll-list" {...props}>
<List.VList.Text label="Id" dataKey="id" />
<List.VList.Title label="Name" dataKey="name" columnData={titleProps} />
<List.VList.Badge label="Tag" dataKey="tag" columnData={{ selected: true }} disableSort />
<List.VList.Text label="Description" dataKey="description" disableSort />
<List.VList.Text label="Author" dataKey="author" />
<List.VList.Datetime label="Created" dataKey="created" columnData={{ mode: 'format' }} />
<List.VList.Datetime label="Modified" dataKey="modified" columnData={{ mode: 'format' }} />
</List.LazyLoadingList>
);
}
export default {
title: 'Data/List/List Composition',
};
export const Default = () => (
<div className="virtualized-list">
<h1>Default list</h1>
<p>By default List doesn't come with any feature</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.VList id="my-vlist">
<List.VList.Text label="Id" dataKey="id" />
<List.VList.Title
label="Name"
dataKey="name"
columnData={titleProps}
{...CellTitle}
/>
...
<List.VList.Datetime label="Modified" dataKey="modified" />
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<CustomList />
</List.Manager>
</section>
</div>
);
export const DisplayModeUncontrolled = () => (
<div className="virtualized-list">
<h1>List with display mode change</h1>
<p>You can change display mode by adding the selector in toolbar</p>
<pre>
{`
<List.Manager id="my-list" collection={collection} initialDisplayMode="table">
<List.Toolbar>
<List.Toolbar.Right>
<List.DisplayMode id="my-list-displayMode" />
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.DisplayMode id="my-list-displayMode" />
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
</section>
</div>
);
export const DisplayModeControlled = () => (
<div className="virtualized-list">
<h1>List with display mode change</h1>
<p>
You can control the display mode by
<br />
- passing the display mode to List.DisplayMode and List.VList
<br />- handling the display mode change via List.DisplayMode onChange prop
</p>
<pre>
{`
<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.DisplayMode
id="my-list-displayMode"
selectedDisplayMode="table"
onChange={(event, displayMode) => changeDisplayMode(displayMode)}
/>
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.DisplayMode
id="my-list-displayMode"
onChange={action('onDisplayModeChange')}
selectedDisplayMode="table"
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList type="TABLE" />
</List.Manager>
</section>
</div>
);
export const TotalItems = () => (
<div className="virtualized-list">
<h1>Total items</h1>
<p>You can show the total number of elements in the list by adding the ItemsNumber component</p>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.ItemsNumber totalItems="100" label="100 users" />
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.ItemsNumber
totalItems={simpleCollection.length}
label={`${simpleCollection.length} users`}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList type="TABLE" />
</List.Manager>
</section>
</div>
);
export const TextFilterUncontrolled = () => (
<div className="virtualized-list">
<h1>Text Filter</h1>
<p>You can filter the dataset with the text by adding the component and let it work itself</p>
<p>
You can manually restrict the filter scope to specific columns, by passing the dataKey, here
it equals to <code>name</code> and <code>description</code>, but it's optional.
</p>
<p>Note that the Column Chooser will impact the results, we can filter only on what we see!</p>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.TextFilter id="my-list-textFilter" applyOn={['name', 'description']} />
<List.ColumnChooser />
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager
id="my-list"
collection={simpleCollection}
initialVisibleColumns={['id', 'name']}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.TextFilter id="my-list-textFilter" applyOn={['name', 'description']} />
<List.ColumnChooser onSubmit={action('onSubmit')} />
</List.Toolbar.Right>
</List.Toolbar>
<CustomList type="TABLE" />
</List.Manager>
</section>
</div>
);
export const TextFilterControlled = () => (
<div className="virtualized-list">
<h1>Text Filter</h1>
<p>
You can control the filter feature by providing callbacks to
<br />
- handle the text filter value change and filter data
<br />- handle the text filter's docked status
</p>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.TextFilter id="my-list-textFilter" docked={false} onChange={action('onChange')} onToggle={action('onToggle')} />
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.TextFilter
id="my-list-textFilter"
docked={false}
onChange={action('onChange')}
onToggle={action('onToggle')}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList type="TABLE" />
</List.Manager>
</section>
</div>
);
export const SortByUncontrolled = () => (
<div className="virtualized-list">
<h1>List with sorting feature</h1>
<p>You can change the sorting criteria by adding the component in the toolbar</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[{ key: 'name', label: 'Name' }, { key: 'id', label: 'Id' }]}
initialValue={{ sortBy: 'id', isDescending: true }}
/>
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager
collection={simpleCollection}
id="my-list"
initialSortParams={{ sortBy: 'id', isDescending: true }}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[
{ key: 'id', label: 'Id' },
{ key: 'name', label: 'Name' },
]}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
</section>
</div>
);
export const SortByUncontrolledInLargeMode = () => (
<div className="virtualized-list">
<h1>List with sorting feature</h1>
<p>You can change the sorting criteria by adding the component in the toolbar</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.SortBy
id="my-list-sortBy"
options={[{ key: 'name', label: 'Name' }, { key: 'id', label: 'Id' }]}
initialValue={{ sortBy: 'id', isDescending: true }}
/>
<List.DisplayMode id="my-list-displayMode" initialDisplayMode="large" />
</List.Toolbar>
<List.VList id="my-vlist">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager
collection={simpleCollection}
id="my-list"
initialSortParams={{ sortBy: 'id', isDescending: true }}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[
{ key: 'id', label: 'Id' },
{ key: 'name', label: 'Name' },
]}
/>
<List.DisplayMode id="my-list-displayMode" initialDisplayMode="large" />
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
</section>
</div>
);
export const SortByControlled = () => (
<div className="virtualized-list">
<h1>List with sorting feature</h1>
<p>
You can control the sorting feature by providing both onChange and onOrderChange props
(functions) to the SortBy component.
</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.SortBy
id="my-list-sortBy"
options={[{ key: 'name', label: 'Name' }, { key: 'id', label: 'Id' }]}
onChange={action('onSortChange')}
value={{ sortBy: 'name', isDescending: false }}
/>
</List.Toolbar>
<List.VList id="my-vlist">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[
{ key: 'name', label: 'Name' },
{ key: 'id', label: 'Id' },
]}
value={{ sortBy: 'name', isDescending: false }}
onChange={action('onSortChange')}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
</section>
</div>
);
export const SortByAndResizableColumnUncontrolled = () => (
<div className="virtualized-list">
<h1>List with sorting feature and resizing column</h1>
<p>You can change the sorting criteria by adding the component in the toolbar</p>
<p>
You can add the resizing column by adding the properties resizable, a width and use the
headerRenderer "'resizable'" (note: the last column don't need to have the headerRenderer)
</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[{ key: 'name', label: 'Name' }, { key: 'id', label: 'Id' }]}
initialValue={{ sortBy: 'id', isDescending: true }}
/>
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist">
<List.VList.Text
label="Id"
dataKey="id"
resizable
width={400}
headerRenderer={List.VList.headerDictionary['resizable']}
/>
<List.VList.Title
label="Name"
dataKey="name"
columnData={titleProps}
resizable
width={400}
headerRenderer={List.VList.headerDictionary['resizable']}
/>
<List.VList.Badge
label="Tag"
dataKey="tag"
columnData={{ selected: true }}
disableSort
resizable
width={400}
/>
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager
collection={simpleCollection}
id="my-list"
initialSortParams={{ sortBy: 'id', isDescending: true }}
>
<List.Toolbar>
<List.Toolbar.Right>
<List.SortBy
id="my-list-sortBy"
options={[
{ key: 'id', label: 'Id' },
{ key: 'name', label: 'Name' },
]}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomListResizable />
</List.Manager>
</section>
</div>
);
export const LotsOfActionsLayoutRenderUncontrolled = () => (
<div className="virtualized-list">
<h1>List with multiple right actions</h1>
<p>
With multiple actions the Right component will align the actions to the right, and add a
separator between each.
</p>
<pre>
{`
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<List.Toolbar.Right>
<List.TextFilter id="my-list-textFilter" />
<List.SortBy
id="my-list-sortBy"
options={[{ key: 'name', label: 'Name' }, { key: 'id', label: 'Id' }]}
initialValue={{ sortBy: 'id', isDescending: true }}
/>
<List.DisplayMode id="my-list-displayMode" />
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<ActionBar
actions={{
left: [
{ icon: 'talend-cog', label: 'Foo', onClick: action('foo') },
{ icon: 'talend-cog', label: 'Bar', onClick: action('bar') },
],
}}
/>
<List.Toolbar.Right>
<List.TextFilter id="my-list-textFilter" />
<List.SortBy
id="my-list-sortBy"
options={[
{ key: 'name', label: 'Name' },
{ key: 'id', label: 'Id' },
]}
initialValue={{ sortBy: 'id', isDescending: true }}
/>
<List.DisplayMode id="my-list-displayMode" />
</List.Toolbar.Right>
</List.Toolbar>
<CustomList />
</List.Manager>
</section>
</div>
);
export const LazyLoading = () => (
<div className="virtualized-list">
<h1>List supporting Lazy Loding</h1>
<p>
The LazyLoadingList list component allows to create lists that supports lazy loading feature.
<br />
It requires :<br />- <code>loadMoreRows</code> prop triggered when data loading is required
<br />- <code>rowCount</code> prop representing the collection's total number of items
<br />
Skeleton rows are rendered when data is missing, while they are being fetched.
</p>
<pre>
{`
<List.Manager id="my-list" collection={collection}>
<List.LazyLoadingList id="my-infinite-scroll-list" loadMoreRows={loadMoreRows} rowCount={totalRowCount}>
<List.VList.Text label="Id" dataKey="id" width={-1} />
...
</List.LazyLoadingList>
</List.Manager>
`}
</pre>
<h2>Table mode</h2>
<section style={{ height: '30vh' }}>
<List.Manager id="my-table-list" collection={[simpleCollection[0]]}>
<CustomListLazyLoading
type="TABLE"
loadMoreRows={action('onLoadMoreRows')}
rowCount={simpleCollection.length}
onRowsRendered={action('onRowsRendered')}
/>
</List.Manager>
</section>
<h2>Large mode</h2>
<section style={{ height: '30vh' }}>
<List.Manager id="my-large-list" collection={[simpleCollection[0]]}>
<CustomListLazyLoading
type="LARGE"
loadMoreRows={action('onLoadMoreRows')}
rowCount={simpleCollection.length}
/>
</List.Manager>
</section>
<h2>Collapsible panel mode</h2>
<section style={{ height: '30vh' }}>
<List.Manager
id="my-collapsible-panels-list"
collection={[
{
id: 'status-header',
header: [
{
displayMode: 'status',
actions: [],
status: 'successful',
label: 'Successful',
icon: 'talend-check',
},
],
content: [
{
label: 'Content1',
description: 'Description1',
},
{
label: 'Content2',
description: 'Description2',
},
],
expanded: true,
children: <div>HELLO WORLD</div>,
},
]}
>
<CustomListLazyLoading
type="COLLAPSIBLE_PANEL"
loadMoreRows={action('onLoadMoreRows')}
rowCount={50}
/>
</List.Manager>
</section>
</div>
);
export const SelectableItems = () => {
const { isSelected, onToggleAll, onToggleItem } = List.hooks.useCollectionSelection(
simpleCollection,
[],
'id',
);
return (
<div className="virtualized-list">
<h1>List with selectable items</h1>
<p>The list also supports items selection, when using the proper hook.</p>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<CustomList
isSelected={isSelected}
onToggleAll={onToggleAll}
selectionToggle={(_, group) => onToggleItem(group)}
/>
</List.Manager>
</section>
</div>
);
};
export const SelectableItemsActionBar = () => {
const { isSelected, onToggleAll, onToggleItem } = List.hooks.useCollectionSelection(
simpleCollection,
[1, 2],
'id',
);
return (
<div className="virtualized-list">
<h1>List with selectable items + an ActionBar</h1>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<ActionBar
selected={2}
multiSelectActions={{...}}
/>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<ActionBar
selected={2}
multiSelectActions={{
left: [
{
id: 'remove-items',
icon: 'talend-trash',
label: 'Delete',
},
],
}}
/>
</List.Toolbar>
<CustomList
isSelected={isSelected}
onToggleAll={onToggleAll}
selectionToggle={(_, group) => onToggleItem(group)}
/>
</List.Manager>
</section>
</div>
);
};
export const SelectableItemsTotalItems = () => {
const { isSelected, onToggleAll, onToggleItem } = List.hooks.useCollectionSelection(
simpleCollection,
[1, 2],
'id',
);
return (
<div className="virtualized-list">
<h1>List with selectable items + total number of items</h1>
<p>The number of selected items is available in the right toolbar</p>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.Toolbar>
<ActionBar
selected={2}
hideCount <== the number of selected items must be hidden in the ActionBar
multiSelectActions={{...}}
/>
<List.Toolbar.Right>
<List.ItemsNumber totalItems="100" selected="2" label="100 users" labelSelected="2/100 users" />
</List.Toolbar.Right>
</List.Toolbar>
<List.VList id="my-vlist" type="TABLE">
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<List.Toolbar>
<ActionBar
selected={2}
hideCount
multiSelectActions={{
left: [
{
id: 'remove-items',
icon: 'talend-trash',
label: 'Delete',
},
],
}}
/>
<List.Toolbar.Right>
<List.ItemsNumber
totalItems={simpleCollection.length}
selected={2}
label={`${simpleCollection.length} users`}
labelSelected={`2/${simpleCollection.length} users`}
/>
</List.Toolbar.Right>
</List.Toolbar>
<CustomList
isSelected={isSelected}
onToggleAll={onToggleAll}
selectionToggle={(_, group) => onToggleItem(group)}
/>
</List.Manager>
</section>
</div>
);
};
export const TableWithColumnChooser = () => (
<div className="virtualized-list">
<h1>List with Column chooser in header</h1>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.VList id="my-vlist" columnChooser>
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<CustomList columnChooser />
</List.Manager>
</section>
</div>
);
export const TableWithColumnChooserAndInitialVisibleColumns = () => (
<div className="virtualized-list">
<h1>List with Column chooser in header with initialized visible columns</h1>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
initialVisibleColumns={['id', 'name', 'quality']}
>
<List.VList id="my-vlist" columnChooser>
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager
id="my-list"
collection={simpleCollection}
initialVisibleColumns={['id', 'name', 'quality']}
>
<CustomList columnChooser />
</List.Manager>
</section>
</div>
);
export const TableWithColumnChooserAndLockedColumns = () => (
<div className="virtualized-list">
<h1>List with Column chooser in header and locked columns</h1>
<p>You can pass any column chooser properties from VList columnChooser property</p>
<pre>
{`<List.Manager
id="my-list"
collection={collection}
>
<List.VList id="my-vlist" columnChooser={{ nbLockedLeftItems: 2 }}>
...
</List.VList>
</List.Manager>
`}
</pre>
<section style={{ height: '50vh' }}>
<List.Manager id="my-list" collection={simpleCollection}>
<CustomList columnChooser={{ nbLockedLeftItems: 2 }} />
</List.Manager>
</section>
</div>
);
|
src/components/Widgets/UnknownPreview.js | radekzz/netlify-cms-test | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import previewStyle from './defaultPreviewStyle';
export default function UnknownPreview({ field }) {
return <div style={previewStyle}>No preview for widget “{field.get('widget')}”.</div>;
}
UnknownPreview.propTypes = {
field: ImmutablePropTypes.map,
};
|
packages/react-router-native/examples/BasicExample.js | d-oliveros/react-router | import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { NativeRouter, Route, Link } from 'react-router-native'
const Home = () => (
<Text style={styles.header}>
Home
</Text>
)
const About = () => (
<Text style={styles.header}>
About
</Text>
)
const Topic = ({ match }) => (
<Text style={styles.topic}>
{match.params.topicId}
</Text>
)
const Topics = ({ match }) => (
<View>
<Text style={styles.header}>Topics</Text>
<View>
<Link
to={`${match.url}/rendering`}
style={styles.subNavItem}
underlayColor='#f0f4f7'>
<Text>Rendering with React</Text>
</Link>
<Link
to={`${match.url}/components`}
style={styles.subNavItem}
underlayColor='#f0f4f7'>
<Text>Components</Text>
</Link>
<Link
to={`${match.url}/props-v-state`}
style={styles.subNavItem}
underlayColor='#f0f4f7'>
<Text>Props v. State</Text>
</Link>
</View>
<Route path={`${match.url}/:topicId`} component={Topic}/>
<Route exact path={match.url} render={() => (
<Text style={styles.topic}>Please select a topic.</Text>
)} />
</View>
)
const App = () => (
<NativeRouter>
<View style={styles.container}>
<View style={styles.nav}>
<Link
to="/"
underlayColor='#f0f4f7'
style={styles.navItem}>
<Text>Home</Text>
</Link>
<Link
to="/about"
underlayColor='#f0f4f7'
style={styles.navItem}>
<Text>About</Text>
</Link>
<Link
to="/topics"
underlayColor='#f0f4f7'
style={styles.navItem} >
<Text>Topics</Text>
</Link>
</View>
<Route exact path="/" component={Home}/>
<Route path="/about" component={About}/>
<Route path="/topics" component={Topics}/>
</View>
</NativeRouter>
)
const styles = StyleSheet.create({
container: {
marginTop: 25,
padding: 10,
},
header: {
fontSize: 20,
},
nav: {
flexDirection: 'row',
justifyContent: 'space-around'
},
navItem: {
flex: 1,
alignItems: 'center',
padding: 10,
},
subNavItem: {
padding: 5,
},
topic: {
textAlign: 'center',
fontSize: 15,
}
})
export default App |
js/components/LoadingIndicator.react.js | kkka/asd | /**
* LoadingIndicator.react.js
*
* A loading indicator, copied from https://github.com/tobiasahlin/SpinKit
*
*/
import React from 'react';
// Since this component doesn't need any state, make it a stateless component
function LoadingIndicator() {
return (
<div>Loading
<div className="sk-fading-circle">
<div className="sk-circle1 sk-circle"></div>
<div className="sk-circle2 sk-circle"></div>
<div className="sk-circle3 sk-circle"></div>
<div className="sk-circle4 sk-circle"></div>
<div className="sk-circle5 sk-circle"></div>
<div className="sk-circle6 sk-circle"></div>
<div className="sk-circle7 sk-circle"></div>
<div className="sk-circle8 sk-circle"></div>
<div className="sk-circle9 sk-circle"></div>
<div className="sk-circle10 sk-circle"></div>
<div className="sk-circle11 sk-circle"></div>
<div className="sk-circle12 sk-circle"></div>
</div>
</div>
)
}
export default LoadingIndicator;
|
examples/index.android.js | mayuur/react-native-callout | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
Animated,
View,
Dimensions,
} from 'react-native';
let { screenWidth, screenHeight } = Dimensions.get('window')
var MJCallout = require('react-native-callout');
class calloutExample extends Component {
constructor(props) {
super(props);
this.topButton = TouchableHighlight;
this.state = {
calloutOpacity: new Animated.Value(0),
calloutText: 'Sample Callout Text',
calloutTop:0,
calloutLeft:0,
calloutWidth:200,
arrowPosition:'up',
};
}
render() {
return (
<View style={styles.container}>
<Text style={styles.headerText}>
MJCallout Example
</Text>
<View style = {styles.buttonsView}>
<TouchableHighlight
ref = {component => this.topButton = component}
style={[styles.buttonCallout, styles.buttonTop]} onPress={this.buttonClicked.bind(this,0)}>
<Text style={styles.buttonText}> Top </Text>
</TouchableHighlight>
<TouchableHighlight
ref = {component => this.leftButton = component}
style={styles.buttonCallout} onPress={this.buttonClicked.bind(this,1)}>
<Text style={styles.buttonText}> Left </Text>
</TouchableHighlight>
<TouchableHighlight
ref = {component => this.rightButton = component}
style={styles.buttonCallout} onPress={this.buttonClicked.bind(this,2)}>
<Text style={styles.buttonText}> Right </Text>
</TouchableHighlight>
<TouchableHighlight
ref = {component => this.downButton = component}
style={styles.buttonCallout} onPress={this.buttonClicked.bind(this,3)}>
<Text style={styles.buttonText}> Bottom </Text>
</TouchableHighlight>
</View>
{this.renderCallOut()}
</View>
);
}
renderCallOut() {
//show callout only when needed
if(!this.state.calloutOpacity) {
return
}
//add callout if needed
return (
<View style={{position:'absolute', top:this.state.calloutTop, left:this.state.calloutLeft}}>
<MJCallout width={this.state.calloutWidth} visibility={this.state.calloutOpacity} calloutText={this.state.calloutText} arrowDirection={this.state.arrowPosition}>
</MJCallout>
</View>
)
}
buttonClicked(index) {
var calloutX = 0;
var calloutY = 0;
if(index == 0) {
this.topButton.measure( (fx, fy, width, height, px, py) => {
this.setState({
calloutText:'Callout at top position',
calloutOpacity: new Animated.Value(1),
arrowPosition:'down',
calloutTop:py-30,
calloutLeft:px,
calloutWidth:190,
})
})
}
else if(index == 1) {
this.leftButton.measure( (fx, fy, width, height, px, py) => {
this.setState({
calloutText:'Left Side Callout',
calloutOpacity: new Animated.Value(1),
arrowPosition:'right',
calloutTop:py+5,
calloutLeft:px+115,
calloutWidth:170,
})
})
}
else if(index == 2) {
this.rightButton.measure( (fx, fy, width, height, px, py) => {
this.setState({
calloutText:'Right Side Callout',
calloutOpacity: new Animated.Value(1),
arrowPosition:'left',
calloutTop:py+5,
calloutLeft:px-85,
calloutWidth:175,
})
})
}
else if(index == 3) {
this.downButton.measure( (fx, fy, width, height, px, py) => {
this.setState({
calloutText:'Callout at down position',
calloutOpacity: new Animated.Value(1),
arrowPosition:'up',
calloutTop:py+55,
calloutLeft:px,
calloutWidth:200,
})
})
}
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
headerText: {
marginTop:30,
fontSize: 30,
fontWeight: '300',
height:50,
},
buttonsView: {
flex:1,
alignSelf:'stretch',
justifyContent:'center',
alignItems:'center',
},
buttonCallout: {
marginTop:20,
justifyContent:'center',
alignItems:'center',
backgroundColor:'green',
width:200,
height: 50,
borderColor: 'black',
borderWidth:2,
borderRadius:10,
backgroundColor:'green',
},
buttonTop : {
marginTop:-50,
},
buttonText: {
textAlign:'center',
},
});
AppRegistry.registerComponent('calloutExample', () => calloutExample);
|
www/imports/component/Namer.js | ucscHexmap/hexagram |
// Namer.js
// A modal to prompt the user to name something.
// If you want something more complex use Modal.js instead.
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Modal from './Modal.js';
export default class Namer extends Component {
constructor (props) {
super(props);
this.state = props;
this.handleCloseModal = this.handleCloseModal.bind(this);
this.handleTextKeyPress = this.handleTextKeyPress.bind(this);
this.handleTextChange = this.handleTextChange.bind(this);
this.handleOkButtonClick = this.handleOkButtonClick.bind(this);
this.componentDidUpdate = this.componentDidUpdate.bind(this);
}
handleCloseModal (response) {
// We handle the callback here, rather than in Modal, so we can
// fix up the response.
this.setState({ isOpen: false });
if (this.state.callback) {
if (_.isUndefined(response) || typeof response !== 'string') {
this.state.callback();
} else {
this.state.callback(response);
}
}
}
handleOkButtonClick () {
this.handleCloseModal(this.state.textInputStr.trim());
}
handleTextKeyPress (event) {
// Allow an 'Enter' key press to trigger the button.
if (event.key === "Enter") {
this.handleOkButtonClick();
}
}
handleTextChange (event) {
this.setState({ textInputStr: event.target.value });
}
componentDidUpdate () {
var self = this;
// Set the text value here to force the cursor to the end.
setTimeout(function () {
if (self.$text) {
self.$text.val(self.state.textInputStr).focus();
}
}, 300);
}
renderButton (self) {
// Build the button.
var button =
<button
onClick = {self.handleOkButtonClick}
className = 'defaultButton'
>
OK
</button>
;
return button;
}
renderTextInput (self) {
// Build the text input box.
var input =
<input
type = 'text'
onKeyPress = {self.handleTextKeyPress}
onChange = {self.handleTextChange}
style={{ width: '20em' }}
ref={(input) => { this.$text = $(input); }}
/>
;
return input;
}
renderPromptStr (self) {
// Convert any single string msg to an array of one msg.
var msg = self.state.promptStr,
msgArray = (typeof msg === 'string') ? [msg] : msg;
return msgArray.map((str, i) =>
<p key = {i} >
{str}
</p>
);
}
render () {
// Only show when isOpen state is true.
if (!this.state.isOpen) {
return null;
}
var self = this;
return (
<Modal
isOpen = {self.state.isOpen}
onRequestClose = {self.handleCloseModal}
body = {
<div>
{this.renderPromptStr(self)}
{this.renderTextInput(self)}
</div>
}
buttons = {this.renderButton(self)}
/>
);
}
}
Namer.propTypes = {
// The text to display as a prompt to the user; either a string
// or an array of strings, one per paragraph.
promptStr: PropTypes.string.isRequired,
// Controls the modal visibility.
isOpen: PropTypes.bool,
// The default text to display in the text input box.
textInputStr: PropTypes.string,
// Function to call upon modal close.
callback: PropTypes.func,
};
Namer.defaultProps = {
isOpen: true,
textInputStr: '',
};
|
src/Fade.js | cgvarela/react-bootstrap | import React from 'react';
import Transition from 'react-overlays/lib/Transition';
import CustomPropTypes from './utils/CustomPropTypes';
import deprecationWarning from './utils/deprecationWarning';
class Fade extends React.Component {
render() {
let timeout = this.props.timeout || this.props.duration;
return (
<Transition
{...this.props}
timeout={timeout}
className="fade"
enteredClassName="in"
enteringClassName="in"
>
{this.props.children}
</Transition>
);
}
}
// Explicitly copied from Transition for doc generation.
// TODO: Remove duplication once #977 is resolved.
Fade.propTypes = {
/**
* Show the component; triggers the fade in or fade out animation
*/
in: React.PropTypes.bool,
/**
* Unmount the component (remove it from the DOM) when it is faded out
*/
unmountOnExit: React.PropTypes.bool,
/**
* Run the fade in animation when the component mounts, if it is initially
* shown
*/
transitionAppear: React.PropTypes.bool,
/**
* Duration of the fade animation in milliseconds, to ensure that finishing
* callbacks are fired even if the original browser transition end events are
* canceled
*/
timeout: React.PropTypes.number,
/**
* duration
* @private
*/
duration: CustomPropTypes.all([
React.PropTypes.number,
(props)=> {
if (props.duration != null) {
deprecationWarning('Fade `duration`', 'the `timeout` prop');
}
return null;
}
]),
/**
* Callback fired before the component fades in
*/
onEnter: React.PropTypes.func,
/**
* Callback fired after the component starts to fade in
*/
onEntering: React.PropTypes.func,
/**
* Callback fired after the has component faded in
*/
onEntered: React.PropTypes.func,
/**
* Callback fired before the component fades out
*/
onExit: React.PropTypes.func,
/**
* Callback fired after the component starts to fade out
*/
onExiting: React.PropTypes.func,
/**
* Callback fired after the component has faded out
*/
onExited: React.PropTypes.func
};
Fade.defaultProps = {
in: false,
timeout: 300,
unmountOnExit: false,
transitionAppear: false
};
export default Fade;
|
src/modules/pages/PushLeft.js | lenxeon/react | require('../../css/drawer.less')
import React from 'react';
const ReactPropTypes = React.PropTypes;
class Drawer extends React.Component {
constructor(props) {
super(props);
this.state = {
open: props.open
};
this.props.width = 600;
}
state: {
}
componentWillUpdate() {}
componentWillReceiveProps() {
console.log(this.props);
console.log(this.state);
if (this.state.open) {
this.setState({
open: false,
})
setTimeout(() => {
this.setState({
open: this.props.open,
})
}, 230)
} else {
this.setState({
open: this.props.open,
})
}
}
componentWillMount() {}
componentWillUnmount() {
this.distoryLayer();
}
componentDidUpdate() {
this.renderLayer();
}
componentDidMount() {
this.renderLayer();
}
_click() {
this.setState({
open: false
})
}
renderChild() {
let cls = 'className';
return ( <div className = {this.props.className}>
<div className = "mod-view-in-wrap">
<div className = "mod-view-body-wrap"> {
this.props.children
} </div> </div> <div className = "foot"
onClick = {
this._click.bind(this)
}>
<i className = "fa fa-angle-double-up"> </i> </div> </div>
)
}
renderLayer() {
if (this.state.open) {
if (this._target == null) {
this._target = document.createElement('div');
document.body.appendChild(this._target);
}
var height = $(document).height();
var width = $(document).width();
$(this._target).addClass('mod-view').css({
'transform': 'translate(' + (width) + 'px, 0px)',
'transition': 'transform 0ms',
'width': 600,
});
var o = this;
var st = 300;
setTimeout(function() {
$('body').addClass('open-mod');
$(o._target).css({
'transform': 'translate('+(width-600)+'px, 0px)',
'transition': 'transform 300ms cubic-bezier(0,1,0.5,1)'
})
}, st + 100);
setTimeout(function() {
$(o._target).addClass('shake');
}, st + 400)
var tree = o.renderChild();
React.render(tree, o._target);
} else {
this.distoryLayer();
}
}
distoryLayer() {
if (this._target != null) {
var t = this._target;
var height = $(t).height();
var width = $(document).width();
$(t).css({
'transform': 'translate('+width+'px, 0px)',
'transition': 'transform 300ms cubic-bezier(0,1,0.5,1)'
})
var o = this;
setTimeout(function() {
React.unmountComponentAtNode(o._target);
$(o._target).remove();
o._target = null;
typeof o.unbindWindowEvents === "function" ? o.unbindWindowEvents() : void 0;
$('body').removeClass('open-mod');
}, 200);
}
}
render() {
return ( <div /> )
}
};
export default Drawer; |
examples/esp-chat-react-es6/js/app.js | raybooysen/esp-js | import esp from 'esp-js'
import espDevTools from 'esp-js-devtools';
import React from 'react';
import ReactDOM from 'react-dom';
import model from './model';
import components from './components';
import services from './services';
// export for http://fb.me/react-devtools
window.React = React;
espDevTools.registerDevTools();
var router = esp.SingleModelRouter.create();
var messageService = new services.MessageService();
var chatAppModel = new model.ChatApp(messageService, router);
router.setModel(chatAppModel);
chatAppModel.initialise();
ReactDOM.render(
<components.ChatApp router={router} />,
document.getElementById('react')
);
router.publishEvent("InitEvent", {}); |
src/parser/priest/shadow/modules/spells/VoidformsTab.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import VoidformGraph from './VoidformGraph';
const VoidformsTab = ({ voidforms = [], insanityEvents, ...modules }) => {
if (voidforms.length === 0) {
return null;
}
return (
<div className="voidforms">
{voidforms.map((voidform, i) => (
<VoidformGraph
key={i}
{...voidform}
{...modules}
insanityEvents={(
insanityEvents.filter(event => event.timestamp >= voidform.start && event.timestamp <= voidform.start + voidform.duration)
)}
/>
))}
</div>
);
};
VoidformsTab.propTypes = {
voidforms: PropTypes.array.isRequired,
fightEnd: PropTypes.number.isRequired,
insanityEvents: PropTypes.array,
};
export default VoidformsTab;
|
packages/mineral-ui-icons/src/IconLocalDrink.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconLocalDrink(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps}>
<g>
<path d="M3 2l2.01 18.23C5.13 21.23 5.97 22 7 22h10c1.03 0 1.87-.77 1.99-1.77L21 2H3zm9 17c-1.66 0-3-1.34-3-3 0-2 3-5.4 3-5.4s3 3.4 3 5.4c0 1.66-1.34 3-3 3zm6.33-11H5.67l-.44-4h13.53l-.43 4z"/>
</g>
</Icon>
);
}
IconLocalDrink.displayName = 'IconLocalDrink';
IconLocalDrink.category = 'maps';
|
kit/lib/routing.js | Mahi22/MedTantra | /* eslint-disable no-param-reassign */
// ----------------------
// IMPORTS
import React from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect as ReactRouterRedirect } from 'react-router-dom';
// ----------------------
// <Status code="xxx"> component. Updates the context router's context, which
// can be used by the server handler to respond to the status on the server.
class Status extends React.PureComponent {
static propTypes = {
code: PropTypes.number.isRequired,
children: PropTypes.node,
}
static defaultProps = {
children: null,
}
render() {
const { code, children } = this.props;
return (
<Route render={({ staticContext }) => {
if (staticContext) {
staticContext.status = code;
}
return children;
}} />
);
}
}
// <NotFound> component. If this renders on the server in development mode,
// it will attempt to proxyify the request to the upstream `webpack-dev-server`.
// In production, it will issue a hard 404 and render. In the browser, it will
// simply render.
export class NotFound extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
}
static defaultProps = {
children: null,
}
render() {
const { children } = this.props;
return (
<Status code={404}>
{children}
</Status>
);
}
}
// <Redirect> component. Mirrors React Router's component by the same name,
// except it sets a 301/302 status code for setting server-side HTTP headers.
export class Redirect extends React.PureComponent {
static propTypes = {
to: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]).isRequired,
from: PropTypes.string,
push: PropTypes.bool,
permanent: PropTypes.bool,
};
static defaultProps = {
from: null,
push: false,
permanent: false,
}
render() {
const { to, from, push, permanent } = this.props;
const code = permanent ? 301 : 302;
return (
<Status code={code}>
<ReactRouterRedirect to={to} from={from} push={push} />
</Status>
);
}
}
|
src/views/components/ThermostatCard.js | physiii/open-automation | import React from 'react';
import PropTypes from 'prop-types';
import ServiceCardBase from './ServiceCardBase.js';
import {connect} from 'react-redux';
import './ThermostatCard.css';
export class ThermostatCard extends React.Component {
constructor (props) {
super(props);
const temp = this.props.service.state.get('current_temp') ? this.props.service.state.get('current_temp') : 0,
targetTemp = this.props.service.state.get('target_temp') ? this.props.service.state.get('target_temp') : 0,
fanMode = this.props.service.state.get('fan_mode') ? this.props.service.state.get('fan_mode') : 'off',
schedule = this.props.service.state.get('schedule') ? this.props.service.state.get('schedule') : {},
isPowerOn = this.props.service.state.get('power') ? this.props.service.state.get('power') : false,
isHoldOn = this.props.service.state.get('hold_mode') === 'on',
currentHour = this.props.service.state.get('current_hour') ? this.props.service.state.get('current_hour') : 0,
mode = this.props.service.state.get('mode') ? this.props.service.state.get('mode') : 'off';
this.state = {
is_changing: false,
temp,
targetTemp,
fanMode,
isPowerOn,
isHoldOn,
schedule,
currentHour,
mode
};
}
getTemp () {
return (
this.props.service.state.get('current_temp') ? this.props.service.state.get('current_temp') : '...'
);
}
getTargetTemp () {
return (
this.props.service.state.get('target_temp') ? this.props.service.state.get('target_temp') : '...'
);
}
getFanMode () {
return (
this.props.service.state.get('fan_mode') ? this.props.service.state.get('fan_mode') : '...'
);
}
getMode () {
return (
this.props.service.state.get('mode') ? this.props.service.state.get('mode') : '...'
);
}
getHoldMode () {
return (
this.props.service.state.get('hold_mode') ? this.props.service.state.get('hold_mode') : '...'
);
}
getHoldTemp () {
return (
this.props.service.state.get('hold_temp') ? this.props.service.state.get('hold_temp') : {min: 0, max: 0}
);
}
getHoldTempMin () {
return (
this.props.service.state.get('hold_temp') ? this.props.service.state.get('hold_temp') : {min: 0, max: 0}
);
}
getStatus () {
if (!this.state.isPowerOn) {
return 'Off';
}
return (
this.state.isHoldOn
? 'Hold ' + this.getHoldTemp().min + ' - ' + this.getHoldTemp().max
: 'Schedule ' + this.state.schedule[this.state.currentHour].minTemp + ' - ' + this.state.schedule[this.state.currentHour].maxTemp
);
}
isOutOfRange () {
const mode = this.getMode(),
temp = this.getTemp(),
targetTemp = this.getTargetTemp();
if (mode === 'cool' && temp <= targetTemp) {
return true;
}
if (mode === 'heat' && temp >= targetTemp) {
return true;
}
if (targetTemp === 0) {
return true;
}
return false;
}
render () {
return (
<ServiceCardBase
name={this.props.service.settings.get('name') || 'Thermostat'}
status={ this.getStatus() }
isConnected={this.props.service.state.get('connected')}
{...this.props}>
<center>
<span styleName="sensorTitle">
{this.getTemp()} ℉
</span>
<span styleName={this.getMode() === 'off' || this.isOutOfRange() ? 'hidden' : 'sensorValues'}>
<span styleName="coolValue">
{this.getMode() === 'cool' ? 'Cooling' : ''}
</span>
<span styleName="heatValue">
{this.getMode() === 'heat' ? 'Heating' : ''}
</span>
<span styleName="sensorValue">
to {this.getTargetTemp()}
</span>
</span>
</center>
</ServiceCardBase>
);
}
}
ThermostatCard.propTypes = {
service: PropTypes.object
};
const mapDispatchToProps = (stateProps, {dispatch}, ownProps) => ({
...dispatch,
...ownProps,
...stateProps
});
export default connect(null, null, mapDispatchToProps)(ThermostatCard);
|
project-my-demos/src/downloadList/views/downloadList.js | renhongl/Summary |
import React from 'react';
import Card from 'antd/lib/card';
import Icon from 'antd/lib/icon';
import '../style.css';
import Tooltip from 'antd/lib/tooltip';
const downloadList = [
{
title: '爱听播放器',
url: 'https://renhongl.github.io/other/AiTing.zip',
desc: '一个简洁、好看、功能丰富的播放器,相当于音乐播放器和听书软件的结合。',
src: 'https://renhongl.github.io/images/aiting1.png'
},
{
title: 'NodeJS刷票程序',
url: 'https://github.com/renhongl/Buy_Ticket',
desc: '这是一个脚本程序,运行在NodeJS环境之上,功能类似360抢票王。',
src: 'https://renhongl.github.io/images/buyTicket.jpg'
},
{
title: '网页聊天软件',
url: 'https://github.com/renhongl/AP_WEB',
desc: '目前平台除了搭建了基本的结构之外,还做了一个简单的一对一聊天应用和简单的博客系统。',
src: 'https://renhongl.github.io/images/homeAndRoom.png'
},
{
title: '桌面聊天室',
url: 'https://github.com/renhongl/applicationPlatform',
desc: '除了最基本的聊天外,还支持发一些表情,还可以设置字体,背景,以及主题。里面还集成了一个地图,如果是用电脑浏览器打开的,将会在地图上显示自己的位置。',
src: 'https://renhongl.github.io/images/chatRoom2.png'
}
]
export default () => {
return (
<div className="download-list-container">
{
downloadList.map((v, k) => {
return (
<Card key={k} bodyStyle={{ padding: 0 }}>
<div className="custom-image">
<img alt="example" width="100%" height="100%" src={v.src} />
</div>
<div className="custom-card">
<h3>
{v.title}
<Tooltip title={'点击下载 [' + v.title + ']'} placement="right">
<a href={v.url}>
<Icon type="download" className="download-icon"/>
</a>
</Tooltip>
</h3>
<p>{v.desc}</p>
</div>
</Card>
)
})
}
</div>
)
} |
src/svg-icons/action/http.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttp = (props) => (
<SvgIcon {...props}>
<path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z"/>
</SvgIcon>
);
ActionHttp = pure(ActionHttp);
ActionHttp.displayName = 'ActionHttp';
ActionHttp.muiName = 'SvgIcon';
export default ActionHttp;
|
src/components/data/DataCreator.js | dherault/Oso | import React from 'react';
import { connect } from 'react-redux';
import definitions from '../../models/';
import ac from '../../state/actionCreators';
import { capitalize } from '../../utils/text';
class DataCreator extends React.Component {
constructor() {
super();
const inputs = {};
const modelList = [];
for (let model in definitions) {
modelList.push(model);
inputs[model] = {};
}
const currentModel = definitions[modelList[0]];
this.state = {
modelList, currentModel, inputs,
goodToGo: false,
};
}
handleModelChange(e) {
this.setState({ currentModel: definitions[e.currentTarget.value] }, this.validate);
}
handleInputChange(col, e) {
const { inputs, currentModel } = this.state;
const newInputs = Object.assign({}, inputs);
newInputs[currentModel.name][col] = e.currentTarget.value;
this.setState({ inputs: newInputs }, this.validate);
}
handleSubmit() {
const { dispatch } = this.props;
const { currentModel: { name }, inputs, goodToGo } = this.state;
if (goodToGo) dispatch(ac['create' + capitalize(name)](inputs[name]));
}
validate() {
const { inputs, currentModel: { name, collumns } } = this.state;
const params = inputs[name];
for (let col in collumns) {
const value = params[col];
const { type, required, computed, min, max } = collumns[col];
if ((!computed && required && !value) || (value && type === 'string' && ((min && min > value.length) || (max && max < value.length)))) return this.setState({ goodToGo: false });
}
this.setState({ goodToGo: true });
}
renderForm() {
const { currentModel: { name, collumns }, inputs } = this.state;
const currentInputs = inputs[name];
return Object.keys(collumns).map(col => {
const { type, required, computed, min, max, ref } = collumns[col];
if (computed) return;
let control;
switch (type) {
case 'string':
case 'string/email':
control = <input type='text' value={currentInputs[col]} onChange={this.handleInputChange.bind(this, col)} />;
break;
case 'string/id':
// todo ?
break;
default:
return;
}
const infoRequired = required ? <span style={{color: 'red'}}> * </span> : undefined;
const infoValidation = !min && !max ? undefined :
min && max ? <span>{` (min: ${min}, max: ${max})`}</span> :
min ? <span>{` (min: ${min})`}</span> : <span>{` (max: ${max})`}</span>;
return <div key={col}>
<br/>
<span>{col + ': '}</span>
{ control } { infoRequired } { infoValidation }
</div>;
});
}
render() {
const { modelList, selectedModel, goodToGo } = this.state;
return <div>
<h2>Data creator</h2>
<div>
<span>What do you want to create? </span>
<select value={selectedModel} onChange={this.handleModelChange.bind(this)}>
{
modelList.map(m => <option key= {m} value={m}>{m}</option>)
}
</select>
</div>
{ this.renderForm() }
<br />
<input type='button' onClick={this.handleSubmit.bind(this)} value='Create' disabled={!goodToGo}/>
</div>;
}
}
export default connect()(DataCreator);
|
src/docs/layout/DocumentComponent.js | reactstrap/component-template | import React from 'react';
import { PrismCode } from 'react-prism';
import { dedent } from 'dentist';
const DocumentProptypes = (props) => {
const {
name,
proptypes
} = props.component;
return (
<div className="docs-component-props mt-5">
<h3>{name} - PropTypes</h3>
<pre>
<PrismCode className="language-jsx">
{`${name}.propTypes = ${dedent(proptypes)}`}
</PrismCode>
</pre>
</div>
);
};
const DocumentExamples = (props) => {
const {
name,
demo,
source
} = props.component;
return (
<div className="docs-component-props mt-5">
<h3>{name}</h3>
{ demo && (
<div className="docs-example">
{demo}
</div>
)}
{ source && (
<pre>
<PrismCode className="language-jsx">
{dedent(source)}
</PrismCode>
</pre>
)}
</div>
);
};
const DocumentComponent = (props) => {
const {
name,
children,
components = [],
examples = []
} = props;
return (
<div className="docs-component-section">
<h1>{name}</h1>
{children}
{ components.map((component,i) => <DocumentProptypes key={i} component={component} />)}
{ examples.map((example,i) => <DocumentExamples key={i} component={example} />)}
</div>
);
};
export default DocumentComponent;
|
src/icons/AndroidArrowDown.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class AndroidArrowDown extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g id="Icon_8_">
<g>
<path d="M277.375,85v259.704l119.702-119.702L427,256L256,427L85,256l29.924-29.922l119.701,118.626V85H277.375z"></path>
</g>
</g>
</g>;
} return <IconBase>
<g id="Icon_8_">
<g>
<path d="M277.375,85v259.704l119.702-119.702L427,256L256,427L85,256l29.924-29.922l119.701,118.626V85H277.375z"></path>
</g>
</g>
</IconBase>;
}
};AndroidArrowDown.defaultProps = {bare: false} |
rest-ui-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js | RestUI/create-rest-ui-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import React from 'react';
import logo from './assets/logo.svg';
export default () => <img id="feature-svg-inclusion" src={logo} alt="logo" />;
|
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/actual.js | vinicius-ov/Livefy | import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
|
projects/starter/src/index.js | ebemunk/blog | import React from 'react'
import ReactDOM from 'react-dom'
import 'react-vis/dist/style.css'
const render = (component, selector) =>
ReactDOM.render(component, document.querySelector(selector))
import A from './A'
render(<A />, '#hi')
|
packages/javascript/reactjs/react-getstart/react-contact-manager/src/components/contact-card.js | sharkspeed/dororis | // src/components/contact-card.js
import React from 'react'
import { Link } from 'react-router-dom'
import PropTypes from 'prop-types' // React v15+ 挪到额外模块中了
import { Card, Button, Icon } from 'semantic-ui-react'
import { deleteContact } from '../actions/contact-actions'
class ContactCard extends React.Component {
constructor(props, context) {
super(props, context)
this.deleteContact = this.deleteContact.bind(this)
}
deleteContact() {
}
render() {
var contact = this.props.contact
return (
<Card>
<Card.Content>
<Card.Header>
<Icon name="user outline" /> {contact.name.first} {contact.name.last}
</Card.Header>
<Card.Description>
<p><Icon name="phone" /> {contact.phone}</p>
<p><Icon name="mail outline" /> {contact.email}</p>
</Card.Description>
</Card.Content>
<Card.Content extra>
<div className="ui two buttons">
{/* <Button basic color="green">Edit</Button> */}
<Link to={`/contacts/edit/${contact._id}`} className="ui basic button green">Edit</Link>
<Button basic color="red" onClick={() => deleteContact(contact._id)}>Delete</Button>
</div>
</Card.Content>
</Card>
)
}
}
ContactCard.propTypes = {
contact: PropTypes.object.isRequired
}
export default ContactCard |
examples/js/basic/borderless-table.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item name ' + id,
price: 2100 + i
});
}
}
addProducts(5);
export default class BorderlessTable extends React.Component {
render() {
return (
<BootstrapTable data={ products } bordered={ false }>
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable>
);
}
}
|
docs/src/app/components/pages/components/Slider/ExampleStep.js | lawrence-yu/material-ui | import React from 'react';
import Slider from 'material-ui/Slider';
/**
* By default, the slider is continuous.
* The `step` property causes the slider to move in discrete increments.
*/
const SliderExampleStep = () => (
<Slider step={0.10} value={0.5} />
);
export default SliderExampleStep;
|
src/svg-icons/notification/confirmation-number.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationConfirmationNumber = (props) => (
<SvgIcon {...props}>
<path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z"/>
</SvgIcon>
);
NotificationConfirmationNumber = pure(NotificationConfirmationNumber);
NotificationConfirmationNumber.displayName = 'NotificationConfirmationNumber';
NotificationConfirmationNumber.muiName = 'SvgIcon';
export default NotificationConfirmationNumber;
|
rest-ui-scripts/template/src/resources/Post/crud/list/Filter.js | RestUI/create-rest-ui-app | import React from 'react';
import { Filter as CrudFilter, TextInput } from 'rest-ui/lib/mui';
import { translate } from 'rest-ui';
import Chip from 'material-ui/Chip';
const QuickFilter = translate(({ label, translate }) => <Chip style={{ marginBottom: 8 }}>{translate(label)}</Chip>);
const Filter = ({ ...props }) => (
<CrudFilter {...props}>
<TextInput label="post.list.search" source="q" alwaysOn />
<TextInput source="title" defaultValue="Qui tempore rerum et voluptates" />
<QuickFilter label="resources.posts.fields.commentable" source="commentable" defaultValue={true} />
</CrudFilter>
);
export default Filter; |
src/svg-icons/communication/import-contacts.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationImportContacts = (props) => (
<SvgIcon {...props}>
<path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zm0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5v11.5z"/>
</SvgIcon>
);
CommunicationImportContacts = pure(CommunicationImportContacts);
CommunicationImportContacts.displayName = 'CommunicationImportContacts';
CommunicationImportContacts.muiName = 'SvgIcon';
export default CommunicationImportContacts;
|
src/routes/index.js | dfalling/todo | import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to files regardless of how deeply nested
// your current file is.
import CoreLayout from 'layouts/CoreLayout/CoreLayout';
import HomeView from 'views/HomeView/HomeView';
import TodosView from 'views/TodosView/TodosView';
import TodoEditView from 'views/TodoEditView/TodoEditView';
import TagsView from 'views/TagsView/TagsView';
import TagEditView from 'views/TagEditView/TagEditView';
import NotFoundView from 'views/NotFoundView/NotFoundView';
import LoginView from 'views/LoginView/LoginView';
import RootView from 'views/RootView/RootView';
export default (store) => (
<Route path='/' component={CoreLayout}>
<IndexRoute component={HomeView} />
<RootView component={RootView}>
<Route path='/todos' component={TodosView} />
<Route path='/todos/:todoId' component={TodoEditView} />
<Route path='/tags' component={TagsView} />
<Route path='/tags/:tagId' component={TagEditView} />
<Route path='/404' component={NotFoundView} />
<Route path='/login' component={LoginView} />
</RootView>
<Redirect from='*' to='/404' />
</Route>
);
|
app/components/Info/index.js | anthonyjillions/anthonyjillions | import React from 'react';
import Icon from '../Icon';
import styles from './styles.css';
export default function Info() {
const list = [
'MERN stack dev',
'3rd party API integrations',
'Custom JS/CSS/HTML for tools like Tumblr, Shopify, Square etc.',
];
const list1 = [
'Full service music production',
'Engineering, production, mixing, sound design',
];
return (
<div className={styles.Info} >
<div className={styles.listContainer}>
<Icon name="code" size="2x" />
{list.map((value, i) => {
const render = (
<div key={i} className={styles.listItem}>
{value}
</div>
);
return render;
})
}
</div>
<div className={styles.listContainer}>
<Icon name="music" size="2x" />
{list1.map((value, i) => {
const render = (
<div key={i} className={styles.listItem}>
{value}
</div>
);
return render;
})
}
</div>
</div>
);
}
|
src/ActivitySwitcher.js | siiptuo/tiima-spa | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { startActivity } from './actions';
import * as activity from './activity';
export class ActivitySwitcher extends React.Component {
static propTypes = {
onActivityStart: PropTypes.func.isRequired,
loading: PropTypes.bool.isRequired,
};
constructor(props) {
super(props);
this.state = { input: '' };
}
handleInputChange = event => {
this.setState({ input: event.target.value });
};
handleSubmit = event => {
event.preventDefault();
const input = this.state.input.trim();
if (!input) {
return;
}
const { title, tags } = activity.parseInput(input);
this.props.onActivityStart(title, tags);
this.setState({ input: '' });
};
render() {
return (
<form className="start-activity-form" onSubmit={this.handleSubmit}>
<input
type="text"
placeholder="Activity title #tag1 #tag2"
value={this.state.input}
onChange={this.handleInputChange}
disabled={this.props.loading}
/>
<button type="submit" disabled={this.props.loading}>
▶
</button>
</form>
);
}
}
function mapStateToProps(state) {
return {
loading: state.activities.isFetching,
};
}
function mapDispatchToProps(dispatch) {
return {
onActivityStart(title, tags) {
dispatch(startActivity(title, tags));
},
};
}
export default connect(mapStateToProps, mapDispatchToProps)(ActivitySwitcher);
|
pages/blog/test-article-one.js | b1alpha/sdj | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>Test Article 1</h1>
<p>Coming soon.</p>
</div>
);
}
}
|
react/react-hn2/src/ItemList/ItemList.js | weaponhe/weaponhe.github.io | import React from 'react'
import PropTypes from 'prop-types'
import querystring from 'querystring'
import ItemStore from '../store/itemStore'
import Item from './Item'
import Spinner from '../Spinner/Spinner'
import Pager from '../pager/pager'
import './ItemList.css'
export default class ItemList extends React.Component {
constructor(props) {
super(props)
this.state = {
ITEMS_PER_PAGE: 10,
ids: [],
stories: [],
limit: props.limit
}
}
componentWillMount() {
this.store = new ItemStore(this.props.type)
this.store.addListener('update', this.handleUpdate)
this.store.start()
this.setState(this.store.getState())
}
componentWillUnmount() {
this.store.removeListener('update', this.handleUpdate)
}
handleUpdate = (update) => {
update.limit = update.ids.length
this.setState(update)
}
render() {
let page = pageCalc(this.getPageNumber(), this.state.ITEMS_PER_PAGE, this.props.limit)
if (this.state.stories.length === 0 && this.state.ids.length === 0) {
let dummyItems = []
for (let i = page.startIndex; i < page.endIndex; i++) {
dummyItems.push(<Spinner key={i}/>)
}
return (
<div>
<ol start={page.startIndex + 1}>
{dummyItems}
</ol>
<Pager route={this.props.type} hasNext={page.hasNext} page={page.pageNum}></Pager>
</div>
)
}
return (
<div>
<ol start={page.startIndex + 1}>
{this.renderItems(page.startIndex, page.endIndex)}
</ol>
<Pager route={this.props.type} hasNext={page.hasNext} page={page.pageNum}></Pager>
</div>
)
}
renderItems(startIndex, endIndex) {
let rendered = []
for (let i = startIndex; i < endIndex; i++) {
let id = this.state.ids[i],
item = this.state.stories[i]
rendered.push(<Item key={id} index={i} id={id} cachedItem={item} store={this.store}/>)
}
return rendered
}
getPageNumber(page) {
if (typeof page === 'undefined') {
let query = querystring.parse(this.props.location.search.slice(1))
page = query.page
}
return (page && /^\d+$/.test(page) ? Math.max(1, Number(page)) : 1)
}
}
function pageCalc(pageNum, pageSize, numItems) {
var startIndex = (pageNum - 1) * pageSize
var endIndex = Math.min(numItems, startIndex + pageSize)
var hasNext = endIndex < numItems - 1
return {pageNum, startIndex, endIndex, hasNext}
}
ItemList.propTypes = {
type: PropTypes.string.isRequired,
limit: PropTypes.number
}
ItemList.defaultProps = {
limit: 200
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.