diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ab2d10d729237c..33bc1decb79bd5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -7,7 +7,7 @@ on: - '!master' - '!deploy' - '!compose' - - '!gh-pages' + - '!workflows' - '!production' - '!development' - '!Chetabahana' diff --git a/.google/cloudbuild.yaml b/.google/cloudbuild.yaml index 8d07f71151ae92..781440431682cd 100644 --- a/.google/cloudbuild.yaml +++ b/.google/cloudbuild.yaml @@ -26,7 +26,6 @@ options: substitutions: _INIT: .google/cloud/builders/__init__ - _VERSION: v1-1911180605-01847a31d5b345058215017bdc04389b-gcp timeout: 300s tags: ['$_PR_NUMBER', '$_REPO_OWNER', '$_REPO', '$_SHA'] diff --git a/test/fixtures/three.graphql/.gitignore b/test/fixtures/three.graphql/.gitignore index 5148e527a7e286..69f4254e27335b 100644 --- a/test/fixtures/three.graphql/.gitignore +++ b/test/fixtures/three.graphql/.gitignore @@ -25,6 +25,7 @@ coverage # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release +build.js.tmp* # Dependency directories node_modules diff --git a/test/fixtures/three.graphql/build.js b/test/fixtures/three.graphql/build.js index ee93334d13ef54..45b1b5b82fa159 100644 --- a/test/fixtures/three.graphql/build.js +++ b/test/fixtures/three.graphql/build.js @@ -210,7 +210,6 @@ ready(() => { query = createQuery({canvas}) requestAnimationFrame(tick) function tick() { - requestAnimationFrame(tick) const wrap = document.querySelector('#graphiql .resultWrap') const style = wrap ? getComputedStyle(wrap) : { @@ -226,6 +225,7 @@ ready(() => { query(currentQuerySource || kDefaultQuery) .catch((err) => console.error(err)) + requestAnimationFrame(tick) } }) @@ -20552,31 +20552,143 @@ var _SearchResults = _interopRequireDefault(require("./DocExplorer/SearchResults var _TypeDoc = _interopRequireDefault(require("./DocExplorer/TypeDoc")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + return _typeof(obj); +} -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + return keys; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return _assertThisInitialized(self); +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var initialNav = { name: 'Schema', @@ -20693,14 +20805,16 @@ function (_React$Component) { prevName = navStack[navStack.length - 2].name; } - return _react.default.createElement("div", { + return _react.default.createElement("section", { className: "doc-explorer", - key: navItem.name + key: navItem.name, + "aria-label": "Documentation Explorer" }, _react.default.createElement("div", { className: "doc-explorer-title-bar" - }, prevName && _react.default.createElement("div", { + }, prevName && _react.default.createElement("button", { className: "doc-explorer-back", - onClick: this.handleNavBackClick + onClick: this.handleNavBackClick, + "aria-label": "Go back to ".concat(prevName) }, prevName), _react.default.createElement("div", { className: "doc-explorer-title" }, navItem.title || navItem.name), _react.default.createElement("div", { @@ -20773,6 +20887,7 @@ exports.DocExplorer = DocExplorer; _defineProperty(DocExplorer, "propTypes", { schema: _propTypes.default.instanceOf(_graphql.GraphQLSchema) }); + },{"./DocExplorer/FieldDoc":52,"./DocExplorer/SchemaDoc":54,"./DocExplorer/SearchBox":55,"./DocExplorer/SearchResults":56,"./DocExplorer/TypeDoc":57,"graphql":112,"prop-types":297,"react":308}],50:[function(require,module,exports){ "use strict"; @@ -20789,14 +20904,19 @@ var _TypeLink = _interopRequireDefault(require("./TypeLink")); var _DefaultValue = _interopRequireDefault(require("./DefaultValue")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + function Argument(_ref) { var arg = _ref.arg, onClickType = _ref.onClickType, @@ -20818,6 +20938,7 @@ Argument.propTypes = { onClickType: _propTypes.default.func.isRequired, showDefaultValue: _propTypes.default.bool }; + },{"./DefaultValue":51,"./TypeLink":58,"prop-types":297,"react":308}],51:[function(require,module,exports){ "use strict"; @@ -20832,14 +20953,19 @@ var _propTypes = _interopRequireDefault(require("prop-types")); var _graphql = require("graphql"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + function DefaultValue(_ref) { var field = _ref.field; var type = field.type, @@ -20857,6 +20983,7 @@ function DefaultValue(_ref) { DefaultValue.propTypes = { field: _propTypes.default.object.isRequired }; + },{"graphql":112,"prop-types":297,"react":308}],52:[function(require,module,exports){ "use strict"; @@ -20875,27 +21002,109 @@ var _MarkdownContent = _interopRequireDefault(require("./MarkdownContent")); var _TypeLink = _interopRequireDefault(require("./TypeLink")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return self; +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var FieldDoc = /*#__PURE__*/ @@ -20966,6 +21175,7 @@ _defineProperty(FieldDoc, "propTypes", { field: _propTypes.default.object, onClickType: _propTypes.default.func }); + },{"./Argument":50,"./MarkdownContent":53,"./TypeLink":58,"prop-types":297,"react":308}],53:[function(require,module,exports){ "use strict"; @@ -20980,27 +21190,109 @@ var _propTypes = _interopRequireDefault(require("prop-types")); var _markdownIt = _interopRequireDefault(require("markdown-it")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + return self; +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var md = new _markdownIt.default(); @@ -21047,6 +21339,7 @@ _defineProperty(MarkdownContent, "propTypes", { markdown: _propTypes.default.string, className: _propTypes.default.string }); + },{"markdown-it":233,"prop-types":297,"react":308}],54:[function(require,module,exports){ "use strict"; @@ -21063,29 +21356,111 @@ var _TypeLink = _interopRequireDefault(require("./TypeLink")); var _MarkdownContent = _interopRequireDefault(require("./MarkdownContent")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return self; +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} // Render the top level Schema -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -// Render the top level Schema var SchemaDoc = /*#__PURE__*/ function (_React$Component) { @@ -21150,6 +21525,7 @@ _defineProperty(SchemaDoc, "propTypes", { schema: _propTypes.default.object, onClickType: _propTypes.default.func }); + },{"./MarkdownContent":53,"./TypeLink":58,"prop-types":297,"react":308}],55:[function(require,module,exports){ "use strict"; @@ -21164,27 +21540,109 @@ var _propTypes = _interopRequireDefault(require("prop-types")); var _debounce = _interopRequireDefault(require("../../utility/debounce")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + return _assertThisInitialized(self); +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + return self; +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var SearchBox = /*#__PURE__*/ @@ -21228,14 +21686,19 @@ function (_React$Component) { value: function render() { return _react.default.createElement("label", { className: "search-box" - }, _react.default.createElement("input", { + }, _react.default.createElement("div", { + className: "search-box-icon", + "aria-hidden": "true" + }, "\u26B2"), _react.default.createElement("input", { value: this.state.value, onChange: this.handleChange, type: "text", - placeholder: this.props.placeholder - }), this.state.value && _react.default.createElement("div", { + placeholder: this.props.placeholder, + "aria-label": this.props.placeholder + }), this.state.value && _react.default.createElement("button", { className: "search-box-clear", - onClick: this.handleClear + onClick: this.handleClear, + "aria-label": "Clear search input" }, "\u2715")); } }]); @@ -21250,6 +21713,7 @@ _defineProperty(SearchBox, "propTypes", { placeholder: _propTypes.default.string, onSearch: _propTypes.default.func }); + },{"../../utility/debounce":76,"prop-types":297,"react":308}],56:[function(require,module,exports){ "use strict"; @@ -21266,27 +21730,109 @@ var _Argument = _interopRequireDefault(require("./Argument")); var _TypeLink = _interopRequireDefault(require("./TypeLink")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + return _assertThisInitialized(self); +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var SearchResults = /*#__PURE__*/ @@ -21462,6 +22008,7 @@ function isMatch(sourceText, searchValue) { return sourceText.toLowerCase().indexOf(searchValue.toLowerCase()) !== -1; } } + },{"./Argument":50,"./TypeLink":58,"prop-types":297,"react":308}],57:[function(require,module,exports){ "use strict"; @@ -21484,27 +22031,109 @@ var _TypeLink = _interopRequireDefault(require("./TypeLink")); var _DefaultValue = _interopRequireDefault(require("./DefaultValue")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + return _assertThisInitialized(self); +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return self; +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var TypeDoc = /*#__PURE__*/ @@ -21738,6 +22367,7 @@ function EnumValue(_ref2) { EnumValue.propTypes = { value: _propTypes.default.object }; + },{"./Argument":50,"./DefaultValue":51,"./MarkdownContent":53,"./TypeLink":58,"graphql":112,"prop-types":297,"react":308}],58:[function(require,module,exports){ "use strict"; @@ -21752,27 +22382,109 @@ var _propTypes = _interopRequireDefault(require("prop-types")); var _graphql = require("graphql"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return self; +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var TypeLink = /*#__PURE__*/ @@ -21819,10 +22531,14 @@ function renderType(type, _onClick) { return _react.default.createElement("a", { className: "type-name", onClick: function onClick(event) { - return _onClick(type, event); - } + event.preventDefault(); + + _onClick(type, event); + }, + href: "#" }, type.name); } + },{"graphql":112,"prop-types":297,"react":308}],59:[function(require,module,exports){ "use strict"; @@ -21835,34 +22551,117 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return self; +} +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} /** * ExecuteButton * * What a nice round shiny button. Shows a drop-down when there are multiple * queries to run. */ + + var ExecuteButton = /*#__PURE__*/ function (_React$Component) { @@ -22009,6 +22808,7 @@ _defineProperty(ExecuteButton, "propTypes", { isRunning: _propTypes.default.bool, operations: _propTypes.default.array }); + },{"prop-types":297,"react":308}],60:[function(require,module,exports){ (function (global){ "use strict"; @@ -22070,31 +22870,143 @@ var _mergeAst = require("../utility/mergeAst"); var _introspectionQueries = require("../utility/introspectionQueries"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + return _typeof(obj); +} -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + return keys; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return target; +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var DEFAULT_DOC_EXPLORER_WIDTH = 350; /** @@ -22690,9 +23602,10 @@ function (_React$Component) { onSelectQuery: this.handleSelectHistoryQuery, storage: this._storage, queryID: this._editorQueryID - }, _react.default.createElement("div", { + }, _react.default.createElement("button", { className: "docExplorerHide", - onClick: this.handleToggleHistory + onClick: this.handleToggleHistory, + "aria-label": "Close History" }, "\u2715"))), _react.default.createElement("div", { className: "editorWrap" }, _react.default.createElement("div", { @@ -22706,7 +23619,8 @@ function (_React$Component) { operations: this.state.operations }), toolbar), !this.state.docExplorerOpen && _react.default.createElement("button", { className: "docExplorerShow", - onClick: this.handleToggleDocs + onClick: this.handleToggleDocs, + "aria-label": "Open Documentation Explorer" }, 'Docs')), _react.default.createElement("div", { ref: function ref(n) { _this3.editorBarComponent = n; @@ -22732,11 +23646,13 @@ function (_React$Component) { onRunQuery: this.handleEditorRunQuery, editorTheme: this.props.editorTheme, readOnly: this.props.readOnly - }), _react.default.createElement("div", { + }), _react.default.createElement("section", { className: "variable-editor", - style: variableStyle + style: variableStyle, + "aria-label": "Query Variables" }, _react.default.createElement("div", { className: "variable-editor-title", + id: "variable-editor-title", style: { cursor: variableOpen ? 'row-resize' : 'n-resize' }, @@ -22780,9 +23696,10 @@ function (_React$Component) { _this3.docExplorerComponent = c; }, schema: this.state.schema - }, _react.default.createElement("div", { + }, _react.default.createElement("button", { className: "docExplorerHide", - onClick: this.handleToggleDocs + onClick: this.handleToggleDocs, + "aria-label": "Close Documentation Explorer" }, "\u2715")))); } /** @@ -23097,7 +24014,9 @@ GraphiQL.Logo = function GraphiQLLogo(props) { GraphiQL.Toolbar = function GraphiQLToolbar(props) { return _react.default.createElement("div", { - className: "toolbar" + className: "toolbar", + role: "toolbar", + "aria-label": "Editor Commands" }, props.children); }; // Export main windows/panes to be used separately if desired. @@ -23167,6 +24086,7 @@ function observableToPromise(observable) { function isObservable(value) { return _typeof(value) === 'object' && typeof value.subscribe === 'function'; } + }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"../utility/CodeMirrorSizer":72,"../utility/StorageAPI":74,"../utility/debounce":76,"../utility/elementPosition":77,"../utility/fillLeafs":78,"../utility/find":79,"../utility/getQueryFacts":80,"../utility/getSelectedOperationName":81,"../utility/introspectionQueries":82,"../utility/mergeAst":83,"./DocExplorer":49,"./ExecuteButton":59,"./ImagePreview":62,"./QueryEditor":63,"./QueryHistory":64,"./ResultViewer":65,"./ToolbarButton":66,"./ToolbarGroup":67,"./ToolbarMenu":68,"./ToolbarSelect":69,"./VariableEditor":70,"copy-to-clipboard":41,"graphql":112,"prop-types":297,"react":308,"react-dom":302}],61:[function(require,module,exports){ "use strict"; @@ -23180,27 +24100,109 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var HistoryQuery = /*#__PURE__*/ @@ -23217,7 +24219,6 @@ function (_React$Component) { _defineProperty(_assertThisInitialized(_this), "editField", null); _this.state = { - showButtons: false, editable: false }; return _this; @@ -23228,23 +24229,12 @@ function (_React$Component) { value: function render() { var _this2 = this; - var editStyles = { - display: this.state.showButtons ? '' : 'none', - marginLeft: '10px' - }; - var starStyles = { - display: this.props.favorite || this.state.showButtons ? '' : 'none', - marginLeft: '10px' - }; var displayName = this.props.label || this.props.operationName || this.props.query.split('\n').filter(function (line) { return line.indexOf('#') !== 0; }).join(''); var starIcon = this.props.favorite ? "\u2605" : "\u2606"; - return _react.default.createElement("p", { - className: this.state.editable ? 'editable' : undefined, - onClick: this.handleClick.bind(this), - onMouseEnter: this.handleMouseEnter.bind(this), - onMouseLeave: this.handleMouseLeave.bind(this) + return _react.default.createElement("li", { + className: this.state.editable ? 'editable' : undefined }, this.state.editable ? _react.default.createElement("input", { type: "text", defaultValue: this.props.label, @@ -23254,30 +24244,18 @@ function (_React$Component) { onBlur: this.handleFieldBlur.bind(this), onKeyDown: this.handleFieldKeyDown.bind(this), placeholder: "Type a label" - }) : _react.default.createElement("span", { - className: "history-label" - }, displayName), _react.default.createElement("span", { + }) : _react.default.createElement("button", { + className: "history-label", + onClick: this.handleClick.bind(this) + }, displayName), _react.default.createElement("button", { onClick: this.handleEditClick.bind(this), - style: editStyles - }, "\u270E"), _react.default.createElement("span", { + "aria-label": "Edit label" + }, "\u270E"), _react.default.createElement("button", { + className: this.props.favorite ? 'favorited' : undefined, onClick: this.handleStarClick.bind(this), - style: starStyles + "aria-label": this.props.favorite ? 'Remove favorite' : 'Add favorite' }, starIcon)); } - }, { - key: "handleMouseEnter", - value: function handleMouseEnter() { - this.setState({ - showButtons: true - }); - } - }, { - key: "handleMouseLeave", - value: function handleMouseLeave() { - this.setState({ - showButtons: false - }); - } }, { key: "handleClick", value: function handleClick() { @@ -23341,6 +24319,7 @@ _defineProperty(HistoryQuery, "propTypes", { variables: _propTypes.default.string, label: _propTypes.default.string }); + },{"prop-types":297,"react":308}],62:[function(require,module,exports){ "use strict"; @@ -23353,27 +24332,109 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + return self; +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} function tokenToURL(token) { if (token.type !== 'string') { @@ -23504,6 +24565,7 @@ exports.ImagePreview = ImagePreview; _defineProperty(ImagePreview, "propTypes", { token: _propTypes.default.any }); + },{"prop-types":297,"react":308}],63:[function(require,module,exports){ "use strict"; @@ -23526,31 +24588,143 @@ var _onHasCompletion = _interopRequireDefault(require("../utility/onHasCompletio var _commonKeys = _interopRequireDefault(require("../utility/commonKeys")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + return _typeof(obj); +} -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + return target; +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return _assertThisInitialized(self); +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} var md = new _markdownIt.default(); var AUTO_COMPLETE_AFTER_KEY = /^[a-zA-Z0-9_@(]$/; @@ -23609,10 +24783,10 @@ function (_React$Component) { _createClass(QueryEditor, [{ key: "componentDidMount", value: function componentDidMount() { - var _this2 = this; - - // Lazily require to ensure requiring GraphiQL outside of a Browser context + var _this2 = this; // Lazily require to ensure requiring GraphiQL outside of a Browser context // does not produce an error. + + var CodeMirror = require('codemirror'); require('codemirror/addon/hint/show-hint'); @@ -23798,8 +24972,9 @@ function (_React$Component) { value: function render() { var _this3 = this; - return _react.default.createElement("div", { + return _react.default.createElement("section", { className: "query-editor", + "aria-label": "Query Editor", ref: function ref(node) { _this3._node = node; } @@ -23853,6 +25028,7 @@ _defineProperty(QueryEditor, "propTypes", { onRunQuery: _propTypes.default.func, editorTheme: _propTypes.default.string }); + },{"../utility/commonKeys":75,"../utility/normalizeWhitespace":84,"../utility/onHasCompletion":85,"codemirror":40,"codemirror-graphql/hint":11,"codemirror-graphql/info":12,"codemirror-graphql/jump":13,"codemirror-graphql/lint":14,"codemirror-graphql/mode":15,"codemirror/addon/comment/comment":27,"codemirror/addon/dialog/dialog":28,"codemirror/addon/edit/closebrackets":29,"codemirror/addon/edit/matchbrackets":30,"codemirror/addon/fold/brace-fold":31,"codemirror/addon/fold/foldgutter":33,"codemirror/addon/hint/show-hint":34,"codemirror/addon/lint/lint":35,"codemirror/addon/search/jump-to-line":36,"codemirror/addon/search/search":37,"codemirror/addon/search/searchcursor":38,"codemirror/keymap/sublime":39,"graphql":112,"markdown-it":233,"prop-types":297,"react":308}],64:[function(require,module,exports){ "use strict"; @@ -23871,41 +25047,186 @@ var _QueryStore = _interopRequireDefault(require("../utility/QueryStore")); var _HistoryQuery = _interopRequireDefault(require("./HistoryQuery")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + return _typeof(obj); +} -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + return target; + }; -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + return _extends.apply(this, arguments); +} + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (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 = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + return target; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return arr2; + } +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +var MAX_QUERY_SIZE = 100000; +var MAX_HISTORY_LENGTH = 20; var shouldSaveQuery = function shouldSaveQuery(nextProps, current, lastQuerySaved) { if (nextProps.queryID === current.queryID) { @@ -23916,6 +25237,11 @@ var shouldSaveQuery = function shouldSaveQuery(nextProps, current, lastQuerySave (0, _graphql.parse)(nextProps.query); } catch (e) { return false; + } // Don't try to save giant queries + + + if (nextProps.query.length > MAX_QUERY_SIZE) { + return false; } if (!lastQuerySaved) { @@ -23935,8 +25261,6 @@ var shouldSaveQuery = function shouldSaveQuery(nextProps, current, lastQuerySave return true; }; -var MAX_HISTORY_LENGTH = 20; - var QueryHistory = /*#__PURE__*/ function (_React$Component) { @@ -23993,8 +25317,9 @@ function (_React$Component) { }); }); - _this.historyStore = new _QueryStore.default('queries', props.storage); - _this.favoriteStore = new _QueryStore.default('favorites', props.storage); + _this.historyStore = new _QueryStore.default('queries', props.storage, MAX_HISTORY_LENGTH); // favorites are not automatically deleted, so there's no need for a max length + + _this.favoriteStore = new _QueryStore.default('favorites', props.storage, null); var historyQueries = _this.historyStore.fetchAll(); @@ -24017,11 +25342,6 @@ function (_React$Component) { operationName: nextProps.operationName }; this.historyStore.push(item); - - if (this.historyStore.length > MAX_HISTORY_LENGTH) { - this.historyStore.shift(); - } - var historyQueries = this.historyStore.items; var favoriteQueries = this.favoriteStore.items; var queries = historyQueries.concat(favoriteQueries); @@ -24036,21 +25356,23 @@ function (_React$Component) { var _this2 = this; var queries = this.state.queries.slice().reverse(); - var queryNodes = queries.map(function (query, i) { + var queryNodes = queries.map(function (query) { return _react.default.createElement(_HistoryQuery.default, _extends({ handleEditLabel: _this2.editLabel, handleToggleFavorite: _this2.toggleFavorite, - key: i, + key: query.query, onSelect: _this2.props.onSelectQuery }, query)); }); - return _react.default.createElement("div", null, _react.default.createElement("div", { + return _react.default.createElement("section", { + "aria-label": "History" + }, _react.default.createElement("div", { className: "history-title-bar" }, _react.default.createElement("div", { className: "history-title" }, 'History'), _react.default.createElement("div", { className: "doc-explorer-rhs" - }, this.props.children)), _react.default.createElement("div", { + }, this.props.children)), _react.default.createElement("ul", { className: "history-contents" }, queryNodes)); } @@ -24069,6 +25391,7 @@ _defineProperty(QueryHistory, "propTypes", { onSelectQuery: _propTypes.default.func, storage: _propTypes.default.object }); + },{"../utility/QueryStore":73,"./HistoryQuery":61,"graphql":112,"prop-types":297,"react":308}],65:[function(require,module,exports){ "use strict"; @@ -24085,28 +25408,109 @@ var _propTypes = _interopRequireDefault(require("prop-types")); var _commonKeys = _interopRequireDefault(require("../utility/commonKeys")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + return _assertThisInitialized(self); +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + return self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} /** * ResultViewer * @@ -24117,6 +25521,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope * - value: The text of the editor. * */ + + var ResultViewer = /*#__PURE__*/ function (_React$Component) { @@ -24220,8 +25626,11 @@ function (_React$Component) { value: function render() { var _this = this; - return _react.default.createElement("div", { + return _react.default.createElement("section", { className: "result-window", + "aria-label": "Result Window", + "aria-live": "polite", + "aria-atomic": "true", ref: function ref(node) { _this._node = node; } @@ -24259,6 +25668,7 @@ _defineProperty(ResultViewer, "propTypes", { ResultsTooltip: _propTypes.default.any, ImagePreview: _propTypes.default.any }); + },{"../utility/commonKeys":75,"codemirror":40,"codemirror-graphql/results/mode":16,"codemirror-graphql/utils/info-addon":21,"codemirror/addon/dialog/dialog":28,"codemirror/addon/fold/brace-fold":31,"codemirror/addon/fold/foldgutter":33,"codemirror/addon/search/jump-to-line":36,"codemirror/addon/search/search":37,"codemirror/addon/search/searchcursor":38,"codemirror/keymap/sublime":39,"prop-types":297,"react":308,"react-dom":302}],66:[function(require,module,exports){ "use strict"; @@ -24271,33 +25681,116 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return self; +} +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} /** * ToolbarButton * * A button to use within the Toolbar. */ + + var ToolbarButton = /*#__PURE__*/ function (_React$Component) { @@ -24310,9 +25803,7 @@ function (_React$Component) { _this = _possibleConstructorReturn(this, _getPrototypeOf(ToolbarButton).call(this, props)); - _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) { - e.preventDefault(); - + _defineProperty(_assertThisInitialized(_this), "handleClick", function () { try { _this.props.onClick(); @@ -24336,11 +25827,12 @@ function (_React$Component) { key: "render", value: function render() { var error = this.state.error; - return _react.default.createElement("a", { + return _react.default.createElement("button", { className: 'toolbar-button' + (error ? ' error' : ''), - onMouseDown: preventDefault, onClick: this.handleClick, - title: error ? error.message : this.props.title + title: error ? error.message : this.props.title, + "aria-invalid": error ? 'true' : 'false', + "aria-description": error ? error.message : null }, this.props.label); } }]); @@ -24356,9 +25848,6 @@ _defineProperty(ToolbarButton, "propTypes", { label: _propTypes.default.string }); -function preventDefault(e) { - e.preventDefault(); -} },{"prop-types":297,"react":308}],67:[function(require,module,exports){ "use strict"; @@ -24369,8 +25858,11 @@ exports.ToolbarGroup = ToolbarGroup; var _react = _interopRequireDefault(require("react")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} /** * Copyright (c) 2019 GraphQL Contributors. * @@ -24383,12 +25875,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * * A group of associated controls. */ + + function ToolbarGroup(_ref) { var children = _ref.children; return _react.default.createElement("div", { className: "toolbar-button-group" }, children); } + },{"react":308}],68:[function(require,module,exports){ "use strict"; @@ -24402,33 +25897,116 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return _typeof(obj); +} -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + return _assertThisInitialized(self); +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return self; +} +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} /** * ToolbarMenu * * A menu style button to use within the Toolbar. */ + + var ToolbarMenu = /*#__PURE__*/ function (_React$Component) { @@ -24552,6 +26130,7 @@ ToolbarMenuItem.propTypes = { function preventDefault(e) { e.preventDefault(); } + },{"prop-types":297,"react":308}],69:[function(require,module,exports){ "use strict"; @@ -24565,36 +26144,135 @@ var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + return _typeof(obj); +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + return target; + }; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + return _extends.apply(this, arguments); +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return _assertThisInitialized(self); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} /** * ToolbarSelect * * A select-option style button to use within the Toolbar. * */ + + var ToolbarSelect = /*#__PURE__*/ function (_React$Component) { @@ -24741,6 +26419,7 @@ ToolbarSelectOption.propTypes = { function preventDefault(e) { e.preventDefault(); } + },{"prop-types":297,"react":308}],70:[function(require,module,exports){ "use strict"; @@ -24757,32 +26436,143 @@ var _onHasCompletion = _interopRequireDefault(require("../utility/onHasCompletio var _commonKeys = _interopRequireDefault(require("../utility/commonKeys")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + return _typeof(obj); +} -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + return keys; +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return _assertThisInitialized(self); +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} /** * VariableEditor * @@ -24796,6 +26586,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope * - readOnly: Turns the editor to read-only mode. * */ + + var VariableEditor = /*#__PURE__*/ function (_React$Component) { @@ -24843,10 +26635,10 @@ function (_React$Component) { _createClass(VariableEditor, [{ key: "componentDidMount", value: function componentDidMount() { - var _this2 = this; - - // Lazily require to ensure requiring GraphiQL outside of a Browser context + var _this2 = this; // Lazily require to ensure requiring GraphiQL outside of a Browser context // does not produce an error. + + var CodeMirror = require('codemirror'); require('codemirror/addon/hint/show-hint'); @@ -25031,11 +26823,11 @@ _defineProperty(VariableEditor, "propTypes", { onRunQuery: _propTypes.default.func, editorTheme: _propTypes.default.string }); + },{"../utility/commonKeys":75,"../utility/onHasCompletion":85,"codemirror":40,"codemirror-graphql/variables/hint":24,"codemirror-graphql/variables/lint":25,"codemirror-graphql/variables/mode":26,"codemirror/addon/dialog/dialog":28,"codemirror/addon/edit/closebrackets":29,"codemirror/addon/edit/matchbrackets":30,"codemirror/addon/fold/brace-fold":31,"codemirror/addon/fold/foldgutter":33,"codemirror/addon/hint/show-hint":34,"codemirror/addon/lint/lint":35,"codemirror/addon/search/jump-to-line":36,"codemirror/addon/search/searchcursor":38,"codemirror/keymap/sublime":39,"prop-types":297,"react":308}],71:[function(require,module,exports){ "use strict"; require("regenerator-runtime/runtime"); - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25043,7 +26835,10 @@ require("regenerator-runtime/runtime"); * LICENSE file in the root directory of this source tree. */ // The primary React component to use. + + module.exports = require('./components/GraphiQL').GraphiQL; + },{"./components/GraphiQL":60,"regenerator-runtime/runtime":309}],72:[function(require,module,exports){ "use strict"; @@ -25052,12 +26847,27 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25069,6 +26879,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d * When a containing DOM node's height has been altered, trigger a resize of * the related CodeMirror instance so that it is always correctly sized. */ + + var CodeMirrorSizer = /*#__PURE__*/ function () { @@ -25099,6 +26911,7 @@ function () { }(); exports.default = CodeMirrorSizer; + },{}],73:[function(require,module,exports){ "use strict"; @@ -25107,28 +26920,83 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return obj; +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + return arr2; + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + var QueryStore = /*#__PURE__*/ function () { function QueryStore(key, storage) { + var maxSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + _classCallCheck(this, QueryStore); this.key = key; this.storage = storage; + this.maxSize = maxSize; this.items = this.fetchAll(); } @@ -25182,14 +27050,25 @@ function () { }, { key: "push", value: function push(item) { - this.items.push(item); - this.save(); - } - }, { - key: "shift", - value: function shift() { - this.items.shift(); - this.save(); + var items = [].concat(_toConsumableArray(this.items), [item]); + + if (this.maxSize && items.length > this.maxSize) { + items.shift(); + } + + for (var attempts = 0; attempts < 5; attempts++) { + var response = this.storage.set(this.key, JSON.stringify(_defineProperty({}, this.key, items))); + ; + + if (!response || !response.error) { + this.items = items; + } else if (response.isQuotaError && this.maxSize) { + // Only try to delete last items on LRU stores + items.shift(); + } else { + return; // We don't know what happened in this case, so just bailing out + } + } } }, { key: "save", @@ -25207,6 +27086,7 @@ function () { }(); exports.default = QueryStore; + },{}],74:[function(require,module,exports){ "use strict"; @@ -25215,18 +27095,45 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + +function isQuotaError(storage, e) { + return e instanceof DOMException && ( // everything except Firefox + e.code === 22 || // Firefox + e.code === 1014 || // test name field too, because code might not be present + // everything except Firefox + e.name === 'QuotaExceededError' || // Firefox + e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && // acknowledge QuotaExceededError only if there's something already stored + storage.length !== 0; +} + var StorageAPI = /*#__PURE__*/ function () { @@ -25244,26 +27151,40 @@ function () { if (value === 'null' || value === 'undefined') { this.storage.removeItem('graphiql:' + name); - } else { - return value; + return null; } + + return value; } + + return null; } }, { key: "set", value: function set(name, value) { + var quotaError = false; + var error = null; + if (this.storage) { var key = "graphiql:".concat(name); if (value) { - if (isStorageAvailable(this.storage, key, value)) { + try { this.storage.setItem(key, value); + } catch (e) { + error = e; + quotaError = isQuotaError(this.storage, e); } } else { // Clean up by removing the item if there's no value to set this.storage.removeItem(key); } } + + return { + isQuotaError: quotaError, + error: error + }; } }]); @@ -25272,20 +27193,6 @@ function () { exports.default = StorageAPI; -function isStorageAvailable(storage, key, value) { - try { - storage.setItem(key, value); - return true; - } catch (e) { - return e instanceof DOMException && ( // everything except Firefox - e.code === 22 || // Firefox - e.code === 1014 || // test name field too, because code might not be present - // everything except Firefox - e.name === 'QuotaExceededError' || // Firefox - e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && // acknowledge QuotaExceededError only if there's something already stored - storage.length !== 0; - } -} },{}],75:[function(require,module,exports){ "use strict"; @@ -25296,9 +27203,34 @@ exports.default = void 0; var _commonKeys; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + return obj; +} + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} var isMacOs = false; @@ -25309,6 +27241,7 @@ if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' var commonKeys = (_commonKeys = {}, _defineProperty(_commonKeys, isMacOs ? 'Cmd-F' : 'Ctrl-F', 'findPersistent'), _defineProperty(_commonKeys, 'Cmd-G', 'findPersistent'), _defineProperty(_commonKeys, 'Ctrl-G', 'findPersistent'), _defineProperty(_commonKeys, 'Ctrl-Left', 'goSubwordLeft'), _defineProperty(_commonKeys, 'Ctrl-Right', 'goSubwordRight'), _defineProperty(_commonKeys, 'Alt-Left', 'goGroupLeft'), _defineProperty(_commonKeys, 'Alt-Right', 'goGroupRight'), _commonKeys); var _default = commonKeys; exports.default = _default; + },{}],76:[function(require,module,exports){ "use strict"; @@ -25316,7 +27249,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = debounce; - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25328,6 +27260,7 @@ exports.default = debounce; * Provided a duration and a function, returns a new function which is called * `duration` milliseconds after the last call. */ + function debounce(duration, fn) { var timeout; return function () { @@ -25341,6 +27274,7 @@ function debounce(duration, fn) { }, duration); }; } + },{}],77:[function(require,module,exports){ "use strict"; @@ -25349,7 +27283,6 @@ Object.defineProperty(exports, "__esModule", { }); exports.getLeft = getLeft; exports.getTop = getTop; - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25360,6 +27293,7 @@ exports.getTop = getTop; /** * Utility functions to get a pixel distance from left/top of the window. */ + function getLeft(initialElem) { var pt = 0; var elem = initialElem; @@ -25383,6 +27317,7 @@ function getTop(initialElem) { return pt; } + },{}],78:[function(require,module,exports){ "use strict"; @@ -25392,7 +27327,6 @@ Object.defineProperty(exports, "__esModule", { exports.fillLeafs = fillLeafs; var _graphql = require("graphql"); - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25410,6 +27344,8 @@ var _graphql = require("graphql"); * Note that there is no guarantee that the result will be a valid query, this * utility represents a "best effort" which may be useful within IDE tools. */ + + function fillLeafs(schema, docString, getDefaultFieldNames) { var insertions = []; @@ -25572,6 +27508,7 @@ function getIndentation(str, index) { return str.substring(indentStart, indentEnd); } + },{"graphql":112}],79:[function(require,module,exports){ "use strict"; @@ -25579,7 +27516,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = find; - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25589,6 +27525,7 @@ exports.default = find; * * */ + function find(list, predicate) { for (var i = 0; i < list.length; i++) { if (predicate(list[i])) { @@ -25596,6 +27533,7 @@ function find(list, predicate) { } } } + },{}],80:[function(require,module,exports){ "use strict"; @@ -25606,7 +27544,6 @@ exports.default = getQueryFacts; exports.collectVariables = collectVariables; var _graphql = require("graphql"); - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25620,6 +27557,8 @@ var _graphql = require("graphql"); * * If the query cannot be parsed, returns undefined. */ + + function getQueryFacts(schema, documentStr) { if (!documentStr) { return; @@ -25672,6 +27611,7 @@ function collectVariables(schema, documentAST) { }); return variableToType; } + },{"graphql":112}],81:[function(require,module,exports){ "use strict"; @@ -25679,7 +27619,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getSelectedOperationName; - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25691,6 +27630,7 @@ exports.default = getSelectedOperationName; * Provided optional previous operations and selected name, and a next list of * operations, determine what the next selected operation should be. */ + function getSelectedOperationName(prevOperations, prevSelectedOperationName, operations) { // If there are not enough operations to bother with, return nothing. if (!operations || operations.length < 1) { @@ -25721,6 +27661,7 @@ function getSelectedOperationName(prevOperations, prevSelectedOperationName, ope return names[0]; } + },{}],82:[function(require,module,exports){ "use strict"; @@ -25736,13 +27677,14 @@ Object.defineProperty(exports, "introspectionQuery", { exports.introspectionQuerySansSubscriptions = exports.introspectionQueryName = void 0; var _graphql = require("graphql"); - /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + var introspectionQueryName = (0, _graphql.getOperationAST)((0, _graphql.parse)(_graphql.introspectionQuery)).name.value; // Some GraphQL services do not support subscriptions and fail an introspection // query which includes the `subscriptionType` field as the stock introspection // query does. This backup query removes that field. @@ -25750,6 +27692,7 @@ var introspectionQueryName = (0, _graphql.getOperationAST)((0, _graphql.parse)(_ exports.introspectionQueryName = introspectionQueryName; var introspectionQuerySansSubscriptions = "\n query ".concat(introspectionQueryName, " {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n description\n type { ...TypeRef }\n defaultValue\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n"); exports.introspectionQuerySansSubscriptions = introspectionQuerySansSubscriptions; + },{"graphql":112}],83:[function(require,module,exports){ "use strict"; @@ -25760,11 +27703,54 @@ exports.mergeAst = mergeAst; var _kinds = require("graphql/language/kinds"); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} function resolveDefinition(fragments, obj) { var definition = obj; @@ -25806,6 +27792,7 @@ function mergeAst(queryAst) { }); return copyAst; } + },{"graphql/language/kinds":139}],84:[function(require,module,exports){ "use strict"; @@ -25814,7 +27801,6 @@ Object.defineProperty(exports, "__esModule", { }); exports.normalizeWhitespace = normalizeWhitespace; exports.invalidCharacters = void 0; - /** * Copyright (c) 2019 GraphQL Contributors. * @@ -25822,6 +27808,7 @@ exports.invalidCharacters = void 0; * LICENSE file in the root directory of this source tree. */ // Unicode whitespace characters that break the interface. + var invalidCharacters = Array.from({ length: 11 }, function (x, i) { @@ -25834,6 +27821,7 @@ var sanitizeRegex = new RegExp('[' + invalidCharacters.join('') + ']', 'g'); function normalizeWhitespace(line) { return line.replace(sanitizeRegex, ' '); } + },{}],85:[function(require,module,exports){ "use strict"; @@ -25846,14 +27834,19 @@ var _graphql = require("graphql"); var _markdownIt = _interopRequireDefault(require("markdown-it")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} /** * Copyright (c) 2019 GraphQL Contributors. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + + var md = new _markdownIt.default(); /** * Render a custom UI for CodeMirror's hint which includes additional info @@ -25925,6 +27918,7 @@ function renderType(type) { return "".concat(type.name, ""); } + },{"codemirror":40,"graphql":112,"markdown-it":233}],86:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -63642,9 +65636,9 @@ function warnInvalidARIAProps(type, props) { }).join(', '); if (invalidProps.length === 1) { - warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); + // warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); } else if (invalidProps.length > 1) { - warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); + // warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type); } } @@ -71439,7 +73433,7 @@ function ChildReconciler(shouldTrackSideEffects) { break; } - warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); + // warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); break; default: @@ -139669,10 +141663,10 @@ const buffer = (Object.keys(map) .reduce((output, input) => Buffer.concat([output, input]), Buffer(0)) ) -const implementations = Object -.keys(map) -.map((key) => map[key]) -.reduce((i, type) => Object.assign(i, type.implementation), {}) +const implementations = (Object.keys(map) + .map((key) => map[key]) + .reduce((i, type) => Object.assign(i, type.implementation), {}) +) module.exports = createSchema(String(buffer), implementations).schema diff --git a/test/fixtures/three.graphql/editor.js b/test/fixtures/three.graphql/editor.js index e0ae01b4319596..343c251b79041c 100644 --- a/test/fixtures/three.graphql/editor.js +++ b/test/fixtures/three.graphql/editor.js @@ -72,7 +72,6 @@ ready(() => { query = createQuery({canvas}) requestAnimationFrame(tick) function tick() { - requestAnimationFrame(tick) const wrap = document.querySelector('#graphiql .resultWrap') const style = wrap ? getComputedStyle(wrap) : { @@ -88,6 +87,7 @@ ready(() => { query(currentQuerySource || kDefaultQuery) .catch((err) => console.error(err)) + requestAnimationFrame(tick) } }) diff --git a/test/fixtures/three.graphql/graphiql.css b/test/fixtures/three.graphql/graphiql.css index 74d095ea57638c..afe21db2baed2e 100644 --- a/test/fixtures/three.graphql/graphiql.css +++ b/test/fixtures/three.graphql/graphiql.css @@ -81,7 +81,6 @@ cursor: pointer; font-size: 14px; margin: 0; - outline: 0; padding: 2px 20px 0 18px; } @@ -123,6 +122,7 @@ display: flex; flex-direction: column; flex: 1; + flex-basis: 1em; position: relative; } @@ -154,6 +154,9 @@ font-size: 18px; margin: -7px -8px -6px 0; padding: 18px 16px 15px 12px; + background: 0; + border: 0; + line-height: 14px; } .graphiql-container div .query-editor { @@ -235,6 +238,7 @@ .graphiql-container .toolbar-button { background: #fdfdfd; background: linear-gradient(#f9f9f9, #ececec); + border: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.20), @@ -316,10 +320,6 @@ inset 0 0 6px rgba(0, 0, 0, 0.1); } -.graphiql-container .execute-button:focus { - outline: 0; -} - .graphiql-container .toolbar-menu, .graphiql-container .toolbar-select { position: relative; @@ -386,8 +386,8 @@ .graphiql-container .toolbar-select-options > li.hover, .graphiql-container .toolbar-select-options > li:active, .graphiql-container .toolbar-select-options > li:hover, -.graphiql-container .history-contents > p:hover, -.graphiql-container .history-contents > p:active { +.graphiql-container .history-contents > li:hover, +.graphiql-container .history-contents > li:active { background: #e10098; color: #fff; } @@ -994,6 +994,9 @@ span.CodeMirror-selectedtext { background: none; } padding: 17px 12px 16px 16px; text-overflow: ellipsis; white-space: nowrap; + background: 0; + border: 0; + line-height: 14px; } .doc-explorer-narrow .doc-explorer-back { @@ -1055,6 +1058,33 @@ span.CodeMirror-selectedtext { background: none; } margin-bottom: 4px; } +.graphiql-container .doc-type-description code, +.graphiql-container .doc-type-description pre, +.graphiql-container .doc-category code, +.graphiql-container .doc-category pre { + --saf-0: rgba(var(--sk_foreground_low,29,28,29),0.13); + font-size: 12px; + line-height: 1.50001; + font-variant-ligatures: none; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + word-break: normal; + -webkit-tab-size: 4; + -moz-tab-size: 4; + tab-size: 4; +} + +.graphiql-container .doc-type-description code, +.graphiql-container .doc-category code { + padding: 2px 3px 1px; + border: 1px solid var(--saf-0); + border-radius: 3px; + background-color: rgba(var(--sk_foreground_min,29,28,29),.04); + color: #e01e5a; + background-color: white; +} + .graphiql-container .doc-category { margin: 20px 0; } @@ -1186,8 +1216,7 @@ span.CodeMirror-selectedtext { background: none; } position: relative; } -.graphiql-container .search-box:before { - content: '\26b2'; +.graphiql-container .search-box-icon { cursor: pointer; display: block; font-size: 24px; @@ -1214,6 +1243,7 @@ span.CodeMirror-selectedtext { background: none; } -moz-user-select: none; -ms-user-select: none; user-select: none; + border: 0; } .graphiql-container .search-box .search-box-clear:hover { @@ -1261,13 +1291,16 @@ span.CodeMirror-selectedtext { background: none; } .CodeMirror-foldgutter-folded:after { content: "\25B8"; } -.graphiql-container .history-contents, -.graphiql-container .history-contents input { +.graphiql-container .history-contents { font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace; +} + +.graphiql-container .history-contents { + margin: 0; padding: 0; } -.graphiql-container .history-contents p { +.graphiql-container .history-contents li { align-items: center; display: flex; font-size: 12px; @@ -1279,25 +1312,58 @@ span.CodeMirror-selectedtext { background: none; } border-bottom: 1px solid #e0e0e0; } -.graphiql-container .history-contents p.editable { - padding-bottom: 6px; - padding-top: 7px; +.graphiql-container .history-contents li button:not(.history-label) { + display: none; + margin-left: 10px; +} + +.graphiql-container .history-contents li:hover button:not(.history-label), +.graphiql-container .history-contents li:focus-within button:not(.history-label) { + display: inline-block; +} + +.graphiql-container .history-contents input, +.graphiql-container .history-contents button { + padding: 0; + background: 0; + border: 0; + font-size: inherit; + font-family: inherit; + line-height: 14px; + color: inherit; } .graphiql-container .history-contents input { flex-grow: 1; - font-size: 12px; } -.graphiql-container .history-contents p:hover { +.graphiql-container .history-contents input::-webkit-input-placeholder { + color: inherit; +} + +.graphiql-container .history-contents input:-ms-input-placeholder { + color: inherit; +} + +.graphiql-container .history-contents input::-ms-input-placeholder { + color: inherit; +} + +.graphiql-container .history-contents input::placeholder { + color: inherit; +} + +.graphiql-container .history-contents button { cursor: pointer; + text-align: left; } -.graphiql-container .history-contents p span.history-label { +.graphiql-container .history-contents .history-label { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; -}.CodeMirror-info { +} +.CodeMirror-info { background: white; border-radius: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); diff --git a/test/fixtures/three.graphql/package-lock.json b/test/fixtures/three.graphql/package-lock.json index 13ba8de7426f49..95a1fdd53366c5 100644 --- a/test/fixtures/three.graphql/package-lock.json +++ b/test/fixtures/three.graphql/package-lock.json @@ -1,9 +1,165 @@ { "name": "three.graphql", - "version": "0.1.4", + "version": "0.1.6", "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/core": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", + "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helpers": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.7.2", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", + "dev": true, + "requires": { + "@babel/types": "^7.7.2", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", + "dev": true, + "requires": { + "@babel/types": "^7.7.0" + } + }, + "@babel/helpers": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", + "dev": true, + "requires": { + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==", + "dev": true + }, + "@babel/template": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" + } + }, + "@babel/traverse": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -40,10 +196,13 @@ "dev": true }, "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } }, "anymatch": { "version": "2.0.0", @@ -163,6 +322,12 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "babelify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", + "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -552,27 +717,14 @@ "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==" }, "chalk": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "^1.1.0", - "escape-string-regexp": "^1.0.0", - "has-ansi": "^0.1.0", - "strip-ansi": "^0.3.0", - "supports-color": "^0.2.0" - }, - "dependencies": { - "strip-ansi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.1" - } - } + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "charenc": { @@ -664,6 +816,21 @@ "object-visit": "^1.0.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "combine-source-map": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", @@ -2004,6 +2171,42 @@ "split2": "^0.2.1", "stdout-stream": "^1.4.0", "url-trim": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, + "requires": { + "ansi-styles": "^1.1.0", + "escape-string-regexp": "^1.0.0", + "has-ansi": "^0.1.0", + "strip-ansi": "^0.3.0", + "supports-color": "^0.2.0" + } + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, + "requires": { + "ansi-regex": "^0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + } } }, "get-assigned-identifiers": { @@ -2066,6 +2269,12 @@ } } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", @@ -2073,22 +2282,22 @@ "dev": true }, "graph.ql": { - "version": "github:chetabahana/graph.ql#b1a0f277f8c3a48feaa559e25869883e977777b7", + "version": "github:chetabahana/graph.ql#56f8ebc892e756ff9781e5e8f7309375f2780863", "from": "github:chetabahana/graph.ql#workflows", "requires": { - "co": "4.6.0", + "co": "^4.6.0", "debug": "^4.1.1", "graphql": "^14.5.8" } }, "graphiql": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-0.15.1.tgz", - "integrity": "sha512-rqI0GgQMHlJ2B/I97M+NwShJI80jKlrk9NS9KxEjH1cDY5h28GF2rn+B/ZWpCZhnr4H1FC5nvB0irShSdCkGhQ==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-0.16.0.tgz", + "integrity": "sha512-1Dfpo1+8kxxz+tyksriWgZTffBVzYiWLCuKI6xf/uPd+wWjnh2jqQ3km/Yjb4NnuaBLAWpL1beJClFE5L/YMww==", "dev": true, "requires": { "codemirror": "^5.47.0", - "codemirror-graphql": "^0.11.1", + "codemirror-graphql": "^0.11.2", "copy-to-clipboard": "^3.2.0", "markdown-it": "^8.4.0", "regenerator-runtime": "^0.13.3" @@ -2192,6 +2401,12 @@ "ansi-regex": "^0.2.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -2546,6 +2761,12 @@ } } }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-stable-stringify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", @@ -2560,6 +2781,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -2846,6 +3076,11 @@ "dev": true, "optional": true }, + "nanoid": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.7.tgz", + "integrity": "sha512-fmS3qwDldm4bE01HCIRqNk+f255CNjnAoeV3Zzzv0KemObHKqYgirVaZA9DtKcjogicWjYcHkJs4D5A8CjnuVQ==" + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -3653,6 +3888,14 @@ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" }, + "shortid": { + "version": "2.2.15", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.15.tgz", + "integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==", + "requires": { + "nanoid": "^2.1.0" + } + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -4065,10 +4308,13 @@ } }, "supports-color": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", - "dev": true + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } }, "syntax-error": { "version": "1.4.0", @@ -4129,6 +4375,12 @@ "process": "~0.11.0" } }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", diff --git a/test/fixtures/three.graphql/package.json b/test/fixtures/three.graphql/package.json index d924c555198a6d..64ad4940ecdda0 100644 --- a/test/fixtures/three.graphql/package.json +++ b/test/fixtures/three.graphql/package.json @@ -1,6 +1,6 @@ { "name": "three.graphql", - "version": "0.1.4", + "version": "0.1.6", "description": "Create & Query THREE objects with GraphQL", "author": "Chetabahana ", "developer": "Joseph Werle ", @@ -11,20 +11,23 @@ "graphql" ], "dependencies": { - "browserify": "^16.5.0", - "core-js": "^3.4.1", - "debug": "^4.1.1", - "domready": "^1.0.8", - "glob": "^7.1.6", + "browserify": "latest", + "core-js": "latest", + "debug": "latest", + "domready": "latest", + "glob": "latest", "graph.ql": "chetabahana/graph.ql#workflows", - "three": "^0.110.0" + "shortid": "latest", + "three": "latest" }, "devDependencies": { - "brfs": "^2.0.2", - "budo": "^11.6.3", - "graphiql": "^0.15.1", - "react": "^16.11.0", - "react-dom": "^16.11.0" + "@babel/core": "latest", + "babelify": "latest", + "brfs": "latest", + "budo": "latest", + "graphiql": "latest", + "react": "latest", + "react-dom": "latest" }, "scripts": { "preinstall": "bash scripts/preinstall.sh", diff --git a/test/fixtures/three.graphql/query.js b/test/fixtures/three.graphql/query.js new file mode 100644 index 00000000000000..2adeca9fad84d0 --- /dev/null +++ b/test/fixtures/three.graphql/query.js @@ -0,0 +1,93 @@ +var query = ` +## Renders a scene into a viewport with +## a PerspectiveCamera and a Scene containing +## a Mesh constructed with a BoxGeometry and +## a MeshBasicMaterial +query render($width: Float, + $height: Float, + #$rotateX: Float, + #$rotateY: Float + $tickr: Float) { + ## Describes renderer + WebGLRenderer { + ## set viewport width/height based on context inputs + setSize(width: $width, height: $height) + + ## Configures a PerspectiveCamera + PerspectiveCamera(fov: 75, aspect: 1, near: 1, far: 10000) { + setPosition(z: 500) + } + + ## Describes a Scene + Scene { + + ## Describes a named Mesh + a: Mesh(name: "box-a") { + setRotation(x: $tickr) + setPosition(x: 200, y: 200) + ...BoxWireframe + } + + b: Mesh(name: "box-b") { + setPosition(x: -200, y: -200) + setRotation(y: $tickr) + ...Box + } + + c: Mesh(name: "box-c") { + setRotation(z: $tickr) + setPosition(x: 0) + ...Box + } + } + } +} + +fragment BoxWireframe on Mesh { + ## Contruct geometry and material for mesh + BoxGeometry(width: 100, height: 100, depth: 100) + MeshBasicMaterial(wireframe: true) +} + +fragment Box on Mesh { + BoxGeometry(width: 100, height: 100, depth: 100) + MeshBasicMaterial(wireframe: false) +} +`; + +var draw = { + + element : function() { + + var cm = document.getElementsByClassName('CodeMirror')[0]; + + if (cm && cm.CodeMirror instanceof Object) { + + cm.CodeMirror.setValue(draw.encode(query)); + + } else { + + window.requestAnimationFrame(draw.element); + + } + + }, + + encode : function(val) { + + return val.replace(/^"(.*)"$/, "$1") + .replace(/\\n/g, "\n") + .replace(/'/g, "'") + .replace(/"/g, '"') + .replace(/>/g, '>') + .replace(/</g, '<') + .replace(/&/g, '&') + .replace(/

/g, '') + .replace(/<\/p>/g, '') + .replace(/‘/g, "'") + .replace(/’/g, "'") + ; + + } + +} diff --git a/test/fixtures/three.graphql/schema/index.js b/test/fixtures/three.graphql/schema/index.js index 261acbe8c53f05..bdf87a834c6645 100644 --- a/test/fixtures/three.graphql/schema/index.js +++ b/test/fixtures/three.graphql/schema/index.js @@ -101,9 +101,9 @@ const buffer = (Object.keys(map) .reduce((output, input) => Buffer.concat([output, input]), Buffer(0)) ) -const implementations = Object -.keys(map) -.map((key) => map[key]) -.reduce((i, type) => Object.assign(i, type.implementation), {}) +const implementations = (Object.keys(map) + .map((key) => map[key]) + .reduce((i, type) => Object.assign(i, type.implementation), {}) +) module.exports = createSchema(String(buffer), implementations).schema diff --git a/test/fixtures/three.graphql/scripts/audit.sh b/test/fixtures/three.graphql/scripts/audit.sh index ff17e43b00e16b..7a0fabb63858f1 100644 --- a/test/fixtures/three.graphql/scripts/audit.sh +++ b/test/fixtures/three.graphql/scripts/audit.sh @@ -8,7 +8,10 @@ echo -e "\n$hr\nRESOLVE VERSION\n$hr" # https://github.com/apollographql/react-apollo/issues/742#issuecomment-338366662 # https://github.com/matthewmueller/graph.ql/blob/master/package.json # https://stackoverflow.com/a/56515445/4058484 -echo Resolving a duplicate version of graphql and use one version only: find node_modules -name graphql grep version node_modules/graphql/package.json rm -rf node_modules/graph.ql/node_modules/graphql + +echo -e "\n$hr\nLIST VERSION\n$hr" +# https://stackoverflow.com/a/25497068/4058484 +npm list --depth=0 diff --git a/test/fixtures/three.graphql/scripts/build.sh b/test/fixtures/three.graphql/scripts/build.sh index 57b58297e8d302..995decc8b76dd9 100644 --- a/test/fixtures/three.graphql/scripts/build.sh +++ b/test/fixtures/three.graphql/scripts/build.sh @@ -1,16 +1,17 @@ #!/bin/bash # Run browserify -browserify editor.js -t brfs -o build.js +browserify editor.js -t brfs -o build.js --no-babelrc -# Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps -# https://fb.me/react-derived-state -npx react-codemod rename-unsafe-lifecycles +# Resolving: Error/Warning +REPLACE='return null' +FIND='throw new TypeError("\Int cannot represent non-integer value: ".concat((0, _inspect.default)(value)))' +sed -i "s|$FIND|$REPLACE|g" build.js -# Resolving: TypeError Int cannot represent non-integer value -SED_ERROR='throw new TypeError("\Int cannot represent non-integer value: ".concat((0, _inspect.default)(value)))' -sed -i "s/$SED_ERROR/return null/g" build.js +FIND="warning\$1(false, 'Encountered two children with the same key" +REPLACE="// warning\$1(false, 'Encountered two children with the same key" +sed -i "s|$FIND|$REPLACE|g" build.js -# Resolving: Variable "$width" got invalid value NaN; Expected type Float. Float cannot represent non numeric value: NaN -#SED_ERROR='throw new TypeError("Float cannot represent non numeric value: ".concat((0, _inspect.default)(value)))' -#sed -i "s/$SED_ERROR/return null/g" build.js +FIND="warning\$1(false, 'Invalid aria prop" +REPLACE="// warning\$1(false, 'Invalid aria prop" +sed -i "s|$FIND|$REPLACE|g" build.js diff --git a/test/fixtures/three.graphql/scripts/install.sh b/test/fixtures/three.graphql/scripts/install.sh index e6c469d6292169..cb78794a8beb68 100644 --- a/test/fixtures/three.graphql/scripts/install.sh +++ b/test/fixtures/three.graphql/scripts/install.sh @@ -2,5 +2,4 @@ # ..reserve for code - echo -e "\n$hr\nPOSTINSTALL\n$hr" diff --git a/test/fixtures/three.graphql/scripts/postinstall.sh b/test/fixtures/three.graphql/scripts/postinstall.sh index 2a4a3ed6531789..a8cf9d90e201a2 100644 --- a/test/fixtures/three.graphql/scripts/postinstall.sh +++ b/test/fixtures/three.graphql/scripts/postinstall.sh @@ -2,4 +2,3 @@ # Copy graphiql.css to current directory cp -f node_modules/graphiql/graphiql.css . - diff --git a/test/fixtures/three.graphql/scripts/preinstall.sh b/test/fixtures/three.graphql/scripts/preinstall.sh index e7acf9110e45a5..c6b829e2eb0272 100644 --- a/test/fixtures/three.graphql/scripts/preinstall.sh +++ b/test/fixtures/three.graphql/scripts/preinstall.sh @@ -2,6 +2,11 @@ # Update npm to the latest sudo npm install npm@latest -g -# Delete all regenerated files +# Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps +# Refereence: https://fb.me/react-derived-state +echo -e "\n$hr\nNPX REACT\n$hr" rm -rf graphiql.css package-lock.json yarn.lock +npx react-codemod rename-unsafe-lifecycles + +# Delete all regenerated files echo -e "\n$hr\nINSTALL\n$hr" diff --git a/test/fixtures/three.graphql/scripts/test.sh b/test/fixtures/three.graphql/scripts/test.sh index 89028d380d3990..0f0cfd785084c8 100644 --- a/test/fixtures/three.graphql/scripts/test.sh +++ b/test/fixtures/three.graphql/scripts/test.sh @@ -5,6 +5,5 @@ # Debug # https://www.npmjs.com/package/debug -npm install debug #DEBUG=http node app.js #node --inspect test.js