mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
26 KiB
JSON
1 line
26 KiB
JSON
|
{"ast":null,"code":"import MuiTextField from '@material-ui/core/TextField';\nimport MuiSwitch from '@material-ui/core/Switch';\nimport invariant from 'tiny-warning';\nimport MuiCheckbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport MuiSelect from '@material-ui/core/Select';\nimport { getIn } from 'formik';\nimport FormControl from '@material-ui/core/FormControl';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport Input from '@material-ui/core/Input';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport MuiRadioGroup from '@material-ui/core/RadioGroup';\nimport { createElement } from 'react';\nimport MuiInputBase from '@material-ui/core/InputBase';\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\n\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nfunction __rest(s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];\n return t;\n}\n\nfunction fieldToTextField(_a) {\n var disabled = _a.disabled,\n _b = _a.field,\n fieldOnBlur = _b.onBlur,\n field = __rest(_b, [\"onBlur\"]),\n _c = _a.form,\n isSubmitting = _c.isSubmitting,\n touched = _c.touched,\n errors = _c.errors,\n onBlur = _a.onBlur,\n helperText = _a.helperText,\n props = __rest(_a, [\"disabled\", \"field\", \"form\", \"onBlur\", \"helperText\"]);\n\n var fieldError = getIn(errors, field.name);\n var showError = getIn(touched, field.name) && !!fieldError;\n return __assign(__assign({\n variant: props.variant,\n error: showError,\n helperText: showError ? fieldError : helperText,\n disabled: disabled !== null && disabled !== void 0 ? disabled : isSubmitting,\n onBlur: onBlur !== null && onBlur !== void 0 ? onBlur : function (e) {\n fieldOnBlur(e !== null && e !== void 0 ? e : field.name);\n }\n }, field), props);\n}\n\nfunction TextField(_a) {\n var children = _a.children,\n props = __rest(_a, [\"children\"]);\n\n return createElement(MuiTextField, __assign({}, fieldToTextField(props)), children);\n}\n\nTextField.displayName = 'FormikMaterialUITextField';\n\nfunction fieldToSwitch(_a) {\n var disabled = _a.disabled,\n _b = _a.field,\n fieldOnBlur = _b.onBlur,\n field = __rest(_b, [\"onBlur\"]),\n isSubmitting = _a.form.isSubmitting,\n type = _a.type,\n onBlur = _a.onBlur,\n props = __rest(_a, [\"disabled\", \"field\", \"form\", \"type\", \"onBlur\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n invariant(type === 'checkbox', \"property type=checkbox is missing from field \" + field.name + \", this can caused unexpected behaviour\");\n }\n\n return __assign(__assign({\n disabled: disabled !== null && disabl
|