UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

736 lines (644 loc) 27.5 kB
import _regeneratorRuntime from "@babel/runtime/regenerator"; import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; import _objectSpread from "@babel/runtime/helpers/objectSpread2"; import _extends from "@babel/runtime/helpers/extends"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; import _get from "@babel/runtime/helpers/get"; import _inherits from "@babel/runtime/helpers/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; function _createSuper(Derived) { function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } return function () { var Super = _getPrototypeOf(Derived), result; if (isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } import { __decorate } from "tslib"; import React, { cloneElement, isValidElement } from 'react'; import PropTypes from 'prop-types'; import isEqual from 'lodash/isEqual'; import defer from 'lodash/defer'; import noop from 'lodash/noop'; import isNil from 'lodash/isNil'; import isNumber from 'lodash/isNumber'; import classNames from 'classnames'; import classes from 'component-classes'; import { pxToRem } from '../../../es/_util/UnitConvertor'; import KeyCode from '../../../es/_util/KeyCode'; import ViewComponent from '../core/ViewComponent'; import Icon from '../icon'; import autobind from '../_util/autobind'; import Button from '../button/Button'; import EventManager from '../_util/EventManager'; import isEmpty from '../_util/isEmpty'; import { ButtonColor, FuncType } from '../button/enum'; import asyncComponent from '../_util/AsyncComponent'; import message from '../message'; import exception from '../_util/exception'; import { $l } from '../locale-context'; import DataSetRequestError from '../data-set/DataSetRequestError'; import { suffixCls, toUsefulDrawerTransitionName } from './utils'; import { getDocument } from '../_util/DocumentUtils'; function fixUnit(n) { if (isNumber(n)) { return "".concat(n, "px"); } return n; } function getTransformOrigin(position, style) { var _ref = typeof window === 'undefined' ? {} : getDocument(window).documentElement, _ref$offsetWidth = _ref.offsetWidth, offsetWidth = _ref$offsetWidth === void 0 ? 0 : _ref$offsetWidth, _ref$scrollTop = _ref.scrollTop, scrollTop = _ref$scrollTop === void 0 ? 0 : _ref$scrollTop, _ref$scrollLeft = _ref.scrollLeft, scrollLeft = _ref$scrollLeft === void 0 ? 0 : _ref$scrollLeft; var _style$width = style.width, width = _style$width === void 0 ? 520 : _style$width, left = style.left, _style$top = style.top, top = _style$top === void 0 ? 100 : _style$top; var x = position.x, y = position.y; var originX = "calc(".concat(x, "px - ").concat(isNil(left) ? "(".concat(offsetWidth, "px - ").concat(fixUnit(width), ") / 2") : "".concat(fixUnit(left)), " - ").concat(scrollLeft, "px)"); // const originX = isNil(left) ? `calc(${x}px - (${offsetWidth}px - ${width}px) / 2)` : `${x - (toPx(left) || 0)}px`; var originY = "calc(".concat(y, "px - ").concat(fixUnit(top), " - ").concat(scrollTop, "px)"); // const originY = `${y - (toPx(top) || 0) - scrollTop}px`; return "".concat(originX, " ").concat(originY); } var HANDLE_MIN_SIZE = 50; var Modal = /*#__PURE__*/ function (_ViewComponent) { _inherits(Modal, _ViewComponent); var _super = _createSuper(Modal); function Modal(props, context) { var _this; _classCallCheck(this, Modal); _this = _super.call(this, props, context); _this.moveEvent = new EventManager(); _this.okCancelEvent = new EventManager(); _this.getDefaultHeader = function (title, closeButton, _okBtn, _cancelBtn) { var _assertThisInitialize = _assertThisInitialized(_this), prefixCls = _assertThisInitialize.prefixCls; if (title || closeButton) { return React.createElement(React.Fragment, null, React.createElement("div", { className: "".concat(prefixCls, "-title") }, title), React.createElement("div", { className: "".concat(prefixCls, "-header-buttons") }, closeButton)); } }; _this.getDefaultFooter = function (okBtn, cancelBtn, _modalChildrenProps) { var _this$props = _this.props, okCancel = _this$props.okCancel, okButton = _this$props.okButton, _this$props$cancelBut = _this$props.cancelButton, cancelButton = _this$props$cancelBut === void 0 ? okCancel !== false : _this$props$cancelBut, _this$props$okFirst = _this$props.okFirst, okFirst = _this$props$okFirst === void 0 ? _this.getContextConfig('modalOkFirst') : _this$props$okFirst, drawer = _this$props.drawer; var buttons = []; if (okButton !== false) { buttons.push(okBtn); } if (cancelButton !== false) { var drawerOkFirst = _this.getContextConfig('drawerOkFirst'); if (drawer && !isNil(drawerOkFirst)) { if (drawerOkFirst) { buttons.push(cancelBtn); } else { buttons.unshift(cancelBtn); } } else if (okFirst) { buttons.push(cancelBtn); } else { buttons.unshift(cancelBtn); } } return React.createElement("div", null, buttons); }; _this.registerOk = function (ok) { _this.okCancelEvent.removeEventListener('ok'); _this.okCancelEvent.addEventListener('ok', ok); }; _this.registerCancel = function (cancel) { _this.okCancelEvent.removeEventListener('cancel'); _this.okCancelEvent.addEventListener('cancel', cancel); }; var _props$close = props.close, close = _props$close === void 0 ? noop : _props$close, _props$update = props.update, update = _props$update === void 0 ? noop : _props$update; _this.childrenProps = { close: close, update: update, props: props, handleOk: _this.registerOk, handleCancel: _this.registerCancel }; return _this; } _createClass(Modal, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps, nextContext) { _get(_getPrototypeOf(Modal.prototype), "componentWillReceiveProps", this).call(this, nextProps, nextContext); if (!isEqual(this.props, nextProps)) { var _nextProps$close = nextProps.close, close = _nextProps$close === void 0 ? noop : _nextProps$close, _nextProps$update = nextProps.update, update = _nextProps$update === void 0 ? noop : _nextProps$update; _extends(this.childrenProps, { close: close, update: update, props: nextProps }); } } }, { key: "saveCancelRef", value: function saveCancelRef(node) { this.cancelButton = node; } }, { key: "handleKeyDown", value: function handleKeyDown(e) { if (e.keyCode === KeyCode.ESC) { var cancelButton = this.cancelButton; if (cancelButton && !cancelButton.disabled) { cancelButton.handleClickWait(e); } else { this.handleCancel(); } } } }, { key: "getOmitPropsKeys", value: function getOmitPropsKeys() { return _get(_getPrototypeOf(Modal.prototype), "getOmitPropsKeys", this).call(this).concat(['__deprecate__', 'closable', 'movable', 'maskClosable', 'maskStyle', 'mask', 'maskClassName', 'keyboardClosable', 'fullScreen', 'title', 'header', 'footer', 'close', 'update', 'okText', 'cancelText', 'okButton', 'cancelButton', 'okCancel', 'onClose', 'onOk', 'onCancel', 'destroyOnClose', 'drawer', 'drawerOffset', 'drawerTransitionName', 'transitionAppear', 'afterClose', 'okProps', 'cancelProps', 'border', 'drawerBorder', 'okFirst', 'autoCenter', 'mousePosition', 'active', 'onTop', 'contentStyle', 'bodyStyle', 'closeOnLocationChange', 'eventKey']); } }, { key: "getOtherProps", value: function getOtherProps() { var otherProps = _get(_getPrototypeOf(Modal.prototype), "getOtherProps", this).call(this); var _this$props2 = this.props, hidden = _this$props2.hidden, mousePosition = _this$props2.mousePosition, _this$props2$keyboard = _this$props2.keyboardClosable, keyboardClosable = _this$props2$keyboard === void 0 ? this.getContextConfig('modalKeyboard') : _this$props2$keyboard, _this$props2$style = _this$props2.style, style = _this$props2$style === void 0 ? {} : _this$props2$style, drawer = _this$props2.drawer, onTop = _this$props2.onTop; if (keyboardClosable) { otherProps.autoFocus = true; otherProps.tabIndex = -1; otherProps.onKeyDown = this.handleKeyDown; } if (!drawer) { var position = this.mousePosition || mousePosition; if (position) { this.mousePosition = position; otherProps.style = _objectSpread({}, style, { transformOrigin: getTransformOrigin(position, style) }); } if (hidden) { this.mousePosition = null; } } if (onTop) { otherProps.onMouseDown = this.handleMouseDown; } return otherProps; } }, { key: "contentReference", value: function contentReference(node) { this.contentNode = node; } }, { key: "getClassName", value: function getClassName() { var _get$call; var prefixCls = this.prefixCls, _this$props3 = this.props, _this$props3$style = _this$props3.style, style = _this$props3$style === void 0 ? {} : _this$props3$style, fullScreen = _this$props3.fullScreen, drawer = _this$props3.drawer, _this$props3$drawerTr = _this$props3.drawerTransitionName, drawerTransitionName = _this$props3$drawerTr === void 0 ? this.getContextConfig('drawerTransitionName') : _this$props3$drawerTr, size = _this$props3.size, active = _this$props3.active, _this$props3$border = _this$props3.border, border = _this$props3$border === void 0 ? this.getContextConfig('modalSectionBorder') : _this$props3$border, _this$props3$drawerBo = _this$props3.drawerBorder, drawerBorder = _this$props3$drawerBo === void 0 ? this.getContextConfig('drawerSectionBorder') : _this$props3$drawerBo, _this$props3$autoCent = _this$props3.autoCenter, autoCenter = _this$props3$autoCent === void 0 ? this.getContextConfig('modalAutoCenter') : _this$props3$autoCent; var center = !drawer && !this.offset; return _get(_getPrototypeOf(Modal.prototype), "getClassName", this).call(this, (_get$call = {}, _defineProperty(_get$call, "".concat(prefixCls, "-center"), center && !('left' in style || 'right' in style)), _defineProperty(_get$call, "".concat(prefixCls, "-fullscreen"), fullScreen), _defineProperty(_get$call, "".concat(prefixCls, "-drawer"), drawer), _defineProperty(_get$call, "".concat(prefixCls, "-border"), drawer ? drawerBorder : border), _defineProperty(_get$call, "".concat(prefixCls, "-drawer-").concat(toUsefulDrawerTransitionName(drawerTransitionName)), drawer), _defineProperty(_get$call, "".concat(prefixCls, "-auto-center"), autoCenter && center && !fullScreen), _defineProperty(_get$call, "".concat(prefixCls, "-").concat(size), size), _defineProperty(_get$call, "".concat(prefixCls, "-active"), active), _get$call)); } }, { key: "render", value: function render() { var prefixCls = this.prefixCls, _this$props4 = this.props, contentStyle = _this$props4.contentStyle, drawer = _this$props4.drawer; var header = this.getHeader(); var body = this.getBody(); var footer = this.getFooter(); return React.createElement("div", _extends({}, this.getMergedProps()), React.createElement("div", { ref: this.contentReference, className: classNames("".concat(prefixCls, "-content"), _defineProperty({}, "".concat(prefixCls, "-drawer-content"), drawer)), style: contentStyle }, header, body, footer)); } }, { key: "componentWillUpdate", value: function componentWillUpdate(_ref2) { var _this2 = this; var hidden = _ref2.hidden; if (hidden === false && hidden !== this.props.hidden) { defer(function () { return _this2.focus(); }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.moveEvent.clear(); this.okCancelEvent.clear(); } }, { key: "handleMouseDown", value: function handleMouseDown(e) { var _this$props5 = this.props, _this$props5$onMouseD = _this$props5.onMouseDown, onMouseDown = _this$props5$onMouseD === void 0 ? noop : _this$props5$onMouseD, _this$props5$onTop = _this$props5.onTop, onTop = _this$props5$onTop === void 0 ? noop : _this$props5$onTop, eventKey = _this$props5.eventKey; onMouseDown(e); if (!e.isDefaultPrevented()) { onTop(eventKey); } } }, { key: "handleHeaderMouseDown", value: function handleHeaderMouseDown(downEvent) { var _this3 = this; var element = this.element, contentNode = this.contentNode, _this$props$autoCente = this.props.autoCenter, autoCenter = _this$props$autoCente === void 0 ? this.getContextConfig('modalAutoCenter') : _this$props$autoCente; if (element && contentNode) { var prefixCls = this.prefixCls; var clientX = downEvent.clientX, clientY = downEvent.clientY, currentTarget = downEvent.currentTarget; var clzz = classes(element); var offsetLeft = element.offsetLeft, offsetParent = element.offsetParent; var doc = getDocument(window); var _ref3 = offsetParent || {}, _ref3$scrollTop = _ref3.scrollTop, scrollTop = _ref3$scrollTop === void 0 ? 0 : _ref3$scrollTop, _ref3$scrollLeft = _ref3.scrollLeft, scrollLeft = _ref3$scrollLeft === void 0 ? 0 : _ref3$scrollLeft, _ref3$offsetHeight = _ref3.offsetHeight, offsetHeight = _ref3$offsetHeight === void 0 ? doc.documentElement.clientHeight || doc.body.clientHeight : _ref3$offsetHeight, _ref3$offsetWidth = _ref3.offsetWidth, offsetWidth = _ref3$offsetWidth === void 0 ? doc.documentElement.clientWidth || doc.body.clientWidth : _ref3$offsetWidth; var offsetTop = autoCenter && clzz.has("".concat(prefixCls, "-auto-center")) ? scrollTop + contentNode.offsetTop : element.offsetTop; var headerWidth = currentTarget.offsetWidth, headerHeight = currentTarget.offsetHeight; this.moveEvent.setTarget(doc).addEventListener('mousemove', function (moveEvent) { var moveX = moveEvent.clientX, moveY = moveEvent.clientY; clzz.remove("".concat(prefixCls, "-center")).remove("".concat(prefixCls, "-auto-center")); var left = pxToRem(Math.min(Math.max(offsetLeft + moveX - clientX, scrollLeft - headerWidth + HANDLE_MIN_SIZE), scrollLeft + offsetWidth - HANDLE_MIN_SIZE)); var top = pxToRem(Math.min(Math.max(offsetTop + moveY - clientY, scrollTop - headerHeight + HANDLE_MIN_SIZE), scrollTop + offsetHeight - HANDLE_MIN_SIZE)); _this3.offset = [left, top]; _extends(element.style, { left: left, top: top }); }).addEventListener('mouseup', function () { _this3.moveEvent.clear(); }); } } }, { key: "handleOk", value: function () { var _handleOk = _asyncToGenerator( /*#__PURE__*/ _regeneratorRuntime.mark(function _callee() { var _this$props$onOk, onOk, promise, _ref4, _ref5, ret1, ret2; return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _this$props$onOk = this.props.onOk, onOk = _this$props$onOk === void 0 ? noop : _this$props$onOk; promise = Promise.all([onOk(), this.okCancelEvent.fireEvent('ok')]); _context.prev = 2; _context.next = 5; return promise; case 5: _ref4 = _context.sent; _ref5 = _slicedToArray(_ref4, 2); ret1 = _ref5[0]; ret2 = _ref5[1]; if (ret1 !== false && ret2) { this.close(); } _context.next = 16; break; case 12: _context.prev = 12; _context.t0 = _context["catch"](2); if (!(_context.t0 instanceof DataSetRequestError)) { message.error(exception(_context.t0)); } throw _context.t0; case 16: case "end": return _context.stop(); } } }, _callee, this, [[2, 12]]); })); function handleOk() { return _handleOk.apply(this, arguments); } return handleOk; }() }, { key: "handleCancel", value: function () { var _handleCancel = _asyncToGenerator( /*#__PURE__*/ _regeneratorRuntime.mark(function _callee2() { var _this$props$onCancel, onCancel, promise, _ref6, _ref7, ret1, ret2; return _regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _this$props$onCancel = this.props.onCancel, onCancel = _this$props$onCancel === void 0 ? noop : _this$props$onCancel; promise = Promise.all([onCancel(), this.okCancelEvent.fireEvent('cancel')]); _context2.prev = 2; _context2.next = 5; return promise; case 5: _ref6 = _context2.sent; _ref7 = _slicedToArray(_ref6, 2); ret1 = _ref7[0]; ret2 = _ref7[1]; if (ret1 !== false && ret2) { this.close(); } _context2.next = 16; break; case 12: _context2.prev = 12; _context2.t0 = _context2["catch"](2); if (!(_context2.t0 instanceof DataSetRequestError)) { message.error(exception(_context2.t0)); } throw _context2.t0; case 16: case "end": return _context2.stop(); } } }, _callee2, this, [[2, 12]]); })); function handleCancel() { return _handleCancel.apply(this, arguments); } return handleCancel; }() }, { key: "getHeader", value: function getHeader() { var _this$props6 = this.props, _this$props6$header = _this$props6.header, header = _this$props6$header === void 0 ? this.getDefaultHeader : _this$props6$header, title = _this$props6.title; if (typeof header === 'function') { var closeButton = this.getCloseButton(); return this.getWrappedHeader(header(title, closeButton, this.okBtn, this.cancelBtn)); } if (!isEmpty(header, true)) { return this.getWrappedHeader(header); } } }, { key: "getWrappedHeader", value: function getWrappedHeader(header) { var prefixCls = this.prefixCls, _this$props7 = this.props, title = _this$props7.title, closable = _this$props7.closable, movable = _this$props7.movable, fullScreen = _this$props7.fullScreen, drawer = _this$props7.drawer; if (title || closable || movable || header) { var _classNames2; var headerProps = { className: classNames("".concat(prefixCls, "-header"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-movable"), movable && !fullScreen && !drawer), _defineProperty(_classNames2, "".concat(prefixCls, "-title-none"), !title), _defineProperty(_classNames2, "".concat(prefixCls, "-drawer-header"), drawer), _classNames2)) }; if (movable && !fullScreen && !drawer) { headerProps.onMouseDown = this.handleHeaderMouseDown; } return React.createElement("div", _extends({}, headerProps), header); } } }, { key: "getCloseButton", value: function getCloseButton() { var prefixCls = this.prefixCls, closable = this.props.closable; if (closable) { return React.createElement("button", { type: "button", className: "".concat(prefixCls, "-header-button"), onClick: this.handleCancel }, React.createElement(Icon, { type: "close" })); } } }, { key: "getBody", value: function getBody() { var children = this.props.children; return this.renderChildren(typeof children === 'function' ? asyncComponent(children) : children); } }, { key: "getFooter", value: function getFooter() { var _this$props$footer = this.props.footer, footer = _this$props$footer === void 0 ? this.getDefaultFooter : _this$props$footer; if (typeof footer === 'function') { return this.getWrappedFooter(footer(this.okBtn, this.cancelBtn, this.childrenProps)); } if (!isEmpty(footer, true)) { return this.getWrappedFooter(footer); } } }, { key: "getWrappedFooter", value: function getWrappedFooter(footer) { var _classNames3; var prefixCls = this.prefixCls; var drawer = this.props.drawer; var className = classNames("".concat(prefixCls, "-footer"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-footer-drawer"), drawer), _defineProperty(_classNames3, "".concat(prefixCls, "-drawer-footer"), drawer), _classNames3)); return React.createElement("div", { className: className }, footer); } }, { key: "renderChildren", value: function renderChildren(children) { if (children) { var prefixCls = this.prefixCls, props = this.props; var bodyStyle = props.bodyStyle, drawer = props.drawer; return React.createElement("div", { className: classNames("".concat(prefixCls, "-body"), _defineProperty({}, "".concat(prefixCls, "-drawer-body"), drawer)), style: bodyStyle }, isValidElement(children) ? cloneElement(children, { modal: this.childrenProps }) : children); } } }, { key: "close", value: function close() { var _this$props$close = this.props.close, close = _this$props$close === void 0 ? noop : _this$props$close; close(); } }, { key: "okBtn", get: function get() { var _this$props8 = this.props, okProps = _this$props8.okProps, _this$props8$okText = _this$props8.okText, okText = _this$props8$okText === void 0 ? $l('Modal', 'ok') : _this$props8$okText, drawer = _this$props8.drawer; var modalButtonProps = this.getContextConfig('modalButtonProps'); var funcType = drawer ? FuncType.raised : this.getContextConfig('buttonFuncType'); return React.createElement(Button, _extends({ key: "ok", funcType: funcType, color: ButtonColor.primary, onClick: this.handleOk }, modalButtonProps, okProps), okText); } }, { key: "cancelBtn", get: function get() { var _this$props9 = this.props, cancelProps = _this$props9.cancelProps, _this$props9$cancelTe = _this$props9.cancelText, cancelText = _this$props9$cancelTe === void 0 ? $l('Modal', 'cancel') : _this$props9$cancelTe, drawer = _this$props9.drawer; var modalButtonProps = this.getContextConfig('modalButtonProps'); var funcType = drawer ? FuncType.raised : this.getContextConfig('buttonFuncType'); return React.createElement(Button, _extends({ key: "cancel", ref: this.saveCancelRef, funcType: funcType, onClick: this.handleCancel }, modalButtonProps, cancelProps), cancelText); } }]); return Modal; }(ViewComponent); export { Modal as default }; Modal.displayName = 'Modal'; Modal.propTypes = _objectSpread({}, ViewComponent.propTypes, { closable: PropTypes.bool, movable: PropTypes.bool, fullScreen: PropTypes.bool, maskClosable: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), maskStyle: PropTypes.object, mask: PropTypes.bool, maskClassName: PropTypes.string, keyboardClosable: PropTypes.bool, footer: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.bool]), destroyOnClose: PropTypes.bool, okText: PropTypes.node, cancelText: PropTypes.node, okProps: PropTypes.object, autoCenter: PropTypes.bool, cancelProps: PropTypes.object, onClose: PropTypes.func, onOk: PropTypes.func, onCancel: PropTypes.func, afterClose: PropTypes.func, okButton: PropTypes.bool, cancelButton: PropTypes.bool, okCancel: PropTypes.bool, drawer: PropTypes.bool, drawerOffset: PropTypes.number, drawerTransitionName: PropTypes.oneOf(['slide-up', 'slide-right', 'slide-down', 'slide-up', 'slide-left']), okFirst: PropTypes.bool, mousePosition: PropTypes.shape({ x: PropTypes.number, y: PropTypes.number }), contentStyle: PropTypes.object, bodyStyle: PropTypes.object, closeOnLocationChange: PropTypes.bool }); Modal.defaultProps = { suffixCls: suffixCls, closable: false, movable: true, mask: true, okButton: true, okCancel: true, destroyOnClose: true, fullScreen: false, drawer: false, drawerOffset: 150, autoFocus: true, closeOnLocationChange: true }; __decorate([autobind], Modal.prototype, "saveCancelRef", null); __decorate([autobind], Modal.prototype, "handleKeyDown", null); __decorate([autobind], Modal.prototype, "contentReference", null); __decorate([autobind], Modal.prototype, "handleMouseDown", null); __decorate([autobind], Modal.prototype, "handleHeaderMouseDown", null); __decorate([autobind], Modal.prototype, "handleOk", null); __decorate([autobind], Modal.prototype, "handleCancel", null); __decorate([autobind], Modal.prototype, "close", null); //# sourceMappingURL=Modal.js.map