GoScrobble/web/node_modules/.cache/babel-loader/3abf82a9326246f3563245dbc0f3f375.json

1 line
12 KiB
JSON
Raw Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nimport Fade from './Fade';\nvar propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n closeClassName: PropTypes.string,\n closeAriaLabel: PropTypes.string,\n cssModule: PropTypes.object,\n color: PropTypes.string,\n fade: PropTypes.bool,\n isOpen: PropTypes.bool,\n toggle: PropTypes.func,\n tag: tagPropType,\n transition: PropTypes.shape(Fade.propTypes),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])\n};\nvar defaultProps = {\n color: 'success',\n isOpen: true,\n tag: 'div',\n closeAriaLabel: 'Close',\n fade: true,\n transition: _objectSpread(_objectSpread({}, Fade.defaultProps), {}, {\n unmountOnExit: true\n })\n};\n\nfunction Alert(props) {\n var className = props.className,\n closeClassName = props.closeClassName,\n closeAriaLabel = props.closeAriaLabel,\n cssModule = props.cssModule,\n Tag = props.tag,\n color = props.color,\n isOpen = props.isOpen,\n toggle = props.toggle,\n children = props.children,\n transition = props.transition,\n fade = props.fade,\n innerRef = props.innerRef,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"closeClassName\", \"closeAriaLabel\", \"cssModule\", \"tag\", \"color\", \"isOpen\", \"toggle\", \"children\", \"transition\", \"fade\", \"innerRef\"]);\n\n var classes = mapToCssModules(classNames(className, 'alert', \"alert-\" + color, {\n 'alert-dismissible': toggle\n }), cssModule);\n var closeClasses = mapToCssModules(classNames('close', closeClassName), cssModule);\n\n var alertTransition = _objectSpread(_objectSpread(_objectSpread({}, Fade.defaultProps), transition), {}, {\n baseClass: fade ? transition.baseClass : '',\n timeout: fade ? transition.timeout : 0\n });\n\n return /*#__PURE__*/React.createElement(Fade, _extends({}, attributes, alertTransition, {\n tag: Tag,\n className: classes,\n in: isOpen,\n role: \"alert\",\n innerRef: innerRef\n }), toggle ? /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: closeClasses,\n \"aria-label\": closeAriaLabel,\n onClick: toggle\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, \"\\xD7\")) : null, children);\n}\n\nAlert.propTypes = propTypes;\nAlert.defaultProps = defaultProps;\nexport default Alert;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/Alert.js"],"names":["_extends","_objectWithoutPropertiesLoose","_defineProperty","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPrope