Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
import AsyncLoad from 'components/async-load';
import GlobalNotices from 'components/global-notices';
import JetpackDashboardMasterbar from 'layout/masterbar/jetpack-dashboard';
import notices from 'notices';
import { getSelectedSiteId, getSectionName } from 'state/ui/selectors';
import DocumentHead from 'components/data/document-head';
/**
* Style dependencies
*/
import './jetpack-dashboard.scss';
class JetpackDashboardLayout extends Component {
static propTypes = {
primary: PropTypes.element,
secondary: PropTypes.element,
// connected props
sectionName: PropTypes.string,
};
render() {
const sectionClass = classnames( 'layout', `is-section-${ this.props.sectionName }` );
return (
<div>
<div id="content">
</div></div>
{this.props.children}
);
}
}
BaseLayout.propTypes = {
children: PropTypes.element
};
export default withRouter(BaseLayout);
class BackboneProvider extends Component {
getChildContext() {
return {
models: this.props.models,
};
}
render() {
return Children.only(this.props.children);
}
}
BackboneProvider.propTypes = {
models: PropTypes.object,
children: PropTypes.element.isRequired,
};
BackboneProvider.childContextTypes = {
models: PropTypes.object,
};
BackboneProvider.displayName = 'BackboneProvider';
module.exports = BackboneProvider;
);
}
CatalogGroup.propTypes = {
text: PropTypes.string,
title: PropTypes.string,
topLevel: PropTypes.bool,
open: PropTypes.bool,
loading: PropTypes.bool,
emptyMessage: PropTypes.string,
onClick: PropTypes.func,
children: PropTypes.oneOfType([
PropTypes.element,
PropTypes.arrayOf(PropTypes.element)
]),
selected: PropTypes.bool,
removable: PropTypes.bool,
removeUserAddedData: PropTypes.func,
t: PropTypes.func
};
export default CatalogGroup;
)}
)
}
}
PDropDown.propTypes = {
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
titleHref: PropTypes.string,
leftArrow: PropTypes.bool,
override: PropTypes.bool,
topOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
leftOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
rightComponent: PropTypes.element,
footerComponent: PropTypes.element,
minHeight: PropTypes.number,
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
}
PDropDown.defaultProps = {
leftArrow: false,
override: false,
topOffset: '0',
leftOffset: '0',
minHeight: 0
}
export default PDropDown
component = medium || (large || small);
break;
case 'lg':
case 'xl':
component = large || (medium || small);
break;
default:
throw new Error(`Unknown width ${width}`);
}
return React.cloneElement(component, rest);
};
Responsive.propTypes = {
small: PropTypes.element,
medium: PropTypes.element,
large: PropTypes.element,
width: PropTypes.string,
};
export default withWidth()(Responsive);
*/
insertAt: PropTypes.oneOf(['bottom', 'top']),
label: PropTypes.string,
/**
* Callback fired when the `` is requesting to be closed
*/
onDismiss: PropTypes.func,
/**
* An element or a function returning an element to focus by default
*/
defaultFocusElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
/**
* An element or a function returning an element to apply `aria-hidden` to
*/
applicationElement: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.func]),
/**
* An element or a function returning an element that wraps the content of the ``
*/
contentElement: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
shouldContainFocus: PropTypes.bool,
shouldReturnFocus: PropTypes.bool,
shouldCloseOnDocumentClick: PropTypes.bool,
shouldCloseOnEscape: PropTypes.bool,
/**
* The type of `` to use for animating in/out
*/
transition: Transition.propTypes.type,
/**
* Show the component; triggers the enter or exit animation
*/
<div>
<div>
{props.heading}
{Array.isArray(props.actions) && props.actions.length > 0 && (
<div>{props.actions}</div>
)}
</div>
{props.children}
</div>
)
}
PageHeadingLayout.displayName = 'PageHeadingLayout'
PageHeadingLayout.propTypes = {
actions: PropTypes.arrayOf(PropTypes.element),
children: PropTypes.any,
heading: PropTypes.element.isRequired
}
PageHeadingLayout.defaultProps = {
actions: []
}
export default PageHeadingLayout
closeNewFolderModal: PropTypes.func.isRequired,
createFolder: PropTypes.func.isRequired,
createFile: PropTypes.func.isRequired,
closeShareModal: PropTypes.func.isRequired,
showEditorOptions: PropTypes.func.isRequired,
closeEditorOptions: PropTypes.func.isRequired,
showKeyboardShortcutModal: PropTypes.func.isRequired,
closeKeyboardShortcutModal: PropTypes.func.isRequired,
toast: PropTypes.shape({
isVisible: PropTypes.bool.isRequired
}).isRequired,
autosaveProject: PropTypes.func.isRequired,
router: PropTypes.shape({
setRouteLeaveHook: PropTypes.func
}).isRequired,
route: PropTypes.oneOfType([PropTypes.object, PropTypes.element]).isRequired,
setUnsavedChanges: PropTypes.func.isRequired,
setTheme: PropTypes.func.isRequired,
endSketchRefresh: PropTypes.func.isRequired,
startRefreshSketch: PropTypes.func.isRequired,
setBlobUrl: PropTypes.func.isRequired,
setPreviousPath: PropTypes.func.isRequired,
console: PropTypes.arrayOf(PropTypes.shape({
method: PropTypes.string.isRequired,
args: PropTypes.arrayOf(PropTypes.string)
})).isRequired,
clearConsole: PropTypes.func.isRequired,
showErrorModal: PropTypes.func.isRequired,
hideErrorModal: PropTypes.func.isRequired,
clearPersistedState: PropTypes.func.isRequired,
persistState: PropTypes.func.isRequired,
hideHelpModal: PropTypes.func.isRequired,