* The pre-existing design that is being edited, if any */ design: PropTypes.instanceOf(Design).isRequired, /** * The user that created the design. */ user: PropTypes.instanceOf(User), /** * The name of the variation that is currently selected */ selectedVariation: PropTypes.string.isRequired, /** * The colors that are used in the current variation. */ usedColors: PropTypes.objectOf( PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string, color: PropTypes.string.isRequired }).isRequired ).isRequired ).isRequired, /** * Called when a variation is selected. * Is provided with the variation name as the first parameter. */ onVariationSelect: PropTypes.func.isRequired }; export default Sidebar;
}, }, this.renderAccountOptions() ), ] ) } } AccountDropdowns.defaultProps = { enableAccountsSelector: false, enableAccountOptions: false, } AccountDropdowns.propTypes = { identities: PropTypes.objectOf(PropTypes.object), selected: PropTypes.string, keyrings: PropTypes.array, actions: PropTypes.objectOf(PropTypes.func), network: PropTypes.string, style: PropTypes.object, enableAccountOptions: PropTypes.bool, enableAccountsSelector: PropTypes.bool, } const mapDispatchToProps = (dispatch) => { return { actions: { showConfigPage: () => dispatch(actions.showConfigPage()), requestAccountExport: () => dispatch(actions.requestExportAccount()), showAccountDetail: (address) => dispatch(actions.showAccountDetail(address)),
<Drawer variant="persistent" className={classNames(classes.drawer)} classes={{ paper: classNames(classes.paper) }} anchor="left" PaperProps={{ 'aria-label': t('sidebarPanelsNavigation'), component: 'nav', style: { position: 'relative' }, }} SlideProps={{ mountOnEnter: true, unmountOnExit: true }} open={sideBarOpen} > <WindowSideBarButtons windowId={windowId} /> </Drawer> </> ); } } WindowSideBar.propTypes = { classes: PropTypes.objectOf(PropTypes.string).isRequired, sideBarOpen: PropTypes.bool, t: PropTypes.func.isRequired, windowId: PropTypes.string.isRequired, }; WindowSideBar.defaultProps = { sideBarOpen: false, };
uri: PropTypes.string, /** * `bundle` is the iOS asset bundle which the image is included in. This * will default to [NSBundle mainBundle] if not set. * @platform ios */ bundle: PropTypes.string, /** * `method` is the HTTP Method to use. Defaults to GET if not specified. */ method: PropTypes.string, /** * `headers` is an object representing the HTTP headers to send along with the * request for a remote image. */ headers: PropTypes.objectOf(PropTypes.string), /** * `body` is 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. */ body: PropTypes.string, /** * `cache` determines how the requests handles potentially cached * responses. * * - `default`: Use the native platforms default strategy. `useProtocolCachePolicy` on iOS. * * - `reload`: The data for the URL will be loaded from the originating source. * No existing cache data should be used to satisfy a URL load request. *
import React from 'react'; import PropTypes from 'prop-types'; import { NavLink } from 'react-router-dom' import styles, { MenuDiv } from './styles.js' const Navbar = ({ routes }) => ( <MenuDiv> { Object.keys(routes).map((route, key) => ( <NavLink to={ routes[route].path } style={ styles.link } key={ key }> { routes[route].label } </NavLink> ))} </MenuDiv> ) Navbar.propTypes = { routes: PropTypes.objectOf(PropTypes.shape({ path: PropTypes.string, label: PropTypes.string })).isRequired } export default Navbar;
const protocols = PropTypes.arrayOf(protocol); const variableDefinition = PropTypes.shape({ name: PropTypes.string.isRequired, options: PropTypes.arrayOf(PropTypes.oneOfType([ PropTypes.number, PropTypes.string, PropTypes.shape({ label: PropTypes.string.isRequired, value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, }), ])), }); const entityType = PropTypes.shape({ variables: PropTypes.objectOf(variableDefinition) }); const codebook = PropTypes.shape({ node: PropTypes.objectOf(entityType), edge: PropTypes.objectOf(entityType), }); const entityName = PropTypes.oneOf(['node', 'edge']); const Types = { deviceApiInfo, device, devices, entityName, protocol, protocols,
import React from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import ArticleMeta from '../../../components/ArticleMeta'; const propTypes = { article: PropTypes.shape({ author: PropTypes.objectOf(PropTypes.string) }) }; const styles = ` .author-block { display: flex; align-items: center; justify-content: center; margin-top: 15px; } .author-block img { border-radius: 20%; } .author-bio { display: flex; flex-direction: column; margin-left: 30px; } .author-bio span {
import React from 'react'; import { kebabCase, startCase } from 'lodash'; import PropTypes from 'prop-types'; import { Alert, Col, ControlLabel, FormControl, FormGroup, HelpBlock } from '@freecodecamp/react-bootstrap'; const propTypes = { errors: PropTypes.objectOf(PropTypes.string), fields: PropTypes.objectOf( PropTypes.shape({ name: PropTypes.string.isRequired, onChange: PropTypes.func.isRequired, value: PropTypes.string.isRequired }) ).isRequired, options: PropTypes.shape({ errors: PropTypes.objectOf( PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(null)]) ), ignored: PropTypes.arrayOf(PropTypes.string), placeholder: PropTypes.bool, required: PropTypes.arrayOf(PropTypes.string), types: PropTypes.objectOf(PropTypes.string) }) };
<hr /> <DirectoryListing filename={this.props.filename} entry={this.props.entry} entries={this.props.entries} /> <hr /> <address css={{ textAlign: 'right' }}> {this.props.packageName}@{this.props.packageVersion} </address> </div> ); } } if (process.env.NODE_ENV !== 'production') { const entryType = PropTypes.object; App.propTypes = { packageName: PropTypes.string.isRequired, packageVersion: PropTypes.string.isRequired, availableVersions: PropTypes.arrayOf(PropTypes.string), filename: PropTypes.string.isRequired, entry: entryType.isRequired, entries: PropTypes.objectOf(entryType).isRequired }; }
<Artboard name="Swatches" style={{ flexDirection: 'row', flexWrap: 'wrap', width: (96 + 8) * 4, }} > {Object.keys(colors).map(color => ( <Swatch name={color} hex={colors[color]} key={color} /> ))} </Artboard> ); Document.propTypes = { colors: PropTypes.objectOf(PropTypes.string).isRequired, }; export default () => { const colorList = { Haus: '#F3F4F4', Night: '#333', Sur: '#96DBE4', 'Sur Dark': '#24828F', Peach: '#EFADA0', 'Peach Dark': '#E37059', Pear: '#93DAAB', 'Pear Dark': '#2E854B', }; render(<Document colors={colorList} />, context.document.currentPage());
} else { return(<th key={columnKey}></th>); } }); return ( <FilterRowComponent> {[...childrenAsArray, ...filterCells]} </FilterRowComponent> ); } } FilterRow.contextTypes = { columnConfigs: PropTypes.array, filter: PropTypes.array, updateFilter: PropTypes.func.isRequired, filterComponents: PropTypes.objectOf(PropTypes.func).isRequired, defaultFilterComponent: PropTypes.func.isRequired, columnsWithHiddenFilters: PropTypes.arrayOf(PropTypes.string).isRequired }; FilterRow.childContextTypes = { updateCell: PropTypes.func }; if (process.env.NODE_ENV !== 'production'){ FilterRow.propTypes = { component: PropTypes.func, children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node ])
visible={visible} title="Sign-in required" onHide={actions.closeSignupPrompt} > <p className="md-color--secondary-text"> Sign in (or create an account) to save profiles. </p> <Button raised primary onClick={actions.closeSignupPrompt}> OK </Button> </DialogContainer> ); }; SignupPrompt.propTypes = { actions: PropTypes.objectOf(PropTypes.func).isRequired, visible: PropTypes.bool.isRequired }; const mapStateToProps = state => ({ visible: state.activities.promptingSignup }); const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(AppActions, dispatch) }); export default connect( mapStateToProps, mapDispatchToProps )(SignupPrompt);
</ul> )} {folder.expanded && folder.loading && <Loading className={css(styles.loading)} />} </div> ); } } const folderPropType = PropTypes.shape({ id: PropTypes.number, name: PropTypes.string, loading: PropTypes.bool, fileIds: PropTypes.arrayOf(PropTypes.number), folderIds: PropTypes.arrayOf(PropTypes.number) }); Folder.propTypes = { folders: PropTypes.objectOf(folderPropType), files: PropTypes.objectOf(File.propTypes.file), folder: folderPropType.isRequired, onToggle: PropTypes.func, onSelect: File.propTypes.onSelect }; Folder.defaultProps = { files: [], folders: [] };
function createCollapsibleFieldset(title) { class CollapsibleFieldset extends React.Component { static defaultProps = { uiSchema: {}, formData: {}, errorSchema: {}, idSchema: {}, required: false, disabled: false, readonly: false, }; constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { toggled: false }; } onPropertyChange = name => (value, options) => { const newFormData = { ...this.props.formData, [name]: value }; this.props.onChange(newFormData, options); }; isRequired(name) { const schema = this.props.schema; return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1; } toggle(event) { event.stopPropagation(); event.preventDefault(); const newFormData = { ...this.props.formData, isClosed: !this.props.formData.isClosed, }; this.props.onChange(newFormData); } render() { const { uiSchema, formData, errorSchema, idSchema, name, required, disabled, readonly, onBlur, registry, } = this.props; const { definitions, fields, formContext } = registry; const { SchemaField, TitleField, DescriptionField } = fields; const schema = retrieveSchema(this.props.schema, definitions); let orderedProperties; try { const properties = Object.keys(schema.properties); orderedProperties = orderProperties(properties, uiSchema['ui:order']); } catch (err) { return ( <div> <p className="config-error" style={{ color: 'red' }}> Invalid {name || 'root'} object field configuration: <em>{err.message}</em>. </p> <pre> {JSON.stringify(schema)} </pre> </div> ); } const iconTransform = !formData.isClosed ? 'flip-vertical' : ''; return ( <fieldset> <div onDoubleClick={this.toggle} id={`${idSchema.$id}__title_bar`} role="button" > {title && <div onClick={this.toggle} id={`${idSchema.$id}__title_wrapper`} role="button" > <TitleField id={`${idSchema.$id}__title`} title={title(formData, uiSchema)} required={required} formContext={formContext} /> </div>} <button onClick={this.toggle} id={`${idSchema.$id}__collapse`} title="Collapse" type="button" className="toggle" > <Icon name="talend-caret-down" transform={iconTransform} /> </button> </div> {(uiSchema['ui:description'] || schema.description) && <DescriptionField id={`${idSchema.$id}__description`} description={uiSchema['ui:description'] || schema.description} formContext={formContext} />} {orderedProperties.map((fieldName, index) => { if (fieldName !== 'isClosed') { return ( <SchemaField key={index} name={fieldName} required={this.isRequired(fieldName)} schema={schema.properties[fieldName]} uiSchema={uiSchema[fieldName]} errorSchema={errorSchema[fieldName]} idSchema={idSchema[fieldName]} formData={formData[fieldName]} onChange={this.onPropertyChange(fieldName)} onBlur={onBlur} registry={registry} disabled={disabled} readonly={readonly} /> ); } return null; })} </fieldset> ); } } if (process.env.NODE_ENV !== 'production') { CollapsibleFieldset.propTypes = { schema: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types uiSchema: PropTypes.object, // eslint-disable-line react/forbid-prop-types errorSchema: PropTypes.object, // eslint-disable-line react/forbid-prop-types idSchema: PropTypes.object, // eslint-disable-line react/forbid-prop-types formData: PropTypes.object, // eslint-disable-line react/forbid-prop-types onChange: PropTypes.func.isRequired, onBlur: PropTypes.func, required: PropTypes.bool, disabled: PropTypes.bool, name: PropTypes.string, readonly: PropTypes.bool, registry: PropTypes.shape({ widgets: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])) .isRequired, fields: PropTypes.objectOf(PropTypes.func).isRequired, definitions: PropTypes.object.isRequired, formContext: PropTypes.object.isRequired, }), }; } return CollapsibleFieldset; }
return {msg: null}; } }; const mapDispatchToProps = (dispatch, {formName}) => ({ handleClear: () => dispatch(clearError(formName)), }); const mergeProps = ({msg}, {handleClear}) => ({ children: msg, onDismiss: handleClear, onUnmount: handleClear, bsStyle: 'danger', test: !!msg, Component: LifecycleListener(Alert), }); const ErrorContainer = connect(mapStateToProps, mapDispatchToProps, mergeProps)(If); ErrorContainer.propTypes = { formName: PropTypes.string.isRequired, defaultMsg: PropTypes.string.isRequired, errorMap: PropTypes.objectOf(PropTypes.string.isRequired), }; ErrorContainer.defaultProps = { errorMap: {}, }; export default ErrorContainer;
<button type="submit" className="btn btn-info"> Submit </button> </p>} </form> ); } } if (process.env.NODE_ENV !== "production") { Form.propTypes = { schema: PropTypes.object.isRequired, uiSchema: PropTypes.object, formData: PropTypes.any, widgets: PropTypes.objectOf( PropTypes.oneOfType([PropTypes.func, PropTypes.object]) ), fields: PropTypes.objectOf(PropTypes.func), ArrayFieldTemplate: PropTypes.func, FieldTemplate: PropTypes.func, ErrorList: PropTypes.func, onChange: PropTypes.func, onError: PropTypes.func, showErrorList: PropTypes.bool, onSubmit: PropTypes.func, id: PropTypes.string, className: PropTypes.string, name: PropTypes.string, method: PropTypes.string, target: PropTypes.string, action: PropTypes.string,
import React from 'react'; import PropTypes from 'prop-types'; import { Tabs } from '../tabs/tabs'; const AddonPanel = ({ panels, onPanelSelect, selectedPanel, ...rest }) => ( <Tabs {...rest} absolute bordered selected={selectedPanel} onSelect={onPanelSelect}> {Object.entries(panels).map(([k, v]) => ( <div key={k} id={k} title={v.title}> {v.render} </div> ))} </Tabs> ); AddonPanel.propTypes = { selectedPanel: PropTypes.string, onPanelSelect: PropTypes.func.isRequired, panels: PropTypes.objectOf( PropTypes.shape({ title: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), render: PropTypes.func, }) ).isRequired, }; AddonPanel.defaultProps = { selectedPanel: null, }; export default AddonPanel;
completedMap: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.string, completedDate: PropTypes.number, challengeType: PropTypes.number, solution: PropTypes.string, files: PropTypes.arrayOf( PropTypes.shape({ ext: PropTypes.string, contents: PropTypes.string }) ) }) ), fetchIdToNameMap: PropTypes.func.isRequired, idToNameMap: PropTypes.objectOf(PropTypes.string), username: PropTypes.string }; class Timeline extends Component { constructor(props) { super(props); this.state = { solutionToView: null, solutionOpen: false }; this.closeSolution = this.closeSolution.bind(this); this.renderCompletion = this.renderCompletion.bind(this); this.viewSolution = this.viewSolution.bind(this);
)} </Highlight> ); }; CodeSurfer.propTypes = { /** The code you want to show */ code: PropTypes.string.isRequired, /** The lines/tokens to highlight */ step: PropTypes.oneOfType([ PropTypes.string, PropTypes.shape({ lines: PropTypes.arrayOf(PropTypes.number), range: PropTypes.arrayOf(PropTypes.number), ranges: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)), tokens: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.number)) }) ]), /** Any language supported in [prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/vendor/prism/includeLangs.js) */ lang: PropTypes.string, /** Whether to show line numbers or not */ showNumbers: PropTypes.bool, /** If you have a dark background set this prop to true (it will use the default dark theme) */ dark: PropTypes.bool, /** Use a theme from react-prism-renderer */ theme: PropTypes.object, /** Use your own font-family */ monospace: PropTypes.string }; CodeSurfer.defaultProps = {
const {errorText, placeholder} = this.props; const {error, text} = this.state; return ( <div> <textarea placeholder={placeholder} onInput={this.handleChange} value={text}></textarea> <div className="error" style={{'visibility': error ? 'visible' : 'hidden'}}> {errorText} </div> </div> ); } } FreeformQuestion.propTypes = { 'errorText': PropTypes.string, 'hasError': PropTypes.func, 'placeholder': PropTypes.string, 'store': PropTypes.objectOf(PropTypes.func).isRequired }; FreeformQuestion.defaultProps = { 'hasError': () => false }; export default FreeformQuestion;
/* eslint-disable import/no-unresolved, import/extensions */ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { View } from 'react-native'; /* eslint-enable import/no-unresolved, import/extensions */ import Button from '../Button'; import { ViewPropTypes } from '../utils'; import withTheme from '../styles/withTheme'; const propTypes = { actions: PropTypes.arrayOf(PropTypes.string).isRequired, options: PropTypes.objectOf(PropTypes.object), onActionPress: PropTypes.func.isRequired, style: PropTypes.shape({ defaultActionsContainer: ViewPropTypes.style, }), }; const defaultProps = { style: {}, options: {}, }; function getStyles(props) { const { dialog } = props.theme; return { defaultActionsContainer: [ dialog.defaultActionsContainer, props.style.defaultActionsContainer, ], };
typeName: PropTypes.string, priority: propTypePriorityCheck }), attributes: PropTypes.shape( { bod: PropTypes.number.isRequired, agi: PropTypes.number.isRequired, rea: PropTypes.number.isRequired, str: PropTypes.number.isRequired, wil: PropTypes.number.isRequired, log: PropTypes.number.isRequired, int: PropTypes.number.isRequired, cha: PropTypes.number.isRequired, edg: PropTypes.number.isRequired, ess: PropTypes.number.isRequired, augmented: PropTypes.objectOf(PropTypes.number), special: PropTypes.number.isRequired, baseSpent: PropTypes.number.isRequired, specialSpent: PropTypes.number.isRequired }), selectMagRes: PropTypes.string, settingSkills: PropTypes.shape( { active: PropTypes.object.isRequired, knowledge: PropTypes.object.isRequired, groups: PropTypes.object.isRequired, magicSkills: PropTypes.array.isRequired, skillPointsSpent: PropTypes.number.isRequired, groupPointSpent: PropTypes.number.isRequired }), spellSelect: PropTypes.shape(
/** * Enhance the component. * * @type {React.Component} */ const EnhancedContainerTabbed = enhance(ContainerTabbed); /** * Validate the props. * * @type {Object} */ EnhancedContainerTabbed.propTypes = { container: PropTypes.shape({ id: PropTypes.string, fields: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string, })), settings: PropTypes.shape({ tabs: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)), }), }), ui: PropTypes.shape({ tabs_in_url: PropTypes.bool, }), switchContainerTab: PropTypes.func, }; export default EnhancedContainerTabbed;
<Button bsStyle="success" onClick={bulkProcess} value="Process" className="btn" disabled={isFetching}>Process</Button> </Col> <Col md={4}> {isFetching && <i style={{"fontSize":"150%"}} className="fa fa-spinner fa-spin"/>} {(size(successfulResults) > 0 && size(errorResults) === 0) && <span style={{"fontSize":"150%", "color":"green"}}>All Successful!</span> || null} {size(errorResults) > 0 && <span> <span style={{"fontSize":"125%", "color":"green"}}>Successful: {successMessage}</span> <span style={{"fontSize":"125%", "color":"red"}}>Errors: {errorMessage}</span> </span>} {!isEmpty(validationMessage) && <span style={{"fontSize":"150%", "color":"red"}}>{validationMessage}</span>} </Col> </Row> </Grid> </Panel> } } WorkflowBulkAction.propTypes = { bulkProcess: PropTypes.func.isRequired, bulkProcessOperation: PropTypes.string.isRequired, error: PropTypes.string, errorResults: PropTypes.objectOf(PropTypes.string).isRequired, isFetching: PropTypes.bool.isRequired, onChangeBulkProcessSelection: PropTypes.func.isRequired, successfulResults: PropTypes.arrayOf(PropTypes.string).isRequired, selectedCount: PropTypes.number.isRequired, validationMessage: PropTypes.string.isRequired };
currentStage={this.state.currentStage} numStages={this.selectedCategoryConfig.multi_stage.length} isSingleCategory={this.props.isSingleCategory} /> )} </div> </> ); } } InputForm.propTypes = { activeMarker: PropTypes.string, className: PropTypes.string, customHooks: PropTypes.oneOfType([ PropTypes.objectOf(PropTypes.func), PropTypes.bool, ]), container: PropTypes.instanceOf(HTMLElement), contentPanelInnerContainerRef: PropTypes.object.isRequired, createPlace: PropTypes.func.isRequired, datasetClientSlugSelector: PropTypes.func.isRequired, datasetUrl: PropTypes.string.isRequired, datasetSlug: PropTypes.string.isRequired, geometryStyle: geometryStyleProps, hasAdminAbilities: PropTypes.func.isRequired, hasGroupAbilitiesInDatasets: PropTypes.func.isRequired, history: PropTypes.object.isRequired, isContinuingFormSession: PropTypes.bool, isFormResetting: PropTypes.bool, isFormSubmitting: PropTypes.bool,
canViewStudentsGroup = () => { const {userRoles, user} = this.props; return (user.systemAccesses && user.systemAccesses.includes(ACCESSES.viewAllGroupMembers)) || (userRoles.courseAccesses && userRoles.courseAccesses.includes(ACCESSES.viewAllGroupMembers)) || userRoles.isSystemAdministrator; }; handleCommentBackground = (commentId, isApproved) => { this.setState({ isApproved, }); }; } Comment.propTypes = { user: userType.isRequired, userRoles: userRoles.isRequired, comment: comment.isRequired, actions: PropTypes.objectOf(PropTypes.func), children: PropTypes.array, getUserSolutionsUrl: PropTypes.func, commentEditing: commentStatus, commentPolicy: commentPolicy, hasReplyAction: PropTypes.bool, slideType: PropTypes.string, courseId: PropTypes.string, }; export default Comment;
onActivate: PropTypes.func, onClick: PropTypes.func, onDeactivate: PropTypes.func, onFocus: PropTypes.func, onHide: PropTypes.func, onInit: PropTypes.func, onRedo: PropTypes.func, onRemove: PropTypes.func, onReset: PropTypes.func, onShow: PropTypes.func, onSubmit: PropTypes.func, onUndo: PropTypes.func, textareaProps: PropTypes.object.isRequired, // props passed through to the textarea otherEventHandlers: PropTypes.objectOf( PropTypes.func.isRequired ).isRequired, }, getDefaultProps: function() { return { tinymceConfig: {}, maxInitWaitTime: 20000, pollInterval: 1000, textareaProps: {}, otherEventHandlers: {}, onChange: function() {}, component: 'textarea', }; }, getInitialState: function() {
schema: PropTypes.object.isRequired, uiSchema: PropTypes.shape({ "ui:options": PropTypes.shape({ addable: PropTypes.bool, orderable: PropTypes.bool, removable: PropTypes.bool, }), }), idSchema: PropTypes.object, errorSchema: PropTypes.object, onChange: PropTypes.func.isRequired, onBlur: PropTypes.func, onFocus: PropTypes.func, formData: PropTypes.array, required: PropTypes.bool, disabled: PropTypes.bool, readonly: PropTypes.bool, autofocus: PropTypes.bool, registry: PropTypes.shape({ widgets: PropTypes.objectOf( PropTypes.oneOfType([PropTypes.func, PropTypes.object]) ).isRequired, fields: PropTypes.objectOf(PropTypes.func).isRequired, definitions: PropTypes.object.isRequired, formContext: PropTypes.object.isRequired, }), }; } export default ArrayField;
alt="" role="presentation" className={classes.logo} unloader={ <RectShape className={classes.placeholder} style={{ height: 60, width: 60 }} /> } /> </div> )} </CompanionWindow> ); } } AttributionPanel.propTypes = { classes: PropTypes.objectOf(PropTypes.string), id: PropTypes.string.isRequired, manifestLogo: PropTypes.string, requiredStatement: PropTypes.arrayOf(PropTypes.shape({ label: PropTypes.string, value: PropTypes.string, })), rights: PropTypes.arrayOf(PropTypes.string), t: PropTypes.func, windowId: PropTypes.string.isRequired, }; AttributionPanel.defaultProps = { classes: {}, manifestLogo: null, requiredStatement: null,
handleScroll = (ref) => { scrollToView(ref); }; getUserSolutionsUrl = (userId) => { const {courseId, slideId} = this.props; return `${window.location.origin}/Analytics/UserSolutions?courseId=${courseId}&slideId=${slideId}&userId=${userId}`; }; sendData = (method, commentId, property) => method(commentId, property) .catch(e => { Toast.push("Не удалось изменить комментарий. Произошла ошибка, попробуйте снова"); console.error(e); }); } CommentsList.propTypes = { user: userType.isRequired, userRoles: userRoles.isRequired, slideId: PropTypes.string.isRequired, slideType: PropTypes.string.isRequired, forInstructors: PropTypes.bool, handleInstructorsCommentCount: PropTypes.func, commentsApi: PropTypes.objectOf(PropTypes.func), commentPolicy: commentPolicy, courseId: PropTypes.string.isRequired, }; export default CommentsList;