Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// We use this Normalizr schemas to transform API responses from a nested form
// to a flat form where repos and users are placed in `entities`, and nested
// JSON objects are replaced with their IDs. This is very convenient for
// consumption by reducers, because we can easily build a normalized tree
// and keep it updated as we fetch more data.
// Read more about Normalizr: https://github.com/paularmstrong/normalizr
// GitHub's API may return results with uppercase letters while the query
// doesn't contain any. For example, "someuser" could result in "SomeUser"
// leading to a frozen UI as it wouldn't find "someuser" in the entities.
// That's why we're forcing lower cases down there.
// Action key that carries API call info interpreted by this Redux middleware.
export const CALL_API = Symbol('Call API')
// A Redux middleware that interprets actions with CALL_API info specified.
// Performs the call and promises when such actions are dispatched.
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
}
let { endpoint } = callAPI
const { schema, types } = callAPI
if (typeof endpoint === 'function') {
endpoint = endpoint(store.getState())
}
import Symbol from 'es6-symbol';
export default {
MENU: Symbol('select-menu'),
SELECTED: Symbol('select-selected')
};
* @constant notifyDeferredKey
* @type {Symbol}
*/
export const notifyDeferredKey = Symbol('freedraw/notify-deferred');
/**
* @constant edgesKey
* @type {Symbol}
*/
export const edgesKey = Symbol('freedraw/edges');
/**
* @constant cancelKey
* @type {Symbol}
*/
const cancelKey = Symbol('freedraw/cancel');
export default class FreeDraw extends FeatureGroup {
/**
* @constructor
* @param {Object} [options = {}]
* @return {void}
*/
constructor(options = defaultOptions) {
super();
this.options = { ...defaultOptions, ...options };
}
/**
* @method onAdd
* @param {Object} map
/**
* @flow
*/
import Symbol from "es6-symbol";
const CALL_API = Symbol("Call Firebase API");
export default CALL_API;
import {
getDataType,
getDisplayNameForReactElement,
getInObject,
formatDataForPreview,
setInObject,
} from './utils';
import type {DehydratedData} from 'react-devtools-shared/src/devtools/views/Components/types';
export const meta = {
inspectable: Symbol('inspectable'),
inspected: Symbol('inspected'),
name: Symbol('name'),
preview_long: Symbol('preview_long'),
preview_short: Symbol('preview_short'),
readonly: Symbol('readonly'),
size: Symbol('size'),
type: Symbol('type'),
unserializable: Symbol('unserializable'),
};
export type Dehydrated = {|
inspectable: boolean,
name: string | null,
preview_long: string | null,
preview_short: string | null,
readonly?: boolean,
size?: number,
type: string,
|};
import KeyboardSpacer from 'react-native-keyboard-spacer';
import type {
BaseAppCtx,
CustomActivityArgData,
StyleSheetLike,
OgData,
} from '../types';
import type { ActivityArgData } from 'getstream';
const ImageState = Object.freeze({
NO_IMAGE: Symbol('no_image'),
UPLOADING: Symbol('uploading'),
UPLOADED: Symbol('uploaded'),
UPLOAD_FAILED: Symbol('upload_failed'),
});
const urlRegex = /(https?:\/\/[^\s]+)/gi;
type Props = {|
/** The feed group part of the feed that the activity should be posted to */
feedGroup: string,
/** The user_id part of the feed that the activity should be posted to */
userId?: string,
/** The verb that should be used to post the activity */
activityVerb: string,
/** Make the form full screen. This can be useful when you have a separate
* screen for posting. */
fullscreen: boolean,
styles: StyleSheetLike,
/** Height in pixels for the whole component, if this is not set correctly
import Symbol from 'es6-symbol';
export default {
OPTIONS: Symbol('popup-options'),
CORE: Symbol('popup-core'),
POPUP: Symbol('popup-popup')
};
import Symbol from 'es6-symbol';
export default {
FOCUSED: Symbol('menuitem-focused'),
MENU: Symbol('menuitem-menu'),
SUBMENU: Symbol('menuitem-submenu'),
SUBMENU_TIMER: Symbol('menuitem-submenu-timer'),
SELECTED_ATTR: 'data-xb-selected'
};
import React, { Component } from 'react';
import { render } from 'react-dom';
import Symbol from 'es6-symbol';
import Modal from './modal';
import Delayed from '../../src/react-delayed';
/**
* @constant modalTypes
* @type {{without: *, with: *}}
*/
const modalTypes = {
without: Symbol('without'),
with: Symbol('with')
};
/**
* @class Example
* @extends {Component}
*/
class Example extends Component {
/**
* @constant state
* @type {{modal: null}}
*/
state = { modal: null };
/**
Keyboard,
} from 'react-native';
import { StreamContext } from '../Context';
import OgBlock from './OgBlock';
import { pickImage } from '../native';
import { buildStylesheet } from '../styles';
import _ from 'lodash';
import Symbol from 'es6-symbol';
import KeyboardAccessory from 'react-native-sticky-keyboard-accessory';
import KeyboardSpacer from 'react-native-keyboard-spacer';
const ImageState = Object.freeze({
NO_IMAGE: Symbol('no_image'),
UPLOADING: Symbol('uploading'),
UPLOADED: Symbol('uploaded'),
UPLOAD_FAILED: Symbol('upload_failed'),
});
const urlRegex = /(https?:\/\/[^\s]+)/gi;
export default class StatusUpdateFormSimple extends React.Component {
static defaultProps = {
feedGroup: 'user',
activity_verb: 'post',
styles: {
ogBlock: {
wrapper: {
padding: 15,
paddingTop: 8,
paddingBottom: 8,
borderTopColor: '#eee',