UNPKG

vue-styleguidist

Version:
59 lines 4.38 kB
import "core-js/modules/es.object.to-string.js"; import "core-js/modules/es.reflect.construct.js"; import "core-js/modules/es.object.keys.js"; import "core-js/modules/es.symbol.js"; import "core-js/modules/es.array.filter.js"; import "core-js/modules/es.object.get-own-property-descriptor.js"; import "core-js/modules/web.dom-collections.for-each.js"; import "core-js/modules/es.object.get-own-property-descriptors.js"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; import _inherits from "@babel/runtime/helpers/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } import { Component } from 'react'; import { polyfill } from 'react-lifecycles-compat'; import PropTypes from 'prop-types'; import Context from 'rsg-components/Context'; import Playground from 'react-styleguidist/lib/client/rsg-components/Playground/Playground'; var PlaygroundAsync = /*#__PURE__*/function (_Component) { _inherits(PlaygroundAsync, _Component); var _super = _createSuper(PlaygroundAsync); function PlaygroundAsync(props, context) { var _this; _classCallCheck(this, PlaygroundAsync); _this = _super.call(this, props, context); _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", Playground.prototype.componentWillUnmount); _defineProperty(_assertThisInitialized(_this), "handleChange", Playground.prototype.handleChange); _defineProperty(_assertThisInitialized(_this), "handleTabChange", Playground.prototype.handleTabChange); _defineProperty(_assertThisInitialized(_this), "getInitialActiveTab", Playground.prototype.getInitialActiveTab); Playground.call(_assertThisInitialized(_this), props, context); return _this; } _createClass(PlaygroundAsync, [{ key: "render", value: function render() { return Playground.prototype.render.call(this); } }]); return PlaygroundAsync; }(Component); _defineProperty(PlaygroundAsync, "propTypes", _objectSpread(_objectSpread({}, Playground.propTypes), {}, { code: PropTypes.shape({ raw: PropTypes.string.isRequired, compiled: PropTypes.oneOfType([PropTypes.shape({ script: PropTypes.string, template: PropTypes.string, style: PropTypes.string }), PropTypes.bool]) }).isRequired })); _defineProperty(PlaygroundAsync, "contextType", Context); _defineProperty(PlaygroundAsync, "getDerivedStateFromProps", Playground.getDerivedStateFromProps); export default polyfill(PlaygroundAsync);