Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.validationHOCFactory = defaultValidationErrors => (Component => {
const ValidatedComponent = props => (
);
ValidatedComponent.propTypes = {
validationErrors: PropTypes.object // eslint-disable-line react/forbid-prop-types
};
return ValidatedComponent;
});
columnWidth: 200,
columnGutter: 0,
initialWidth: 1280,
initialHeight: 720,
itemHeightEstimate: 300,
itemKey: defaultGetItemKey,
overscanBy: 2,
}
if (__DEV__) {
const PropTypes = require('prop-types')
SizeObserver.displayName = 'SizeObserver'
SizeObserver.propTypes = {
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,
role: PropTypes.string,
style: PropTypes.object,
resizeObserver: PropTypes.object,
observerRef: PropTypes.func,
children: PropTypes.element,
}
Masonry.displayName = 'FreeMasonry'
Masonry.propTypes = {
columnCount: PropTypes.number,
columnWidth: PropTypes.number.isRequired,
columnGutter: PropTypes.number.isRequired,
width: PropTypes.number.isRequired, // width of the container
height: PropTypes.number.isRequired, // height of the window
scrollTop: PropTypes.number.isRequired,
isScrolling: PropTypes.bool.isRequired,
containerRef: PropTypes.shape({current: PropTypes.any}).isRequired,
}
static propTypes = {
glyphiconRemove: PropTypes.string,
style: PropTypes.object,
loading: PropTypes.bool,
resource: PropTypes.object,
thumbnail: PropTypes.string,
onError: PropTypes.func,
onUpdate: PropTypes.func,
onRemove: PropTypes.func,
// I18N
message: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
suggestion: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
};
static contextTypes = {
messages: PropTypes.object
};
static defaultProps = {
loading: false,
glyphiconRemove: "remove-circle",
resource: {},
// CALLBACKS
onError: () => {},
onUpdate: () => {},
onSaveAll: () => {},
onRemove: () => {},
// I18N
message: ,
suggestion:
};
static propTypes = {
// props
style: PropTypes.object,
backgroundOpacityStart: PropTypes.number,
backgroundOpacityEnd: PropTypes.number,
resource: PropTypes.object,
editDataEnabled: PropTypes.bool,
shareToolEnabled: PropTypes.bool,
// CALLBACKS
viewerUrl: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
onEdit: PropTypes.func,
onEditData: PropTypes.func,
onDelete: PropTypes.func,
onShare: PropTypes.func,
onUpdateAttribute: PropTypes.func,
tooltips: PropTypes.object
};
static defaultProps = {
resource: {},
editDataEnabled: false,
shareToolEnabled: true,
style: {
backgroundImage: 'url(' + thumbUrl + ')',
backgroundSize: "cover",
backgroundPosition: "center",
backgroundRepeat: "repeat-x"
},
backgroundOpacityStart: 0.7,
backgroundOpacityEnd: 0.3,
tooltips: {
deleteResource: "resources.resource.deleteResource",
export interface DataProps {}
export interface ColorsProps extends DataProps, React.HTMLAttributes {}
export interface ColorsState {
showColorName?: "All" | "System" | "Accent";
}
export default class Colors extends React.Component {
static defaultProps: ColorsProps = {};
state: ColorsState = {
showColorName: "All"
};
static contextTypes = { theme: PropTypes.object };
context: { theme: ReactUWP.ThemeType };
handleChangeColor = (value: string) => {
this.setState({
showColorName: value as any
});
}
render() {
const {
className,
id,
style
} = this.props;
const { showColorName } = this.state;
const { theme } = this.context;
entityId={entityId}
isFrom={false}
targetEntityTypes={['Indicator']}
paginationOptions={paginationOptions}
/>
);
}
}
EntityIndicators.propTypes = {
entityId: PropTypes.string,
entityLink: PropTypes.string,
classes: PropTypes.object,
t: PropTypes.func,
history: PropTypes.object,
};
export default compose(inject18n, withStyles(styles))(EntityIndicators);
>
{t('Update')}
)}
/>
);
}
}
ProfileOverviewComponent.propTypes = {
classes: PropTypes.object,
theme: PropTypes.object,
t: PropTypes.func,
me: PropTypes.object,
};
const ProfileOverview = createFragmentContainer(ProfileOverviewComponent, {
me: graphql`
fragment ProfileOverview_me on User {
name
description
email
firstname
lastname
language
token
}
`,
}
classes={{ root: classes.button }}
>
{t('Files')}
);
}
}
TopMenuIntrusionSet.propTypes = {
classes: PropTypes.object,
location: PropTypes.object,
match: PropTypes.object,
t: PropTypes.func,
history: PropTypes.object,
};
export default compose(
inject18n,
withRouter,
withStyles(styles),
)(TopMenuIntrusionSet);
entityId={report.id}
entityType="Stix-Domain-Entity"
relationType="object_refs"
field="entity_type"
/>
);
}
}
ReportComponent.propTypes = {
report: PropTypes.object,
classes: PropTypes.object,
t: PropTypes.func,
};
const Report = createFragmentContainer(ReportComponent, {
report: graphql`
fragment Report_report on Report {
id
...ReportHeader_report
...ReportOverview_report
...ReportDetails_report
}
`,
});
export default compose(inject18n, withStyles(styles))(Report);
* @prop {string} mapProjection crs of the map
* @prop {string} isDraggable tells if the coordinate row is draggable
*
*/
class CoordinatesEditor extends React.Component {
static propTypes = {
components: PropTypes.array,
measureOptions: PropTypes.object,
onSetInvalidSelected: PropTypes.func,
onChange: PropTypes.func,
onChangeRadius: PropTypes.func,
onHighlightPoint: PropTypes.func,
onChangeText: PropTypes.func,
onChangeFormat: PropTypes.func,
format: PropTypes.string,
aeronauticalOptions: PropTypes.object,
componentsValidation: PropTypes.object,
transitionProps: PropTypes.object,
properties: PropTypes.object,
mapProjection: PropTypes.string,
type: PropTypes.string,
isDraggable: PropTypes.bool,
isMouseEnterEnabled: PropTypes.bool,
isMouseLeaveEnabled: PropTypes.bool
};
static defaultProps = {
components: [],
measureOptions: {},
onChange: () => {},
onChangeRadius: () => {},
onHighlightPoint: () => {},