UNPKG

cluedin-widget

Version:
147 lines (115 loc) • 7.52 kB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[24],{ /***/ 2313: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(154); /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(398); /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14); /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15); /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(11); /* harmony import */ var _core_components_composites_PageLoader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(38); function graphQLFetcher(graphQLParams) { return fetch("".concat(_config__WEBPACK_IMPORTED_MODULE_10__[/* url */ "j"].graphQL), { method: 'post', headers: { 'Content-Type': 'application/json', Authorization: "Bearer ".concat(Object(_config__WEBPACK_IMPORTED_MODULE_10__[/* getCurrentToken */ "d"])()) }, body: JSON.stringify(graphQLParams) }).then(function (response) { return response.json(); }); } var GraphiQlAsyncComp = /*#__PURE__*/ function (_Component) { _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6___default()(GraphiQlAsyncComp, _Component); function GraphiQlAsyncComp() { var _getPrototypeOf2; var _this; _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, GraphiQlAsyncComp); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(GraphiQlAsyncComp)).call.apply(_getPrototypeOf2, [this].concat(args))); _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7___default()(_this)), "state", { AsyncComponent: _core_components_composites_PageLoader__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"] }); return _this; } _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(GraphiQlAsyncComp, [{ key: "componentDidMount", value: function () { var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { var module, AsyncComponent; return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return Promise.all(/* import() | graphiql */[__webpack_require__.e(39), __webpack_require__.e(32)]).then(__webpack_require__.t.bind(null, 2185, 7)); case 2: module = _context.sent; __webpack_require__.e(/* import() | graphiqlCSS */ 33).then(__webpack_require__.t.bind(null, 2296, 7)); AsyncComponent = module.default; this.setState({ AsyncComponent: AsyncComponent }); case 6: case "end": return _context.stop(); } } }, _callee, this); })); return function componentDidMount() { return _componentDidMount.apply(this, arguments); }; }() }, { key: "render", value: function render() { var AsyncComponent = this.state.AsyncComponent; return react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(AsyncComponent, { fetcher: graphQLFetcher }); } }]); return GraphiQlAsyncComp; }(react__WEBPACK_IMPORTED_MODULE_9__["Component"]); var GraphiQlPage = function GraphiQlPage() { return react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { style: { display: 'flex' } }, react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { style: { flex: '1', height: 'calc(100vh - 90px)', overflow: 'hidden', zIndex: '0' } }, react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(GraphiQlAsyncComp, null))); }; /* harmony default export */ __webpack_exports__["default"] = (GraphiQlPage); /***/ }) }]);