Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ModalClasses,
onEnter,
onEntered,
onEntering,
onExit,
onExited,
onExiting,
open,
PaperProps,
role,
transformOrigin,
TransitionComponent,
transitionDuration: transitionDurationProp,
TransitionProps
} = _this$props,
other = _objectWithoutProperties(_this$props, ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "classes", "container", "elevation", "getContentAnchorEl", "marginThreshold", "ModalClasses", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "open", "PaperProps", "role", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"]);
let transitionDuration = transitionDurationProp;
if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
transitionDuration = undefined;
} // If the container prop is provided, use that
// If the anchorEl prop is provided, use its parent body element as the container
// If neither are provided let the Modal take care of choosing the container
const container = containerProp || (anchorEl ? ownerDocument(getAnchorEl(anchorEl)).body : undefined);
return React.createElement(Modal, _extends({
classes: ModalClasses,
container: container,
open: open,
BackdropProps: {
disableAutoFocus,
disableBackdropClick,
disableEnforceFocus,
disableEscapeKeyDown,
disablePortal,
disableRestoreFocus,
hideBackdrop,
keepMounted,
manager,
onBackdropClick,
onClose,
onEscapeKeyDown,
onRendered,
open
} = _this$props,
other = _objectWithoutProperties(_this$props, ["BackdropComponent", "BackdropProps", "children", "classes", "className", "container", "disableAutoFocus", "disableBackdropClick", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onEscapeKeyDown", "onRendered", "open"]);
const {
exited
} = this.state;
const hasTransition = getHasTransition(this.props);
const childProps = {};
if (!keepMounted && !open && (!hasTransition || exited)) {
return null;
} // It's a Transition like component
if (hasTransition) {
childProps.onExited = createChainedFunction(this.handleExited, children.props.onExited);
}
onClose,
onEnter,
onEntered,
onEntering,
onExit,
onExited,
onExiting,
onMouseEnter,
onMouseLeave,
open,
resumeHideDuration,
TransitionComponent,
transitionDuration,
TransitionProps
} = _this$props,
other = _objectWithoutProperties(_this$props, ["action", "anchorOrigin", "autoHideDuration", "children", "classes", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onClose", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"]); // So we only render active snackbars.
if (!open && this.state.exited) {
return null;
}
return React.createElement(ClickAwayListener, _extends({
onClickAway: this.handleClickAway
}, ClickAwayListenerProps), React.createElement("div", _extends({
className: classNames(classes.root, classes[`anchorOrigin${capitalize(vertical)}${capitalize(horizontal)}`], className),
onMouseEnter: this.handleMouseEnter,
onMouseLeave: this.handleMouseLeave
}, other), React.createElement(EventListener, {
target: "window",
onFocus: disableWindowBlurListener ? undefined : this.handleResume,
onBlur: disableWindowBlurListener ? undefined : this.handlePause
series: _this.chartPivot(pivotConfig).map(function (_ref2) {
var category = _ref2.category,
x = _ref2.x,
obj = _objectWithoutProperties(_ref2, ["category", "x"]);
return {
value: obj[key],
category: category,
x: x
};
})
};
children: childrenProp,
classes,
className: classNameProp,
component: Component,
fullWidth,
indicatorColor,
onChange,
scrollable,
ScrollButtonComponent,
scrollButtons,
TabIndicatorProps = {},
textColor,
theme,
value
} = _this$props,
other = _objectWithoutProperties(_this$props, ["action", "centered", "children", "classes", "className", "component", "fullWidth", "indicatorColor", "onChange", "scrollable", "ScrollButtonComponent", "scrollButtons", "TabIndicatorProps", "textColor", "theme", "value"]);
process.env.NODE_ENV !== "production" ? warning(!centered || !scrollable, 'Material-UI: you can not use the `centered={true}` and `scrollable={true}` properties ' + 'at the same time on a `Tabs` component.') : void 0;
const className = classNames(classes.root, classNameProp);
const flexContainerClassName = classNames(classes.flexContainer, {
[classes.centered]: centered && !scrollable
});
const scrollerClassName = classNames(classes.scroller, {
[classes.fixed]: !scrollable,
[classes.scrollable]: scrollable
});
const indicator = React.createElement(TabIndicator, _extends({
className: classes.indicator,
color: indicatorColor
}, TabIndicatorProps, {
style: _objectSpread({}, this.state.indicatorStyle, TabIndicatorProps.style)
}));
disabled: disabledProp,
icon,
id,
inputProps,
inputRef,
name,
onBlur,
onChange,
onFocus,
readOnly,
required,
tabIndex,
type,
value
} = _this$props,
other = _objectWithoutProperties(_this$props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]);
const {
muiFormControl
} = this.context;
let disabled = disabledProp;
if (muiFormControl) {
if (typeof disabled === 'undefined') {
disabled = muiFormControl.disabled;
}
}
const checked = this.isControlled ? checkedProp : this.state.checked;
const hasLabelFor = type === 'checkbox' || type === 'radio';
return React.createElement(IconButton, _extends({
component: "span",
anchor,
disableBackdropTransition,
disableDiscovery,
disableSwipeToOpen,
hysteresis,
minFlingVelocity,
ModalProps: {
BackdropProps
} = {},
onOpen,
open,
PaperProps = {},
swipeAreaWidth,
variant
} = _this$props,
ModalPropsProp = _objectWithoutProperties(_this$props.ModalProps, ["BackdropProps"]),
other = _objectWithoutProperties(_this$props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hysteresis", "minFlingVelocity", "ModalProps", "onOpen", "open", "PaperProps", "swipeAreaWidth", "variant"]);
const {
maybeSwiping
} = this.state;
return React.createElement(React.Fragment, null, React.createElement(Drawer, _extends({
open: variant === 'temporary' && maybeSwiping ? true : open,
variant: variant,
ModalProps: _objectSpread({
BackdropProps: _objectSpread({}, BackdropProps, {
ref: this.handleBackdropRef
})
}, ModalPropsProp),
PaperProps: _objectSpread({}, PaperProps, {
style: _objectSpread({
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
function InputLabel(props, context) {
const {
children,
classes,
className: classNameProp,
disableAnimation,
FormLabelClasses,
margin: marginProp,
shrink: shrinkProp,
variant: variantProp
} = props,
other = _objectWithoutProperties(props, ["children", "classes", "className", "disableAnimation", "FormLabelClasses", "margin", "shrink", "variant"]);
const {
muiFormControl
} = context;
let shrink = shrinkProp;
if (typeof shrink === 'undefined' && muiFormControl) {
shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;
}
const fcs = formControlState({
props,
context,
states: ['margin', 'variant']
});
const className = classNames(classes.root, {
render() {
const _this$props = this.props,
{
anchorEl,
children,
container,
disablePortal,
keepMounted,
modifiers,
open,
placement: placementProps,
popperOptions,
theme,
transition
} = _this$props,
other = _objectWithoutProperties(_this$props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "theme", "transition"]);
const {
exited,
placement
} = this.state;
if (!keepMounted && !open && (!transition || exited)) {
return null;
}
const childProps = {
placement: placement || flipPlacement(theme, placementProps)
};
if (transition) {
childProps.TransitionProps = {
active,
alternativeLabel,
children,
classes,
className: classNameProp,
completed,
disabled,
error,
icon,
last,
optional,
orientation,
StepIconComponent: StepIconComponentProp,
StepIconProps
} = props,
other = _objectWithoutProperties(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "disabled", "error", "icon", "last", "optional", "orientation", "StepIconComponent", "StepIconProps"]);
let StepIconComponent = StepIconComponentProp;
if (icon && !StepIconComponent) {
StepIconComponent = StepIcon;
}
return React.createElement("span", _extends({
className: classNames(classes.root, classes[orientation], {
[classes.disabled]: disabled,
[classes.alternativeLabel]: alternativeLabel,
[classes.error]: error
}, classNameProp)
}, other), icon || StepIconComponent ? React.createElement("span", {
className: classNames(classes.iconContainer, {
[classes.alternativeLabel]: alternativeLabel