UNPKG

@atlaskit/profilecard

Version:

A React component to display a card with user information.

98 lines 4.5 kB
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; import _createClass from "@babel/runtime/helpers/createClass"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/inherits"; import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper"; var _excluded = ["errorNumber"], _excluded2 = ["statusCode", "errorType", "classification"]; function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } export var HttpError = /*#__PURE__*/function (_Error) { function HttpError(code, reason, traceId) { var _this; _classCallCheck(this, HttpError); _this = _callSuper(this, HttpError, [reason]); _this.code = code; _this.traceId = traceId; return _this; } _inherits(HttpError, _Error); return _createClass(HttpError); }( /*#__PURE__*/_wrapNativeSuper(Error)); export var DirectoryGraphQLError = /*#__PURE__*/function (_Error2) { function DirectoryGraphQLError(message, category, type) { var _this2; var extensions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var path = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; _classCallCheck(this, DirectoryGraphQLError); _this2 = _callSuper(this, DirectoryGraphQLError, [message]); _this2.category = category; _this2.type = type; _this2.path = path.join('.'); var errorNumber = extensions.errorNumber, unknownExtension = _objectWithoutProperties(extensions, _excluded); _this2.errorNumber = extensions.errorNumber; _this2.extensions = unknownExtension; return _this2; } _inherits(DirectoryGraphQLError, _Error2); return _createClass(DirectoryGraphQLError); }( /*#__PURE__*/_wrapNativeSuper(Error)); export var DirectoryGraphQLErrors = /*#__PURE__*/function (_Error3) { function DirectoryGraphQLErrors(errors, traceId) { var _this3; _classCallCheck(this, DirectoryGraphQLErrors); _this3 = _callSuper(this, DirectoryGraphQLErrors, ['DirectoryGraphQLErrors']); _this3.traceId = traceId; if (Array.isArray(errors)) { _this3.errors = errors.map(function (error) { return new DirectoryGraphQLError(error.message, error.category, error.type, error.extensions, error.path); }); } else { _this3.errors = []; } return _this3; } _inherits(DirectoryGraphQLErrors, _Error3); return _createClass(DirectoryGraphQLErrors); }( /*#__PURE__*/_wrapNativeSuper(Error)); export var AGGError = /*#__PURE__*/function (_Error4) { function AGGError(message, extensions) { var _this4; var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; _classCallCheck(this, AGGError); _this4 = _callSuper(this, AGGError, [message]); _this4.path = path === null || path === void 0 ? void 0 : path.join('.'); var statusCode = extensions.statusCode, errorType = extensions.errorType, classification = extensions.classification, unknownExtension = _objectWithoutProperties(extensions, _excluded2); _this4.statusCode = statusCode; _this4.errorType = errorType; _this4.classification = classification; _this4.extensions = unknownExtension; return _this4; } _inherits(AGGError, _Error4); return _createClass(AGGError); }( /*#__PURE__*/_wrapNativeSuper(Error)); export var AGGErrors = /*#__PURE__*/function (_Error5) { function AGGErrors(errors, traceId) { var _this5; _classCallCheck(this, AGGErrors); _this5 = _callSuper(this, AGGErrors, ['AGGErrors']); _this5.traceId = traceId; if (Array.isArray(errors)) { _this5.errors = errors.map(function (error) { return new AGGError(error.message, error.extensions, error.path); }); } else { _this5.errors = []; } return _this5; } _inherits(AGGErrors, _Error5); return _createClass(AGGErrors); }( /*#__PURE__*/_wrapNativeSuper(Error));