@opensumi/ide-components 3.6.5-next-1735781723.0 → 3.6.5-next-1735823097.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +778 -250
- package/lib/menu/index.d.ts +2 -2
- package/lib/menu/index.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -4235,7 +4235,7 @@ eval("var now = __webpack_require__(/*! performance-now */ \"../../node_modules/
|
|
|
4235
4235
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4236
4236
|
|
|
4237
4237
|
"use strict";
|
|
4238
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var dom_align__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dom-align */ \"../../node_modules/dom-align/dist-web/index.js\");\n/* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ \"../../node_modules/rc-util/es/Dom/addEventListener.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util */ \"../../node_modules/rc-align/es/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getElement(func) {\n if (typeof func !== 'function' || !func) return null;\n return func();\n}\n\nfunction getPoint(point) {\n if (typeof point !== 'object' || !point) return null;\n return point;\n}\n\nvar Align = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Align, _Component);\n\n function Align() {\n var _ref;\n\n var _temp, _this, _ret;\n\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, Align);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (_ref = Align.__proto__ || Object.getPrototypeOf(Align)).call.apply(_ref, [this].concat(args))), _this), _this.forceAlign = function () {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n target = _this$props.target,\n align = _this$props.align,\n onAlign = _this$props.onAlign;\n\n if (!disabled && target) {\n var source = react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(_this);\n\n var result = void 0;\n var element = getElement(target);\n var point = getPoint(target);\n\n // IE lose focus after element realign\n // We should record activeElement and restore later\n var activeElement = document.activeElement;\n\n if (element) {\n result = (0,dom_align__WEBPACK_IMPORTED_MODULE_8__.alignElement)(source, element, align);\n } else if (point) {\n result = (0,dom_align__WEBPACK_IMPORTED_MODULE_8__.alignPoint)(source, point, align);\n }\n\n (0,_util__WEBPACK_IMPORTED_MODULE_7__.restoreFocus)(activeElement, source);\n\n if (onAlign) {\n onAlign(source, result);\n }\n }\n }, _temp), (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_this, _ret);\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Align, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var props = this.props;\n // if parent ref not attached .... use document.getElementById\n this.forceAlign();\n if (!props.disabled && props.monitorWindowResize) {\n this.startMonitorWindowResize();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var reAlign = false;\n var props = this.props;\n\n if (!props.disabled) {\n var source = react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(this);\n var sourceRect = source ? source.getBoundingClientRect() : null;\n\n if (prevProps.disabled) {\n reAlign = true;\n } else {\n var lastElement = getElement(prevProps.target);\n var currentElement = getElement(props.target);\n var lastPoint = getPoint(prevProps.target);\n var currentPoint = getPoint(props.target);\n\n if ((0,_util__WEBPACK_IMPORTED_MODULE_7__.isWindow)(lastElement) && (0,_util__WEBPACK_IMPORTED_MODULE_7__.isWindow)(currentElement)) {\n // Skip if is window\n reAlign = false;\n } else if (lastElement !== currentElement || // Element change\n lastElement && !currentElement && currentPoint || // Change from element to point\n lastPoint && currentPoint && currentElement || // Change from point to element\n currentPoint && !(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSamePoint)(lastPoint, currentPoint)) {\n reAlign = true;\n }\n\n // If source element size changed\n var preRect = this.sourceRect || {};\n if (!reAlign && source && (!(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSimilarValue)(preRect.width, sourceRect.width) || !(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSimilarValue)(preRect.height, sourceRect.height))) {\n reAlign = true;\n }\n }\n\n this.sourceRect = sourceRect;\n }\n\n if (reAlign) {\n this.forceAlign();\n }\n\n if (props.monitorWindowResize && !props.disabled) {\n this.startMonitorWindowResize();\n } else {\n this.stopMonitorWindowResize();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopMonitorWindowResize();\n }\n }, {\n key: 'startMonitorWindowResize',\n value: function startMonitorWindowResize() {\n if (!this.resizeHandler) {\n this.bufferMonitor = (0,_util__WEBPACK_IMPORTED_MODULE_7__.buffer)(this.forceAlign, this.props.monitorBufferTime);\n this.resizeHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(window, 'resize', this.bufferMonitor);\n }\n }\n }, {\n key: 'stopMonitorWindowResize',\n value: function stopMonitorWindowResize() {\n if (this.resizeHandler) {\n this.bufferMonitor.clear();\n this.resizeHandler.remove();\n this.resizeHandler = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n childrenProps = _props.childrenProps,\n children = _props.children;\n\n var child = react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(children);\n if (childrenProps) {\n var newProps = {};\n var propList = Object.keys(childrenProps);\n propList.forEach(function (prop) {\n newProps[prop] = _this2.props[childrenProps[prop]];\n });\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().cloneElement(child, newProps);\n }\n return child;\n }\n }]);\n\n return Align;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nAlign.propTypes = {\n childrenProps: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object).isRequired,\n target: prop_types__WEBPACK_IMPORTED_MODULE_9___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_9___default().func), prop_types__WEBPACK_IMPORTED_MODULE_9___default().shape({\n clientX: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n clientY: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n pageX: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n pageY: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number)\n })]),\n onAlign: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().func),\n monitorBufferTime: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n monitorWindowResize: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().bool),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().any)\n};\nAlign.defaultProps = {\n target: function target() {\n return window;\n },\n monitorBufferTime: 50,\n monitorWindowResize: false,\n disabled: false\n};\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Align);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/es/Align.js?");
|
|
4238
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var dom_align__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dom-align */ \"../../node_modules/dom-align/dist-web/index.js\");\n/* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ \"../../node_modules/rc-align/node_modules/rc-util/es/Dom/addEventListener.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util */ \"../../node_modules/rc-align/es/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getElement(func) {\n if (typeof func !== 'function' || !func) return null;\n return func();\n}\n\nfunction getPoint(point) {\n if (typeof point !== 'object' || !point) return null;\n return point;\n}\n\nvar Align = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Align, _Component);\n\n function Align() {\n var _ref;\n\n var _temp, _this, _ret;\n\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, Align);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (_ref = Align.__proto__ || Object.getPrototypeOf(Align)).call.apply(_ref, [this].concat(args))), _this), _this.forceAlign = function () {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n target = _this$props.target,\n align = _this$props.align,\n onAlign = _this$props.onAlign;\n\n if (!disabled && target) {\n var source = react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(_this);\n\n var result = void 0;\n var element = getElement(target);\n var point = getPoint(target);\n\n // IE lose focus after element realign\n // We should record activeElement and restore later\n var activeElement = document.activeElement;\n\n if (element) {\n result = (0,dom_align__WEBPACK_IMPORTED_MODULE_8__.alignElement)(source, element, align);\n } else if (point) {\n result = (0,dom_align__WEBPACK_IMPORTED_MODULE_8__.alignPoint)(source, point, align);\n }\n\n (0,_util__WEBPACK_IMPORTED_MODULE_7__.restoreFocus)(activeElement, source);\n\n if (onAlign) {\n onAlign(source, result);\n }\n }\n }, _temp), (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_this, _ret);\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Align, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var props = this.props;\n // if parent ref not attached .... use document.getElementById\n this.forceAlign();\n if (!props.disabled && props.monitorWindowResize) {\n this.startMonitorWindowResize();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var reAlign = false;\n var props = this.props;\n\n if (!props.disabled) {\n var source = react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(this);\n var sourceRect = source ? source.getBoundingClientRect() : null;\n\n if (prevProps.disabled) {\n reAlign = true;\n } else {\n var lastElement = getElement(prevProps.target);\n var currentElement = getElement(props.target);\n var lastPoint = getPoint(prevProps.target);\n var currentPoint = getPoint(props.target);\n\n if ((0,_util__WEBPACK_IMPORTED_MODULE_7__.isWindow)(lastElement) && (0,_util__WEBPACK_IMPORTED_MODULE_7__.isWindow)(currentElement)) {\n // Skip if is window\n reAlign = false;\n } else if (lastElement !== currentElement || // Element change\n lastElement && !currentElement && currentPoint || // Change from element to point\n lastPoint && currentPoint && currentElement || // Change from point to element\n currentPoint && !(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSamePoint)(lastPoint, currentPoint)) {\n reAlign = true;\n }\n\n // If source element size changed\n var preRect = this.sourceRect || {};\n if (!reAlign && source && (!(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSimilarValue)(preRect.width, sourceRect.width) || !(0,_util__WEBPACK_IMPORTED_MODULE_7__.isSimilarValue)(preRect.height, sourceRect.height))) {\n reAlign = true;\n }\n }\n\n this.sourceRect = sourceRect;\n }\n\n if (reAlign) {\n this.forceAlign();\n }\n\n if (props.monitorWindowResize && !props.disabled) {\n this.startMonitorWindowResize();\n } else {\n this.stopMonitorWindowResize();\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopMonitorWindowResize();\n }\n }, {\n key: 'startMonitorWindowResize',\n value: function startMonitorWindowResize() {\n if (!this.resizeHandler) {\n this.bufferMonitor = (0,_util__WEBPACK_IMPORTED_MODULE_7__.buffer)(this.forceAlign, this.props.monitorBufferTime);\n this.resizeHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(window, 'resize', this.bufferMonitor);\n }\n }\n }, {\n key: 'stopMonitorWindowResize',\n value: function stopMonitorWindowResize() {\n if (this.resizeHandler) {\n this.bufferMonitor.clear();\n this.resizeHandler.remove();\n this.resizeHandler = null;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n childrenProps = _props.childrenProps,\n children = _props.children;\n\n var child = react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(children);\n if (childrenProps) {\n var newProps = {};\n var propList = Object.keys(childrenProps);\n propList.forEach(function (prop) {\n newProps[prop] = _this2.props[childrenProps[prop]];\n });\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().cloneElement(child, newProps);\n }\n return child;\n }\n }]);\n\n return Align;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nAlign.propTypes = {\n childrenProps: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().object).isRequired,\n target: prop_types__WEBPACK_IMPORTED_MODULE_9___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_9___default().func), prop_types__WEBPACK_IMPORTED_MODULE_9___default().shape({\n clientX: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n clientY: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n pageX: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n pageY: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number)\n })]),\n onAlign: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().func),\n monitorBufferTime: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number),\n monitorWindowResize: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().bool),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().any)\n};\nAlign.defaultProps = {\n target: function target() {\n return window;\n },\n monitorBufferTime: 50,\n monitorWindowResize: false,\n disabled: false\n};\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Align);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/es/Align.js?");
|
|
4239
4239
|
|
|
4240
4240
|
/***/ }),
|
|
4241
4241
|
|
|
@@ -4257,7 +4257,29 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4257
4257
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4258
4258
|
|
|
4259
4259
|
"use strict";
|
|
4260
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buffer: () => (/* binding */ buffer),\n/* harmony export */ isSamePoint: () => (/* binding */ isSamePoint),\n/* harmony export */ isSimilarValue: () => (/* binding */ isSimilarValue),\n/* harmony export */ isWindow: () => (/* binding */ isWindow),\n/* harmony export */ restoreFocus: () => (/* binding */ restoreFocus)\n/* harmony export */ });\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-util/es/Dom/contains.js\");\n\n\nfunction buffer(fn, ms) {\n var timer = void 0;\n\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n\n function bufferFn() {\n clear();\n timer = setTimeout(fn, ms);\n }\n\n bufferFn.clear = clear;\n\n return bufferFn;\n}\n\nfunction isSamePoint(prev, next) {\n if (prev === next) return true;\n if (!prev || !next) return false;\n\n if ('pageX' in next && 'pageY' in next) {\n return prev.pageX === next.pageX && prev.pageY === next.pageY;\n }\n\n if ('clientX' in next && 'clientY' in next) {\n return prev.clientX === next.clientX && prev.clientY === next.clientY;\n }\n\n return false;\n}\n\nfunction isWindow(obj) {\n return obj && typeof obj === 'object' && obj.window === obj;\n}\n\nfunction isSimilarValue(val1, val2) {\n var int1 = Math.floor(val1);\n var int2 = Math.floor(val2);\n return Math.abs(int1 - int2) <= 1;\n}\n\nfunction restoreFocus(activeElement, container) {\n // Focus back if is in the container\n if (activeElement !== document.activeElement && (0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(container, activeElement)) {\n activeElement.focus();\n }\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/es/util.js?");
|
|
4260
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buffer: () => (/* binding */ buffer),\n/* harmony export */ isSamePoint: () => (/* binding */ isSamePoint),\n/* harmony export */ isSimilarValue: () => (/* binding */ isSimilarValue),\n/* harmony export */ isWindow: () => (/* binding */ isWindow),\n/* harmony export */ restoreFocus: () => (/* binding */ restoreFocus)\n/* harmony export */ });\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-align/node_modules/rc-util/es/Dom/contains.js\");\n\n\nfunction buffer(fn, ms) {\n var timer = void 0;\n\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n\n function bufferFn() {\n clear();\n timer = setTimeout(fn, ms);\n }\n\n bufferFn.clear = clear;\n\n return bufferFn;\n}\n\nfunction isSamePoint(prev, next) {\n if (prev === next) return true;\n if (!prev || !next) return false;\n\n if ('pageX' in next && 'pageY' in next) {\n return prev.pageX === next.pageX && prev.pageY === next.pageY;\n }\n\n if ('clientX' in next && 'clientY' in next) {\n return prev.clientX === next.clientX && prev.clientY === next.clientY;\n }\n\n return false;\n}\n\nfunction isWindow(obj) {\n return obj && typeof obj === 'object' && obj.window === obj;\n}\n\nfunction isSimilarValue(val1, val2) {\n var int1 = Math.floor(val1);\n var int2 = Math.floor(val2);\n return Math.abs(int1 - int2) <= 1;\n}\n\nfunction restoreFocus(activeElement, container) {\n // Focus back if is in the container\n if (activeElement !== document.activeElement && (0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(container, activeElement)) {\n activeElement.focus();\n }\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/es/util.js?");
|
|
4261
|
+
|
|
4262
|
+
/***/ }),
|
|
4263
|
+
|
|
4264
|
+
/***/ "../../node_modules/rc-align/node_modules/rc-util/es/Dom/addEventListener.js":
|
|
4265
|
+
/*!***********************************************************************************!*\
|
|
4266
|
+
!*** ../../node_modules/rc-align/node_modules/rc-util/es/Dom/addEventListener.js ***!
|
|
4267
|
+
\***********************************************************************************/
|
|
4268
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4269
|
+
|
|
4270
|
+
"use strict";
|
|
4271
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ addEventListenerWrap)\n/* harmony export */ });\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! add-dom-event-listener */ \"../../node_modules/add-dom-event-listener/lib/index.js\");\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n\n\nfunction addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates ? function run(e) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates(cb, e);\n } : cb;\n return add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default()(target, eventType, callback, option);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/node_modules/rc-util/es/Dom/addEventListener.js?");
|
|
4272
|
+
|
|
4273
|
+
/***/ }),
|
|
4274
|
+
|
|
4275
|
+
/***/ "../../node_modules/rc-align/node_modules/rc-util/es/Dom/contains.js":
|
|
4276
|
+
/*!***************************************************************************!*\
|
|
4277
|
+
!*** ../../node_modules/rc-align/node_modules/rc-util/es/Dom/contains.js ***!
|
|
4278
|
+
\***************************************************************************/
|
|
4279
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4280
|
+
|
|
4281
|
+
"use strict";
|
|
4282
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ contains)\n/* harmony export */ });\nfunction contains(root, n) {\n var node = n;\n\n while (node) {\n if (node === root) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-align/node_modules/rc-util/es/Dom/contains.js?");
|
|
4261
4283
|
|
|
4262
4284
|
/***/ }),
|
|
4263
4285
|
|
|
@@ -4268,7 +4290,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4268
4290
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4269
4291
|
|
|
4270
4292
|
"use strict";
|
|
4271
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"../../node_modules/babel-runtime/helpers/defineProperty.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var rc_util_es_unsafeLifecyclesPolyfill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/unsafeLifecyclesPolyfill */ \"../../node_modules/rc-util/es/unsafeLifecyclesPolyfill.js\");\n/* harmony import */ var _ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ChildrenUtils */ \"../../node_modules/rc-animate/es/ChildrenUtils.js\");\n/* harmony import */ var _AnimateChild__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AnimateChild */ \"../../node_modules/rc-animate/es/AnimateChild.js\");\n/* harmony import */ var _util_animate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./util/animate */ \"../../node_modules/rc-animate/es/util/animate.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar defaultKey = 'rc_animate_' + Date.now();\n\nfunction getChildrenFromProps(props) {\n var children = props.children;\n if (react__WEBPACK_IMPORTED_MODULE_6___default().isValidElement(children)) {\n if (!children.key) {\n return react__WEBPACK_IMPORTED_MODULE_6___default().cloneElement(children, {\n key: defaultKey\n });\n }\n }\n return children;\n}\n\nfunction noop() {}\n\nvar Animate = function (_React$Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Animate, _React$Component);\n\n // eslint-disable-line\n\n function Animate(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, Animate);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.currentlyAnimatingKeys = {};\n _this.keysToEnter = [];\n _this.keysToLeave = [];\n\n _this.state = {\n children: (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props))\n };\n\n _this.childrenRefs = {};\n return _this;\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Animate, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var showProp = this.props.showProp;\n var children = this.state.children;\n if (showProp) {\n children = children.filter(function (child) {\n return !!child.props[showProp];\n });\n }\n children.forEach(function (child) {\n if (child) {\n _this2.performAppear(child.key);\n }\n });\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n this.nextProps = nextProps;\n var nextChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(nextProps));\n var props = this.props;\n // exclusive needs immediate response\n if (props.exclusive) {\n Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {\n _this3.stop(key);\n });\n }\n var showProp = props.showProp;\n var currentlyAnimatingKeys = this.currentlyAnimatingKeys;\n // last props children if exclusive\n var currentChildren = props.exclusive ? (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props)) : this.state.children;\n // in case destroy in showProp mode\n var newChildren = [];\n if (showProp) {\n currentChildren.forEach(function (currentChild) {\n var nextChild = currentChild && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(nextChildren, currentChild.key);\n var newChild = void 0;\n if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {\n newChild = react__WEBPACK_IMPORTED_MODULE_6___default().cloneElement(nextChild || currentChild, (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, showProp, true));\n } else {\n newChild = nextChild;\n }\n if (newChild) {\n newChildren.push(newChild);\n }\n });\n nextChildren.forEach(function (nextChild) {\n if (!nextChild || !(0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, nextChild.key)) {\n newChildren.push(nextChild);\n }\n });\n } else {\n newChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.mergeChildren)(currentChildren, nextChildren);\n }\n\n // need render to avoid update\n this.setState({\n children: newChildren\n });\n\n nextChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasPrev = child && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, key);\n if (showProp) {\n var showInNext = child.props[showProp];\n if (hasPrev) {\n var showInNow = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n if (!showInNow && showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (!hasPrev) {\n _this3.keysToEnter.push(key);\n }\n });\n\n currentChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasNext = child && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(nextChildren, key);\n if (showProp) {\n var showInNow = child.props[showProp];\n if (hasNext) {\n var showInNext = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(nextChildren, key, showProp);\n if (!showInNext && showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (!hasNext) {\n _this3.keysToLeave.push(key);\n }\n });\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n var keysToEnter = this.keysToEnter;\n this.keysToEnter = [];\n keysToEnter.forEach(this.performEnter);\n var keysToLeave = this.keysToLeave;\n this.keysToLeave = [];\n keysToLeave.forEach(this.performLeave);\n }\n }, {\n key: 'isValidChildByKey',\n value: function isValidChildByKey(currentChildren, key) {\n var showProp = this.props.showProp;\n if (showProp) {\n return (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n }\n return (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, key);\n }\n }, {\n key: 'stop',\n value: function stop(key) {\n delete this.currentlyAnimatingKeys[key];\n var component = this.childrenRefs[key];\n if (component) {\n component.stop();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n var props = this.props;\n this.nextProps = props;\n var stateChildren = this.state.children;\n var children = null;\n if (stateChildren) {\n children = stateChildren.map(function (child) {\n if (child === null || child === undefined) {\n return child;\n }\n if (!child.key) {\n throw new Error('must set key for <rc-animate> children');\n }\n return react__WEBPACK_IMPORTED_MODULE_6___default().createElement(\n _AnimateChild__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n {\n key: child.key,\n ref: function ref(node) {\n _this4.childrenRefs[child.key] = node;\n },\n animation: props.animation,\n transitionName: props.transitionName,\n transitionEnter: props.transitionEnter,\n transitionAppear: props.transitionAppear,\n transitionLeave: props.transitionLeave\n },\n child\n );\n });\n }\n var Component = props.component;\n if (Component) {\n var passedProps = props;\n if (typeof Component === 'string') {\n passedProps = (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: props.className,\n style: props.style\n }, props.componentProps);\n }\n return react__WEBPACK_IMPORTED_MODULE_6___default().createElement(\n Component,\n passedProps,\n children\n );\n }\n return children[0] || null;\n }\n }]);\n\n return Animate;\n}((react__WEBPACK_IMPORTED_MODULE_6___default().Component));\n\nAnimate.isAnimate = true;\nAnimate.propTypes = {\n className: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n component: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().any),\n componentProps: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n animation: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n transitionName: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object)]),\n transitionEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n transitionAppear: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n exclusive: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n transitionLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n onEnd: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onAppear: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n showProp: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node)\n};\nAnimate.defaultProps = {\n animation: {},\n component: 'span',\n componentProps: {},\n transitionEnter: true,\n transitionLeave: true,\n transitionAppear: false,\n onEnd: noop,\n onEnter: noop,\n onLeave: noop,\n onAppear: noop\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this5 = this;\n\n this.performEnter = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));\n }\n };\n\n this.performAppear = function (key) {\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));\n }\n };\n\n this.handleDoneAdding = function (key, type) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props));\n if (!_this5.isValidChildByKey(currentChildren, key)) {\n // exclusive will not need this\n _this5.performLeave(key);\n } else if (type === 'appear') {\n if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowAppearCallback(props)) {\n props.onAppear(key);\n props.onEnd(key, true);\n }\n } else if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowEnterCallback(props)) {\n props.onEnter(key);\n props.onEnd(key, true);\n }\n };\n\n this.performLeave = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));\n }\n };\n\n this.handleDoneLeaving = function (key) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props));\n // in case state change is too fast\n if (_this5.isValidChildByKey(currentChildren, key)) {\n _this5.performEnter(key);\n } else {\n var end = function end() {\n if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowLeaveCallback(props)) {\n props.onLeave(key);\n props.onEnd(key, false);\n }\n };\n if (!(0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.isSameChildren)(_this5.state.children, currentChildren, props.showProp)) {\n _this5.setState({\n children: currentChildren\n }, end);\n } else {\n end();\n }\n }\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,rc_util_es_unsafeLifecyclesPolyfill__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(Animate));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-animate/es/Animate.js?");
|
|
4293
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"../../node_modules/babel-runtime/helpers/defineProperty.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var rc_util_es_unsafeLifecyclesPolyfill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/unsafeLifecyclesPolyfill */ \"../../node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js\");\n/* harmony import */ var _ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ChildrenUtils */ \"../../node_modules/rc-animate/es/ChildrenUtils.js\");\n/* harmony import */ var _AnimateChild__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AnimateChild */ \"../../node_modules/rc-animate/es/AnimateChild.js\");\n/* harmony import */ var _util_animate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./util/animate */ \"../../node_modules/rc-animate/es/util/animate.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar defaultKey = 'rc_animate_' + Date.now();\n\nfunction getChildrenFromProps(props) {\n var children = props.children;\n if (react__WEBPACK_IMPORTED_MODULE_6___default().isValidElement(children)) {\n if (!children.key) {\n return react__WEBPACK_IMPORTED_MODULE_6___default().cloneElement(children, {\n key: defaultKey\n });\n }\n }\n return children;\n}\n\nfunction noop() {}\n\nvar Animate = function (_React$Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Animate, _React$Component);\n\n // eslint-disable-line\n\n function Animate(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, Animate);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.currentlyAnimatingKeys = {};\n _this.keysToEnter = [];\n _this.keysToLeave = [];\n\n _this.state = {\n children: (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props))\n };\n\n _this.childrenRefs = {};\n return _this;\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Animate, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var showProp = this.props.showProp;\n var children = this.state.children;\n if (showProp) {\n children = children.filter(function (child) {\n return !!child.props[showProp];\n });\n }\n children.forEach(function (child) {\n if (child) {\n _this2.performAppear(child.key);\n }\n });\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n this.nextProps = nextProps;\n var nextChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(nextProps));\n var props = this.props;\n // exclusive needs immediate response\n if (props.exclusive) {\n Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {\n _this3.stop(key);\n });\n }\n var showProp = props.showProp;\n var currentlyAnimatingKeys = this.currentlyAnimatingKeys;\n // last props children if exclusive\n var currentChildren = props.exclusive ? (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props)) : this.state.children;\n // in case destroy in showProp mode\n var newChildren = [];\n if (showProp) {\n currentChildren.forEach(function (currentChild) {\n var nextChild = currentChild && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(nextChildren, currentChild.key);\n var newChild = void 0;\n if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {\n newChild = react__WEBPACK_IMPORTED_MODULE_6___default().cloneElement(nextChild || currentChild, (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, showProp, true));\n } else {\n newChild = nextChild;\n }\n if (newChild) {\n newChildren.push(newChild);\n }\n });\n nextChildren.forEach(function (nextChild) {\n if (!nextChild || !(0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, nextChild.key)) {\n newChildren.push(nextChild);\n }\n });\n } else {\n newChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.mergeChildren)(currentChildren, nextChildren);\n }\n\n // need render to avoid update\n this.setState({\n children: newChildren\n });\n\n nextChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasPrev = child && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, key);\n if (showProp) {\n var showInNext = child.props[showProp];\n if (hasPrev) {\n var showInNow = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n if (!showInNow && showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (!hasPrev) {\n _this3.keysToEnter.push(key);\n }\n });\n\n currentChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasNext = child && (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(nextChildren, key);\n if (showProp) {\n var showInNow = child.props[showProp];\n if (hasNext) {\n var showInNext = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(nextChildren, key, showProp);\n if (!showInNext && showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (!hasNext) {\n _this3.keysToLeave.push(key);\n }\n });\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n var keysToEnter = this.keysToEnter;\n this.keysToEnter = [];\n keysToEnter.forEach(this.performEnter);\n var keysToLeave = this.keysToLeave;\n this.keysToLeave = [];\n keysToLeave.forEach(this.performLeave);\n }\n }, {\n key: 'isValidChildByKey',\n value: function isValidChildByKey(currentChildren, key) {\n var showProp = this.props.showProp;\n if (showProp) {\n return (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findShownChildInChildrenByKey)(currentChildren, key, showProp);\n }\n return (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.findChildInChildrenByKey)(currentChildren, key);\n }\n }, {\n key: 'stop',\n value: function stop(key) {\n delete this.currentlyAnimatingKeys[key];\n var component = this.childrenRefs[key];\n if (component) {\n component.stop();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n var props = this.props;\n this.nextProps = props;\n var stateChildren = this.state.children;\n var children = null;\n if (stateChildren) {\n children = stateChildren.map(function (child) {\n if (child === null || child === undefined) {\n return child;\n }\n if (!child.key) {\n throw new Error('must set key for <rc-animate> children');\n }\n return react__WEBPACK_IMPORTED_MODULE_6___default().createElement(\n _AnimateChild__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n {\n key: child.key,\n ref: function ref(node) {\n _this4.childrenRefs[child.key] = node;\n },\n animation: props.animation,\n transitionName: props.transitionName,\n transitionEnter: props.transitionEnter,\n transitionAppear: props.transitionAppear,\n transitionLeave: props.transitionLeave\n },\n child\n );\n });\n }\n var Component = props.component;\n if (Component) {\n var passedProps = props;\n if (typeof Component === 'string') {\n passedProps = (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: props.className,\n style: props.style\n }, props.componentProps);\n }\n return react__WEBPACK_IMPORTED_MODULE_6___default().createElement(\n Component,\n passedProps,\n children\n );\n }\n return children[0] || null;\n }\n }]);\n\n return Animate;\n}((react__WEBPACK_IMPORTED_MODULE_6___default().Component));\n\nAnimate.isAnimate = true;\nAnimate.propTypes = {\n className: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n component: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().any),\n componentProps: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n animation: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n transitionName: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object)]),\n transitionEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n transitionAppear: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n exclusive: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n transitionLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n onEnd: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onAppear: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n showProp: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node)\n};\nAnimate.defaultProps = {\n animation: {},\n component: 'span',\n componentProps: {},\n transitionEnter: true,\n transitionLeave: true,\n transitionAppear: false,\n onEnd: noop,\n onEnter: noop,\n onLeave: noop,\n onAppear: noop\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this5 = this;\n\n this.performEnter = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));\n }\n };\n\n this.performAppear = function (key) {\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));\n }\n };\n\n this.handleDoneAdding = function (key, type) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props));\n if (!_this5.isValidChildByKey(currentChildren, key)) {\n // exclusive will not need this\n _this5.performLeave(key);\n } else if (type === 'appear') {\n if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowAppearCallback(props)) {\n props.onAppear(key);\n props.onEnd(key, true);\n }\n } else if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowEnterCallback(props)) {\n props.onEnter(key);\n props.onEnd(key, true);\n }\n };\n\n this.performLeave = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));\n }\n };\n\n this.handleDoneLeaving = function (key) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = (0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.toArrayChildren)(getChildrenFromProps(props));\n // in case state change is too fast\n if (_this5.isValidChildByKey(currentChildren, key)) {\n _this5.performEnter(key);\n } else {\n var end = function end() {\n if (_util_animate__WEBPACK_IMPORTED_MODULE_10__[\"default\"].allowLeaveCallback(props)) {\n props.onLeave(key);\n props.onEnd(key, false);\n }\n };\n if (!(0,_ChildrenUtils__WEBPACK_IMPORTED_MODULE_8__.isSameChildren)(_this5.state.children, currentChildren, props.showProp)) {\n _this5.setState({\n children: currentChildren\n }, end);\n } else {\n end();\n }\n }\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,rc_util_es_unsafeLifecyclesPolyfill__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(Animate));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-animate/es/Animate.js?");
|
|
4272
4294
|
|
|
4273
4295
|
/***/ }),
|
|
4274
4296
|
|
|
@@ -4305,14 +4327,69 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4305
4327
|
|
|
4306
4328
|
/***/ }),
|
|
4307
4329
|
|
|
4308
|
-
/***/ "../../node_modules/rc-
|
|
4309
|
-
|
|
4310
|
-
!*** ../../node_modules/rc-
|
|
4311
|
-
|
|
4330
|
+
/***/ "../../node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js":
|
|
4331
|
+
/*!*****************************************************************************************!*\
|
|
4332
|
+
!*** ../../node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js ***!
|
|
4333
|
+
\*****************************************************************************************/
|
|
4334
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4335
|
+
|
|
4336
|
+
"use strict";
|
|
4337
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n } // only handle componentWillReceiveProps\n\n\n if (typeof prototype.componentWillReceiveProps !== 'function') {\n return Component;\n } // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps\n // https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler\n\n\n if (!(react__WEBPACK_IMPORTED_MODULE_0___default().Profiler)) {\n return Component;\n } // Here polyfill get started\n\n\n prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;\n delete prototype.componentWillReceiveProps;\n return Component;\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unsafeLifecyclesPolyfill);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js?");
|
|
4338
|
+
|
|
4339
|
+
/***/ }),
|
|
4340
|
+
|
|
4341
|
+
/***/ "../../node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js":
|
|
4342
|
+
/*!**********************************************************************!*\
|
|
4343
|
+
!*** ../../node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js ***!
|
|
4344
|
+
\**********************************************************************/
|
|
4345
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4346
|
+
|
|
4347
|
+
"use strict";
|
|
4348
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.memo(function (_ref) {\n var children = _ref.children;\n return children;\n}, function (_, _ref2) {\n var shouldUpdate = _ref2.shouldUpdate;\n return !shouldUpdate;\n}));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js?");
|
|
4349
|
+
|
|
4350
|
+
/***/ }),
|
|
4351
|
+
|
|
4352
|
+
/***/ "../../node_modules/rc-dialog/es/Dialog/Content/Panel.js":
|
|
4353
|
+
/*!***************************************************************!*\
|
|
4354
|
+
!*** ../../node_modules/rc-dialog/es/Dialog/Content/Panel.js ***!
|
|
4355
|
+
\***************************************************************/
|
|
4356
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4357
|
+
|
|
4358
|
+
"use strict";
|
|
4359
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/ref */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/ref.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../context */ \"../../node_modules/rc-dialog/es/context.js\");\n/* harmony import */ var _MemoChildren__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MemoChildren */ \"../../node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js\");\n/* harmony import */ var rc_util_es_pickAttrs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/pickAttrs */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/pickAttrs.js\");\n\n\n\n\n\n\n\n\n\nvar sentinelStyle = {\n width: 0,\n height: 0,\n overflow: 'hidden',\n outline: 'none'\n};\nvar entityStyle = {\n outline: 'none'\n};\nvar Panel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n title = props.title,\n ariaId = props.ariaId,\n footer = props.footer,\n closable = props.closable,\n closeIcon = props.closeIcon,\n onClose = props.onClose,\n children = props.children,\n bodyStyle = props.bodyStyle,\n bodyProps = props.bodyProps,\n modalRender = props.modalRender,\n onMouseDown = props.onMouseDown,\n onMouseUp = props.onMouseUp,\n holderRef = props.holderRef,\n visible = props.visible,\n forceRender = props.forceRender,\n width = props.width,\n height = props.height,\n modalClassNames = props.classNames,\n modalStyles = props.styles;\n\n // ================================= Refs =================================\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5___default().useContext(_context__WEBPACK_IMPORTED_MODULE_6__.RefContext),\n panelRef = _React$useContext.panel;\n var mergedRef = (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_4__.useComposeRef)(holderRef, panelRef);\n var sentinelStartRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)();\n var sentinelEndRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)();\n react__WEBPACK_IMPORTED_MODULE_5___default().useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n var _sentinelStartRef$cur;\n (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 || _sentinelStartRef$cur.focus({\n preventScroll: true\n });\n },\n changeActive: function changeActive(next) {\n var _document = document,\n activeElement = _document.activeElement;\n if (next && activeElement === sentinelEndRef.current) {\n sentinelStartRef.current.focus({\n preventScroll: true\n });\n } else if (!next && activeElement === sentinelStartRef.current) {\n sentinelEndRef.current.focus({\n preventScroll: true\n });\n }\n }\n };\n });\n\n // ================================ Style =================================\n var contentStyle = {};\n if (width !== undefined) {\n contentStyle.width = width;\n }\n if (height !== undefined) {\n contentStyle.height = height;\n }\n // ================================ Render ================================\n var footerNode = footer ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-footer\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.footer),\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.footer)\n }, footer) : null;\n var headerNode = title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-header\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.header),\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\"),\n id: ariaId\n }, title)) : null;\n var closableObj = (0,react__WEBPACK_IMPORTED_MODULE_5__.useMemo)(function () {\n if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(closable) === 'object' && closable !== null) {\n return closable;\n }\n if (closable) {\n return {\n closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-x\")\n })\n };\n }\n return {};\n }, [closable, closeIcon, prefixCls]);\n var ariaProps = (0,rc_util_es_pickAttrs__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(closableObj, true);\n var closeBtnIsDisabled = (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(closable) === 'object' && closable.disabled;\n var closerNode = closable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"button\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\"\n }, ariaProps, {\n className: \"\".concat(prefixCls, \"-close\"),\n disabled: closeBtnIsDisabled\n }), closableObj.closeIcon) : null;\n var content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-content\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.content),\n style: modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content\n }, closerNode, headerNode, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-body\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.body),\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, bodyStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body)\n }, bodyProps), children), footerNode);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n key: \"dialog-element\",\n role: \"dialog\",\n \"aria-labelledby\": title ? ariaId : null,\n \"aria-modal\": \"true\",\n ref: mergedRef,\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, style), contentStyle),\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, className),\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n ref: sentinelStartRef,\n tabIndex: 0,\n style: entityStyle\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_MemoChildren__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n shouldUpdate: visible || forceRender\n }, modalRender ? modalRender(content) : content)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEndRef,\n style: sentinelStyle\n }));\n});\nif (true) {\n Panel.displayName = 'Panel';\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Panel);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog/Content/Panel.js?");
|
|
4360
|
+
|
|
4361
|
+
/***/ }),
|
|
4362
|
+
|
|
4363
|
+
/***/ "../../node_modules/rc-dialog/es/Dialog/Content/index.js":
|
|
4364
|
+
/*!***************************************************************!*\
|
|
4365
|
+
!*** ../../node_modules/rc-dialog/es/Dialog/Content/index.js ***!
|
|
4366
|
+
\***************************************************************/
|
|
4367
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4368
|
+
|
|
4369
|
+
"use strict";
|
|
4370
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-motion */ \"../../node_modules/rc-motion/es/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util */ \"../../node_modules/rc-dialog/es/util.js\");\n/* harmony import */ var _Panel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Panel */ \"../../node_modules/rc-dialog/es/Dialog/Content/Panel.js\");\n\n\n\n\n\n\n\n\n\nvar Content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n title = props.title,\n style = props.style,\n className = props.className,\n visible = props.visible,\n forceRender = props.forceRender,\n destroyOnClose = props.destroyOnClose,\n motionName = props.motionName,\n ariaId = props.ariaId,\n onVisibleChanged = props.onVisibleChanged,\n mousePosition = props.mousePosition;\n var dialogRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();\n\n // ============================= Style ==============================\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__.useState(),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n transformOrigin = _React$useState2[0],\n setTransformOrigin = _React$useState2[1];\n var contentStyle = {};\n if (transformOrigin) {\n contentStyle.transformOrigin = transformOrigin;\n }\n function onPrepare() {\n var elementOffset = (0,_util__WEBPACK_IMPORTED_MODULE_6__.offset)(dialogRef.current);\n setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? \"\".concat(mousePosition.x - elementOffset.left, \"px \").concat(mousePosition.y - elementOffset.top, \"px\") : '');\n }\n\n // ============================= Render =============================\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(rc_motion__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n visible: visible,\n onVisibleChanged: onVisibleChanged,\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n forceRender: forceRender,\n motionName: motionName,\n removeOnLeave: destroyOnClose,\n ref: dialogRef\n }, function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_Panel__WEBPACK_IMPORTED_MODULE_7__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: ref,\n title: title,\n ariaId: ariaId,\n prefixCls: prefixCls,\n holderRef: motionRef,\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, motionStyle), style), contentStyle),\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(className, motionClassName)\n }));\n });\n});\nContent.displayName = 'Content';\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Content);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog/Content/index.js?");
|
|
4371
|
+
|
|
4372
|
+
/***/ }),
|
|
4373
|
+
|
|
4374
|
+
/***/ "../../node_modules/rc-dialog/es/Dialog/Mask.js":
|
|
4375
|
+
/*!******************************************************!*\
|
|
4376
|
+
!*** ../../node_modules/rc-dialog/es/Dialog/Mask.js ***!
|
|
4377
|
+
\******************************************************/
|
|
4378
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4379
|
+
|
|
4380
|
+
"use strict";
|
|
4381
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-motion */ \"../../node_modules/rc-motion/es/index.js\");\n\n\n\n\n\nvar Mask = function Mask(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n visible = props.visible,\n maskProps = props.maskProps,\n motionName = props.motionName,\n className = props.className;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_motion__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n key: \"mask\",\n visible: visible,\n motionName: motionName,\n leavedClassName: \"\".concat(prefixCls, \"-mask-hidden\")\n }, function (_ref, ref) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, motionStyle), style),\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-mask\"), motionClassName, className)\n }, maskProps));\n });\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Mask);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog/Mask.js?");
|
|
4382
|
+
|
|
4383
|
+
/***/ }),
|
|
4384
|
+
|
|
4385
|
+
/***/ "../../node_modules/rc-dialog/es/Dialog/index.js":
|
|
4386
|
+
/*!*******************************************************!*\
|
|
4387
|
+
!*** ../../node_modules/rc-dialog/es/Dialog/index.js ***!
|
|
4388
|
+
\*******************************************************/
|
|
4312
4389
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4313
4390
|
|
|
4314
4391
|
"use strict";
|
|
4315
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/KeyCode */ \"../../node_modules/rc-util/es/KeyCode.js\");\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-util/es/Dom/contains.js\");\n/* harmony import */ var rc_animate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-animate */ \"../../node_modules/rc-animate/es/Animate.js\");\n/* harmony import */ var _LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LazyRenderBox */ \"../../node_modules/rc-dialog/es/LazyRenderBox.js\");\n\n\n\n\n\n\n\n\n\n\nvar uuid = 0;\n/* eslint react/no-is-mounted:0 */\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n ret = d.body[method];\n }\n }\n return ret;\n}\nfunction setTransformOrigin(node, value) {\n var style = node.style;\n ['Webkit', 'Moz', 'Ms', 'ms'].forEach(function (prefix) {\n style[prefix + 'TransformOrigin'] = value;\n });\n style['transformOrigin'] = value;\n}\nfunction offset(el) {\n var rect = el.getBoundingClientRect();\n var pos = {\n left: rect.left,\n top: rect.top\n };\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScroll(w);\n pos.top += getScroll(w, true);\n return pos;\n}\n\nvar Dialog = function (_React$Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Dialog, _React$Component);\n\n function Dialog(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Dialog);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _React$Component.call(this, props));\n\n _this.inTransition = false;\n _this.onAnimateLeave = function () {\n var afterClose = _this.props.afterClose;\n // need demo?\n // https://github.com/react-component/dialog/pull/28\n\n if (_this.wrap) {\n _this.wrap.style.display = 'none';\n }\n _this.inTransition = false;\n _this.switchScrollingEffect();\n if (afterClose) {\n afterClose();\n }\n };\n _this.onDialogMouseDown = function () {\n _this.dialogMouseDown = true;\n };\n _this.onMaskMouseUp = function () {\n if (_this.dialogMouseDown) {\n _this.timeoutId = setTimeout(function () {\n _this.dialogMouseDown = false;\n }, 0);\n }\n };\n _this.onMaskClick = function (e) {\n // android trigger click on open (fastclick??)\n if (Date.now() - _this.openTime < 300) {\n return;\n }\n if (e.target === e.currentTarget && !_this.dialogMouseDown) {\n _this.close(e);\n }\n };\n _this.onKeyDown = function (e) {\n var props = _this.props;\n if (props.keyboard && e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[\"default\"].ESC) {\n e.stopPropagation();\n _this.close(e);\n return;\n }\n // keep focus inside dialog\n if (props.visible) {\n if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[\"default\"].TAB) {\n var activeElement = document.activeElement;\n var sentinelStart = _this.sentinelStart;\n if (e.shiftKey) {\n if (activeElement === sentinelStart) {\n _this.sentinelEnd.focus();\n }\n } else if (activeElement === _this.sentinelEnd) {\n sentinelStart.focus();\n }\n }\n }\n };\n _this.getDialogElement = function () {\n var props = _this.props;\n var closable = props.closable;\n var prefixCls = props.prefixCls;\n var dest = {};\n if (props.width !== undefined) {\n dest.width = props.width;\n }\n if (props.height !== undefined) {\n dest.height = props.height;\n }\n var footer = void 0;\n if (props.footer) {\n footer = react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { className: prefixCls + '-footer', ref: _this.saveRef('footer') }, props.footer);\n }\n var header = void 0;\n if (props.title) {\n header = react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { className: prefixCls + '-header', ref: _this.saveRef('header') }, react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { className: prefixCls + '-title', id: _this.titleId }, props.title));\n }\n var closer = void 0;\n if (closable) {\n closer = react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"button\", { type: \"button\", onClick: _this.close, \"aria-label\": \"Close\", className: prefixCls + '-close' }, props.closeIcon || react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"span\", { className: prefixCls + '-close-x' }));\n }\n var style = (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props.style, dest);\n var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' };\n var transitionName = _this.getTransitionName();\n var dialogElement = react__WEBPACK_IMPORTED_MODULE_4__.createElement(_LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { key: \"dialog-element\", role: \"document\", ref: _this.saveRef('dialog'), style: style, className: prefixCls + ' ' + (props.className || ''), visible: props.visible, forceRender: props.forceRender, onMouseDown: _this.onDialogMouseDown }, react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { tabIndex: 0, ref: _this.saveRef('sentinelStart'), style: sentinelStyle, \"aria-hidden\": \"true\" }), react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { className: prefixCls + '-content' }, closer, header, react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({ className: prefixCls + '-body', style: props.bodyStyle, ref: _this.saveRef('body') }, props.bodyProps), props.children), footer), react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { tabIndex: 0, ref: _this.saveRef('sentinelEnd'), style: sentinelStyle, \"aria-hidden\": \"true\" }));\n return react__WEBPACK_IMPORTED_MODULE_4__.createElement(rc_animate__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { key: \"dialog\", showProp: \"visible\", onLeave: _this.onAnimateLeave, transitionName: transitionName, component: \"\", transitionAppear: true }, props.visible || !props.destroyOnClose ? dialogElement : null);\n };\n _this.getZIndexStyle = function () {\n var style = {};\n var props = _this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n };\n _this.getWrapStyle = function () {\n return (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _this.getZIndexStyle(), _this.props.wrapStyle);\n };\n _this.getMaskStyle = function () {\n return (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _this.getZIndexStyle(), _this.props.maskStyle);\n };\n _this.getMaskElement = function () {\n var props = _this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = _this.getMaskTransitionName();\n maskElement = react__WEBPACK_IMPORTED_MODULE_4__.createElement(_LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__[\"default\"], (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({ style: _this.getMaskStyle(), key: \"mask\", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps));\n if (maskTransition) {\n maskElement = react__WEBPACK_IMPORTED_MODULE_4__.createElement(rc_animate__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { key: \"mask\", showProp: \"visible\", transitionAppear: true, component: \"\", transitionName: maskTransition }, maskElement);\n }\n }\n return maskElement;\n };\n _this.getMaskTransitionName = function () {\n var props = _this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n _this.getTransitionName = function () {\n var props = _this.props;\n var transitionName = props.transitionName;\n var animation = props.animation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n _this.close = function (e) {\n var onClose = _this.props.onClose;\n\n if (onClose) {\n onClose(e);\n }\n };\n _this.saveRef = function (name) {\n return function (node) {\n _this[name] = node;\n };\n };\n _this.titleId = 'rcDialogTitle' + uuid++;\n _this.switchScrollingEffect = props.switchScrollingEffect || function () {};\n return _this;\n }\n\n Dialog.prototype.componentDidMount = function componentDidMount() {\n this.componentDidUpdate({});\n // if forceRender is true, set element style display to be none;\n if ((this.props.forceRender || this.props.getContainer === false && !this.props.visible) && this.wrap) {\n this.wrap.style.display = 'none';\n }\n };\n\n Dialog.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _props = this.props,\n visible = _props.visible,\n mask = _props.mask,\n focusTriggerAfterClose = _props.focusTriggerAfterClose;\n\n var mousePosition = this.props.mousePosition;\n if (visible) {\n // first show\n if (!prevProps.visible) {\n this.openTime = Date.now();\n this.switchScrollingEffect();\n this.tryFocus();\n var dialogNode = react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(this.dialog);\n if (mousePosition) {\n var elOffset = offset(dialogNode);\n setTransformOrigin(dialogNode, mousePosition.x - elOffset.left + 'px ' + (mousePosition.y - elOffset.top) + 'px');\n } else {\n setTransformOrigin(dialogNode, '');\n }\n }\n } else if (prevProps.visible) {\n this.inTransition = true;\n if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {\n try {\n this.lastOutSideFocusNode.focus();\n } catch (e) {\n this.lastOutSideFocusNode = null;\n }\n this.lastOutSideFocusNode = null;\n }\n }\n };\n\n Dialog.prototype.componentWillUnmount = function componentWillUnmount() {\n var _props2 = this.props,\n visible = _props2.visible,\n getOpenCount = _props2.getOpenCount;\n\n if ((visible || this.inTransition) && !getOpenCount()) {\n this.switchScrollingEffect();\n }\n clearTimeout(this.timeoutId);\n };\n\n Dialog.prototype.tryFocus = function tryFocus() {\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this.wrap, document.activeElement)) {\n this.lastOutSideFocusNode = document.activeElement;\n this.sentinelStart.focus();\n }\n };\n\n Dialog.prototype.render = function render() {\n var props = this.props;\n var prefixCls = props.prefixCls,\n maskClosable = props.maskClosable;\n\n var style = this.getWrapStyle();\n // clear hide display\n // and only set display after async anim, not here for hide\n if (props.visible) {\n style.display = null;\n }\n return react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", { className: prefixCls + '-root' }, this.getMaskElement(), react__WEBPACK_IMPORTED_MODULE_4__.createElement(\"div\", (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({ tabIndex: -1, onKeyDown: this.onKeyDown, className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: this.saveRef('wrap'), onClick: maskClosable ? this.onMaskClick : null, onMouseUp: maskClosable ? this.onMaskMouseUp : null, role: \"dialog\", \"aria-labelledby\": props.title ? this.titleId : null, style: style }, props.wrapProps), this.getDialogElement()));\n };\n\n return Dialog;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Dialog);\n\nDialog.defaultProps = {\n className: '',\n mask: true,\n visible: false,\n keyboard: true,\n closable: true,\n maskClosable: true,\n destroyOnClose: false,\n prefixCls: 'rc-dialog',\n focusTriggerAfterClose: true\n};\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog.js?");
|
|
4392
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/Dom/contains.js\");\n/* harmony import */ var rc_util_es_hooks_useId__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useId */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useId.js\");\n/* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/KeyCode */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/KeyCode.js\");\n/* harmony import */ var rc_util_es_pickAttrs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/pickAttrs */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/pickAttrs.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util */ \"../../node_modules/rc-dialog/es/util.js\");\n/* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Content */ \"../../node_modules/rc-dialog/es/Dialog/Content/index.js\");\n/* harmony import */ var _Mask__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Mask */ \"../../node_modules/rc-dialog/es/Dialog/Mask.js\");\n/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-util/es/warning */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/warning.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Dialog = function Dialog(props) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-dialog' : _props$prefixCls,\n zIndex = props.zIndex,\n _props$visible = props.visible,\n visible = _props$visible === void 0 ? false : _props$visible,\n _props$keyboard = props.keyboard,\n keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n _props$focusTriggerAf = props.focusTriggerAfterClose,\n focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,\n wrapStyle = props.wrapStyle,\n wrapClassName = props.wrapClassName,\n wrapProps = props.wrapProps,\n onClose = props.onClose,\n afterOpenChange = props.afterOpenChange,\n afterClose = props.afterClose,\n transitionName = props.transitionName,\n animation = props.animation,\n _props$closable = props.closable,\n closable = _props$closable === void 0 ? true : _props$closable,\n _props$mask = props.mask,\n mask = _props$mask === void 0 ? true : _props$mask,\n maskTransitionName = props.maskTransitionName,\n maskAnimation = props.maskAnimation,\n _props$maskClosable = props.maskClosable,\n maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n maskStyle = props.maskStyle,\n maskProps = props.maskProps,\n rootClassName = props.rootClassName,\n modalClassNames = props.classNames,\n modalStyles = props.styles;\n if (true) {\n ['wrapStyle', 'bodyStyle', 'maskStyle'].forEach(function (prop) {\n // (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)\n (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_12__.warning)(!(prop in props), \"\".concat(prop, \" is deprecated, please use styles instead.\"));\n });\n if ('wrapClassName' in props) {\n (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_12__.warning)(false, \"wrapClassName is deprecated, please use classNames instead.\");\n }\n }\n var lastOutSideActiveElementRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)();\n var wrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)();\n var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)();\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_8__.useState(visible),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n\n // ========================== Init ==========================\n var ariaId = (0,rc_util_es_hooks_useId__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n function saveLastOutSideActiveElementRef() {\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(wrapperRef.current, document.activeElement)) {\n lastOutSideActiveElementRef.current = document.activeElement;\n }\n }\n function focusDialogContent() {\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(wrapperRef.current, document.activeElement)) {\n var _contentRef$current;\n (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 || _contentRef$current.focus();\n }\n }\n\n // ========================= Events =========================\n function onDialogVisibleChanged(newVisible) {\n // Try to focus\n if (newVisible) {\n focusDialogContent();\n } else {\n // Clean up scroll bar & focus back\n setAnimatedVisible(false);\n if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {\n try {\n lastOutSideActiveElementRef.current.focus({\n preventScroll: true\n });\n } catch (e) {\n // Do nothing\n }\n lastOutSideActiveElementRef.current = null;\n }\n\n // Trigger afterClose only when change visible from true to false\n if (animatedVisible) {\n afterClose === null || afterClose === void 0 || afterClose();\n }\n }\n afterOpenChange === null || afterOpenChange === void 0 || afterOpenChange(newVisible);\n }\n function onInternalClose(e) {\n onClose === null || onClose === void 0 || onClose(e);\n }\n\n // >>> Content\n var contentClickRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(false);\n var contentTimeoutRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)();\n\n // We need record content click incase content popup out of dialog\n var onContentMouseDown = function onContentMouseDown() {\n clearTimeout(contentTimeoutRef.current);\n contentClickRef.current = true;\n };\n var onContentMouseUp = function onContentMouseUp() {\n contentTimeoutRef.current = setTimeout(function () {\n contentClickRef.current = false;\n });\n };\n\n // >>> Wrapper\n // Close only when element not on dialog\n var onWrapperClick = null;\n if (maskClosable) {\n onWrapperClick = function onWrapperClick(e) {\n if (contentClickRef.current) {\n contentClickRef.current = false;\n } else if (wrapperRef.current === e.target) {\n onInternalClose(e);\n }\n };\n }\n function onWrapperKeyDown(e) {\n if (keyboard && e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[\"default\"].ESC) {\n e.stopPropagation();\n onInternalClose(e);\n return;\n }\n\n // keep focus inside dialog\n if (visible && e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[\"default\"].TAB) {\n contentRef.current.changeActive(!e.shiftKey);\n }\n }\n\n // ========================= Effect =========================\n (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {\n if (visible) {\n setAnimatedVisible(true);\n saveLastOutSideActiveElementRef();\n }\n }, [visible]);\n\n // Remove direct should also check the scroll bar update\n (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {\n return function () {\n clearTimeout(contentTimeoutRef.current);\n };\n }, []);\n var mergedStyle = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n zIndex: zIndex\n }, wrapStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.wrapper), {}, {\n display: !animatedVisible ? 'none' : null\n });\n\n // ========================= Render =========================\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-root\"), rootClassName)\n }, (0,rc_util_es_pickAttrs__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(props, {\n data: true\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(_Mask__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n prefixCls: prefixCls,\n visible: mask && visible,\n motionName: (0,_util__WEBPACK_IMPORTED_MODULE_9__.getMotionName)(prefixCls, maskTransitionName, maskAnimation),\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n zIndex: zIndex\n }, maskStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.mask),\n maskProps: maskProps,\n className: modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.mask\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n tabIndex: -1,\n onKeyDown: onWrapperKeyDown,\n className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(\"\".concat(prefixCls, \"-wrap\"), wrapClassName, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper),\n ref: wrapperRef,\n onClick: onWrapperClick,\n style: mergedStyle\n }, wrapProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(_Content__WEBPACK_IMPORTED_MODULE_10__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n onMouseDown: onContentMouseDown,\n onMouseUp: onContentMouseUp,\n ref: contentRef,\n closable: closable,\n ariaId: ariaId,\n prefixCls: prefixCls,\n visible: visible && animatedVisible,\n onClose: onInternalClose,\n onVisibleChanged: onDialogVisibleChanged,\n motionName: (0,_util__WEBPACK_IMPORTED_MODULE_9__.getMotionName)(prefixCls, transitionName, animation)\n }))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Dialog);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/Dialog/index.js?");
|
|
4316
4393
|
|
|
4317
4394
|
/***/ }),
|
|
4318
4395
|
|
|
@@ -4323,18 +4400,117 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4323
4400
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4324
4401
|
|
|
4325
4402
|
"use strict";
|
|
4326
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var
|
|
4403
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _rc_component_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rc-component/portal */ \"../../node_modules/@rc-component/portal/es/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ \"../../node_modules/rc-dialog/es/context.js\");\n/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Dialog */ \"../../node_modules/rc-dialog/es/Dialog/index.js\");\n\n\n\n\n\n\n// fix issue #10656\n/*\n * getContainer remarks\n * Custom container should not be return, because in the Portal component, it will remove the\n * return container element here, if the custom container is the only child of it's component,\n * like issue #10656, It will has a conflict with removeChild method in react-dom.\n * So here should add a child (div element) to custom container.\n * */\n\nvar DialogWrap = function DialogWrap(props) {\n var visible = props.visible,\n getContainer = props.getContainer,\n forceRender = props.forceRender,\n _props$destroyOnClose = props.destroyOnClose,\n destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,\n _afterClose = props.afterClose,\n panelRef = props.panelRef;\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__.useState(visible),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n var refContext = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(function () {\n return {\n panel: panelRef\n };\n }, [panelRef]);\n react__WEBPACK_IMPORTED_MODULE_3__.useEffect(function () {\n if (visible) {\n setAnimatedVisible(true);\n }\n }, [visible]);\n\n // Destroy on close will remove wrapped div\n if (!forceRender && destroyOnClose && !animatedVisible) {\n return null;\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_context__WEBPACK_IMPORTED_MODULE_4__.RefContext.Provider, {\n value: refContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_rc_component_portal__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n open: visible || forceRender || animatedVisible,\n autoDestroy: false,\n getContainer: getContainer,\n autoLock: visible || animatedVisible\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(_Dialog__WEBPACK_IMPORTED_MODULE_5__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n destroyOnClose: destroyOnClose,\n afterClose: function afterClose() {\n _afterClose === null || _afterClose === void 0 || _afterClose();\n setAnimatedVisible(false);\n }\n }))));\n};\nDialogWrap.displayName = 'Dialog';\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DialogWrap);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/DialogWrap.js?");
|
|
4327
4404
|
|
|
4328
4405
|
/***/ }),
|
|
4329
4406
|
|
|
4330
|
-
/***/ "../../node_modules/rc-dialog/es/
|
|
4331
|
-
|
|
4332
|
-
!*** ../../node_modules/rc-dialog/es/
|
|
4333
|
-
|
|
4407
|
+
/***/ "../../node_modules/rc-dialog/es/context.js":
|
|
4408
|
+
/*!**************************************************!*\
|
|
4409
|
+
!*** ../../node_modules/rc-dialog/es/context.js ***!
|
|
4410
|
+
\**************************************************/
|
|
4411
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4412
|
+
|
|
4413
|
+
"use strict";
|
|
4414
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RefContext: () => (/* binding */ RefContext)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar RefContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/context.js?");
|
|
4415
|
+
|
|
4416
|
+
/***/ }),
|
|
4417
|
+
|
|
4418
|
+
/***/ "../../node_modules/rc-dialog/es/index.js":
|
|
4419
|
+
/*!************************************************!*\
|
|
4420
|
+
!*** ../../node_modules/rc-dialog/es/index.js ***!
|
|
4421
|
+
\************************************************/
|
|
4422
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4423
|
+
|
|
4424
|
+
"use strict";
|
|
4425
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Panel: () => (/* reexport safe */ _Dialog_Content_Panel__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _DialogWrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DialogWrap */ \"../../node_modules/rc-dialog/es/DialogWrap.js\");\n/* harmony import */ var _Dialog_Content_Panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dialog/Content/Panel */ \"../../node_modules/rc-dialog/es/Dialog/Content/Panel.js\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_DialogWrap__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/index.js?");
|
|
4426
|
+
|
|
4427
|
+
/***/ }),
|
|
4428
|
+
|
|
4429
|
+
/***/ "../../node_modules/rc-dialog/es/util.js":
|
|
4430
|
+
/*!***********************************************!*\
|
|
4431
|
+
!*** ../../node_modules/rc-dialog/es/util.js ***!
|
|
4432
|
+
\***********************************************/
|
|
4433
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4434
|
+
|
|
4435
|
+
"use strict";
|
|
4436
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getMotionName: () => (/* binding */ getMotionName),\n/* harmony export */ offset: () => (/* binding */ offset)\n/* harmony export */ });\n// =============================== Motion ===============================\nfunction getMotionName(prefixCls, transitionName, animationName) {\n var motionName = transitionName;\n if (!motionName && animationName) {\n motionName = \"\".concat(prefixCls, \"-\").concat(animationName);\n }\n return motionName;\n}\n\n// =============================== Offset ===============================\nfunction getScroll(w, top) {\n var ret = w[\"page\".concat(top ? 'Y' : 'X', \"Offset\")];\n var method = \"scroll\".concat(top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n ret = d.body[method];\n }\n }\n return ret;\n}\nfunction offset(el) {\n var rect = el.getBoundingClientRect();\n var pos = {\n left: rect.left,\n top: rect.top\n };\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScroll(w);\n pos.top += getScroll(w, true);\n return pos;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/es/util.js?");
|
|
4437
|
+
|
|
4438
|
+
/***/ }),
|
|
4439
|
+
|
|
4440
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/Dom/contains.js":
|
|
4441
|
+
/*!****************************************************************************!*\
|
|
4442
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/Dom/contains.js ***!
|
|
4443
|
+
\****************************************************************************/
|
|
4444
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4445
|
+
|
|
4446
|
+
"use strict";
|
|
4447
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ contains)\n/* harmony export */ });\nfunction contains(root, n) {\n if (!root) {\n return false;\n }\n\n // Use native if support\n if (root.contains) {\n return root.contains(n);\n }\n\n // `document.contains` not support with IE11\n var node = n;\n while (node) {\n if (node === root) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/Dom/contains.js?");
|
|
4448
|
+
|
|
4449
|
+
/***/ }),
|
|
4450
|
+
|
|
4451
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/KeyCode.js":
|
|
4452
|
+
/*!***********************************************************************!*\
|
|
4453
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/KeyCode.js ***!
|
|
4454
|
+
\***********************************************************************/
|
|
4455
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4456
|
+
|
|
4457
|
+
"use strict";
|
|
4458
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\n\nvar KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n // NUMLOCK on FF/Safari Mac\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n // also NUM_NORTH_EAST\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n // also NUM_SOUTH_EAST\n /**\n * END\n */\n END: 35,\n // also NUM_SOUTH_WEST\n /**\n * HOME\n */\n HOME: 36,\n // also NUM_NORTH_WEST\n /**\n * LEFT\n */\n LEFT: 37,\n // also NUM_WEST\n /**\n * UP\n */\n UP: 38,\n // also NUM_NORTH\n /**\n * RIGHT\n */\n RIGHT: 39,\n // also NUM_EAST\n /**\n * DOWN\n */\n DOWN: 40,\n // also NUM_SOUTH\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n // also NUM_INSERT\n /**\n * DELETE\n */\n DELETE: 46,\n // also NUM_DELETE\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n // needs localization\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n // WIN_KEY_LEFT\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n // needs localization\n /**\n * DASH\n */\n DASH: 189,\n // needs localization\n /**\n * EQUALS\n */\n EQUALS: 187,\n // needs localization\n /**\n * COMMA\n */\n COMMA: 188,\n // needs localization\n /**\n * PERIOD\n */\n PERIOD: 190,\n // needs localization\n /**\n * SLASH\n */\n SLASH: 191,\n // needs localization\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n // needs localization\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n // needs localization\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n // needs localization\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n // needs localization\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n // needs localization\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n // Firefox (Gecko) fires this for the meta key instead of 91\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n var keyCode = e.keyCode;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyCode);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/KeyCode.js?");
|
|
4459
|
+
|
|
4460
|
+
/***/ }),
|
|
4461
|
+
|
|
4462
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useId.js":
|
|
4463
|
+
/*!***************************************************************************!*\
|
|
4464
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useId.js ***!
|
|
4465
|
+
\***************************************************************************/
|
|
4466
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4467
|
+
|
|
4468
|
+
"use strict";
|
|
4469
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ resetUuid: () => (/* binding */ resetUuid)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction getUseId() {\n // We need fully clone React function here to avoid webpack warning React 17 do not export `useId`\n var fullClone = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, react__WEBPACK_IMPORTED_MODULE_2__);\n return fullClone.useId;\n}\nvar uuid = 0;\n\n/** @private Note only worked in develop env. Not work in production. */\nfunction resetUuid() {\n if (true) {\n uuid = 0;\n }\n}\nvar useOriginId = getUseId();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useOriginId ?\n// Use React `useId`\nfunction useId(id) {\n var reactId = useOriginId();\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (false) {}\n return reactId;\n} :\n// Use compatible of `useId`\nfunction useCompatId(id) {\n // Inner id for accessibility usage. Only work in client side\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__.useState('ssr-id'),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n react__WEBPACK_IMPORTED_MODULE_2__.useEffect(function () {\n var nextId = uuid;\n uuid += 1;\n setInnerId(\"rc_unique_\".concat(nextId));\n }, []);\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (false) {}\n\n // Return react native id or inner id\n return innerId;\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useId.js?");
|
|
4470
|
+
|
|
4471
|
+
/***/ }),
|
|
4472
|
+
|
|
4473
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useMemo.js":
|
|
4474
|
+
/*!*****************************************************************************!*\
|
|
4475
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useMemo.js ***!
|
|
4476
|
+
\*****************************************************************************/
|
|
4477
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4478
|
+
|
|
4479
|
+
"use strict";
|
|
4480
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useMemo)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useMemo.js?");
|
|
4481
|
+
|
|
4482
|
+
/***/ }),
|
|
4483
|
+
|
|
4484
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/pickAttrs.js":
|
|
4485
|
+
/*!*************************************************************************!*\
|
|
4486
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/pickAttrs.js ***!
|
|
4487
|
+
\*************************************************************************/
|
|
4488
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4489
|
+
|
|
4490
|
+
"use strict";
|
|
4491
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ pickAttrs)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n\nvar attributes = \"accept acceptCharset accessKey action allowFullScreen allowTransparency\\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\\n charSet checked classID className colSpan cols content contentEditable contextMenu\\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\\n mediaGroup method min minLength multiple muted name noValidate nonce open\\n optimum pattern placeholder poster preload radioGroup readOnly rel required\\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\\n summary tabIndex target title type useMap value width wmode wrap\";\nvar eventsName = \"onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError\";\nvar propList = \"\".concat(attributes, \" \").concat(eventsName).split(/[\\s\\n]+/);\n\n/* eslint-enable max-len */\nvar ariaPrefix = 'aria-';\nvar dataPrefix = 'data-';\nfunction match(key, prefix) {\n return key.indexOf(prefix) === 0;\n}\n/**\n * Picker props from exist props with filter\n * @param props Passed props\n * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config\n */\nfunction pickAttrs(props) {\n var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var mergedConfig;\n if (ariaOnly === false) {\n mergedConfig = {\n aria: true,\n data: true,\n attr: true\n };\n } else if (ariaOnly === true) {\n mergedConfig = {\n aria: true\n };\n } else {\n mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, ariaOnly);\n }\n var attrs = {};\n Object.keys(props).forEach(function (key) {\n if (\n // Aria\n mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||\n // Data\n mergedConfig.data && match(key, dataPrefix) ||\n // Attr\n mergedConfig.attr && propList.includes(key)) {\n attrs[key] = props[key];\n }\n });\n return attrs;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/pickAttrs.js?");
|
|
4492
|
+
|
|
4493
|
+
/***/ }),
|
|
4494
|
+
|
|
4495
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/ref.js":
|
|
4496
|
+
/*!*******************************************************************!*\
|
|
4497
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/ref.js ***!
|
|
4498
|
+
\*******************************************************************/
|
|
4334
4499
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4335
4500
|
|
|
4336
4501
|
"use strict";
|
|
4337
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
4502
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRef: () => (/* binding */ composeRef),\n/* harmony export */ fillRef: () => (/* binding */ fillRef),\n/* harmony export */ supportNodeRef: () => (/* binding */ supportNodeRef),\n/* harmony export */ supportRef: () => (/* binding */ supportRef),\n/* harmony export */ useComposeRef: () => (/* binding */ useComposeRef)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ \"../../node_modules/react-is/index.js\");\n/* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ \"../../node_modules/rc-dialog/node_modules/rc-util/es/hooks/useMemo.js\");\n\n/* eslint-disable no-param-reassign */\n\n\n\n\nfunction fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n}\n\n/**\n * Merge refs into one ref function to support ref passing.\n */\nfunction composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(function (ref) {\n return ref;\n });\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n}\nfunction useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return (0,_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length !== next.length || prev.every(function (ref, i) {\n return ref !== next[i];\n });\n });\n}\nfunction supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = (0,react_is__WEBPACK_IMPORTED_MODULE_2__.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n return true;\n}\nfunction supportNodeRef(node) {\n if (! /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(node)) {\n return false;\n }\n if ((0,react_is__WEBPACK_IMPORTED_MODULE_2__.isFragment)(node)) {\n return false;\n }\n return supportRef(node);\n}\n/* eslint-enable */\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/ref.js?");
|
|
4503
|
+
|
|
4504
|
+
/***/ }),
|
|
4505
|
+
|
|
4506
|
+
/***/ "../../node_modules/rc-dialog/node_modules/rc-util/es/warning.js":
|
|
4507
|
+
/*!***********************************************************************!*\
|
|
4508
|
+
!*** ../../node_modules/rc-dialog/node_modules/rc-util/es/warning.js ***!
|
|
4509
|
+
\***********************************************************************/
|
|
4510
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4511
|
+
|
|
4512
|
+
"use strict";
|
|
4513
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ call: () => (/* binding */ call),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ note: () => (/* binding */ note),\n/* harmony export */ noteOnce: () => (/* binding */ noteOnce),\n/* harmony export */ preMessage: () => (/* binding */ preMessage),\n/* harmony export */ resetWarned: () => (/* binding */ resetWarned),\n/* harmony export */ warning: () => (/* binding */ warning),\n/* harmony export */ warningOnce: () => (/* binding */ warningOnce)\n/* harmony export */ });\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warningOnce);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dialog/node_modules/rc-util/es/warning.js?");
|
|
4338
4514
|
|
|
4339
4515
|
/***/ }),
|
|
4340
4516
|
|
|
@@ -4345,249 +4521,689 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4345
4521
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4346
4522
|
|
|
4347
4523
|
"use strict";
|
|
4348
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_trigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-trigger */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./placements */ \"../../node_modules/rc-dropdown/es/placements.js\");\n/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-lifecycles-compat */ \"../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\nvar _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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nvar Dropdown = function (_Component) {\n _inherits(Dropdown, _Component);\n\n function Dropdown(props) {\n _classCallCheck(this, Dropdown);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n if ('visible' in props) {\n _this.state = {\n visible: props.visible\n };\n } else {\n _this.state = {\n visible: props.defaultVisible\n };\n }\n return _this;\n }\n\n Dropdown.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {\n if ('visible' in nextProps) {\n return {\n visible: nextProps.visible\n };\n }\n return null;\n };\n\n Dropdown.prototype.getOverlayElement = function getOverlayElement() {\n var overlay = this.props.overlay;\n\n var overlayElement = void 0;\n if (typeof overlay === 'function') {\n overlayElement = overlay();\n } else {\n overlayElement = overlay;\n }\n return overlayElement;\n };\n\n Dropdown.prototype.getMenuElementOrLambda = function getMenuElementOrLambda() {\n var overlay = this.props.overlay;\n\n if (typeof overlay === 'function') {\n return this.getMenuElement;\n }\n return this.getMenuElement();\n };\n\n Dropdown.prototype.getPopupDomNode = function getPopupDomNode() {\n return this.trigger.getPopupDomNode();\n };\n\n Dropdown.prototype.getOpenClassName = function getOpenClassName() {\n var _props = this.props,\n openClassName = _props.openClassName,\n prefixCls = _props.prefixCls;\n\n if (openClassName !== undefined) {\n return openClassName;\n }\n return prefixCls + '-open';\n };\n\n Dropdown.prototype.renderChildren = function renderChildren() {\n var children = this.props.children;\n var visible = this.state.visible;\n\n var childrenProps = children.props ? children.props : {};\n var childClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(childrenProps.className, this.getOpenClassName());\n return visible && children ? (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(children, { className: childClassName }) : children;\n };\n\n Dropdown.prototype.render = function render() {\n var _props2 = this.props,\n prefixCls = _props2.prefixCls,\n transitionName = _props2.transitionName,\n animation = _props2.animation,\n align = _props2.align,\n placement = _props2.placement,\n getPopupContainer = _props2.getPopupContainer,\n showAction = _props2.showAction,\n hideAction = _props2.hideAction,\n overlayClassName = _props2.overlayClassName,\n overlayStyle = _props2.overlayStyle,\n trigger = _props2.trigger,\n otherProps = _objectWithoutProperties(_props2, ['prefixCls', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']);\n\n var triggerHideAction = hideAction;\n if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {\n triggerHideAction = ['click'];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n rc_trigger__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n _extends({}, otherProps, {\n prefixCls: prefixCls,\n ref: this.saveTrigger,\n popupClassName: overlayClassName,\n popupStyle: overlayStyle,\n builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n action: trigger,\n showAction: showAction,\n hideAction: triggerHideAction || [],\n popupPlacement: placement,\n popupAlign: align,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n popupVisible: this.state.visible,\n afterPopupVisibleChange: this.afterVisibleChange,\n popup: this.getMenuElementOrLambda(),\n onPopupVisibleChange: this.onVisibleChange,\n getPopupContainer: getPopupContainer\n }),\n this.renderChildren()\n );\n };\n\n return Dropdown;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nDropdown.propTypes = {\n minOverlayWidthMatchTrigger: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n onVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n onOverlayClick: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),\n transitionName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n overlayClassName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n openClassName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n animation: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n overlayStyle: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n placement: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n overlay: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),\n trigger: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n showAction: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n hideAction: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n defaultVisible: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool)\n};\nDropdown.defaultProps = {\n prefixCls: 'rc-dropdown',\n trigger: ['hover'],\n showAction: [],\n overlayClassName: '',\n overlayStyle: {},\n defaultVisible: false,\n onVisibleChange: function onVisibleChange() {},\n\n placement: 'bottomLeft'\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.onClick = function (e) {\n var props = _this2.props;\n var overlayProps = _this2.getOverlayElement().props;\n // do no call onVisibleChange, if you need click to hide, use onClick and control visible\n if (!('visible' in props)) {\n _this2.setState({\n visible: false\n });\n }\n if (props.onOverlayClick) {\n props.onOverlayClick(e);\n }\n if (overlayProps.onClick) {\n overlayProps.onClick(e);\n }\n };\n\n this.onVisibleChange = function (visible) {\n var props = _this2.props;\n if (!('visible' in props)) {\n _this2.setState({\n visible: visible\n });\n }\n props.onVisibleChange(visible);\n };\n\n this.getMinOverlayWidthMatchTrigger = function () {\n var _props3 = _this2.props,\n minOverlayWidthMatchTrigger = _props3.minOverlayWidthMatchTrigger,\n alignPoint = _props3.alignPoint;\n\n if ('minOverlayWidthMatchTrigger' in _this2.props) {\n return minOverlayWidthMatchTrigger;\n }\n\n return !alignPoint;\n };\n\n this.getMenuElement = function () {\n var prefixCls = _this2.props.prefixCls;\n\n var overlayElement = _this2.getOverlayElement();\n var extraOverlayProps = {\n prefixCls: prefixCls + '-menu',\n onClick: _this2.onClick\n };\n if (typeof overlayElement.type === 'string') {\n delete extraOverlayProps.prefixCls;\n }\n return react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(overlayElement, extraOverlayProps);\n };\n\n this.afterVisibleChange = function (visible) {\n if (visible && _this2.getMinOverlayWidthMatchTrigger()) {\n var overlayNode = _this2.getPopupDomNode();\n var rootNode = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(_this2);\n if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) {\n overlayNode.style.minWidth = rootNode.offsetWidth + 'px';\n if (_this2.trigger && _this2.trigger._component && _this2.trigger._component.alignInstance) {\n _this2.trigger._component.alignInstance.forceAlign();\n }\n }\n }\n };\n\n this.saveTrigger = function (node) {\n _this2.trigger = node;\n };\n};\n\n(0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_5__.polyfill)(Dropdown);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Dropdown);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/es/Dropdown.js?");
|
|
4524
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_trigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-trigger */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./placements */ \"../../node_modules/rc-dropdown/es/placements.js\");\n/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-lifecycles-compat */ \"../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\nvar _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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nvar Dropdown = function (_Component) {\n _inherits(Dropdown, _Component);\n\n function Dropdown(props) {\n _classCallCheck(this, Dropdown);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n if ('visible' in props) {\n _this.state = {\n visible: props.visible\n };\n } else {\n _this.state = {\n visible: props.defaultVisible\n };\n }\n return _this;\n }\n\n Dropdown.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {\n if ('visible' in nextProps) {\n return {\n visible: nextProps.visible\n };\n }\n return null;\n };\n\n Dropdown.prototype.getOverlayElement = function getOverlayElement() {\n var overlay = this.props.overlay;\n\n var overlayElement = void 0;\n if (typeof overlay === 'function') {\n overlayElement = overlay();\n } else {\n overlayElement = overlay;\n }\n return overlayElement;\n };\n\n Dropdown.prototype.getMenuElementOrLambda = function getMenuElementOrLambda() {\n var overlay = this.props.overlay;\n\n if (typeof overlay === 'function') {\n return this.getMenuElement;\n }\n return this.getMenuElement();\n };\n\n Dropdown.prototype.getPopupDomNode = function getPopupDomNode() {\n return this.trigger.getPopupDomNode();\n };\n\n Dropdown.prototype.getOpenClassName = function getOpenClassName() {\n var _props = this.props,\n openClassName = _props.openClassName,\n prefixCls = _props.prefixCls;\n\n if (openClassName !== undefined) {\n return openClassName;\n }\n return prefixCls + '-open';\n };\n\n Dropdown.prototype.renderChildren = function renderChildren() {\n var children = this.props.children;\n var visible = this.state.visible;\n\n var childrenProps = children.props ? children.props : {};\n var childClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(childrenProps.className, this.getOpenClassName());\n return visible && children ? (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(children, { className: childClassName }) : children;\n };\n\n Dropdown.prototype.render = function render() {\n var _props2 = this.props,\n prefixCls = _props2.prefixCls,\n transitionName = _props2.transitionName,\n animation = _props2.animation,\n align = _props2.align,\n placement = _props2.placement,\n getPopupContainer = _props2.getPopupContainer,\n showAction = _props2.showAction,\n hideAction = _props2.hideAction,\n overlayClassName = _props2.overlayClassName,\n overlayStyle = _props2.overlayStyle,\n trigger = _props2.trigger,\n otherProps = _objectWithoutProperties(_props2, ['prefixCls', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']);\n\n var triggerHideAction = hideAction;\n if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {\n triggerHideAction = ['click'];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n rc_trigger__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n _extends({}, otherProps, {\n prefixCls: prefixCls,\n ref: this.saveTrigger,\n popupClassName: overlayClassName,\n popupStyle: overlayStyle,\n builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n action: trigger,\n showAction: showAction,\n hideAction: triggerHideAction || [],\n popupPlacement: placement,\n popupAlign: align,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n popupVisible: this.state.visible,\n afterPopupVisibleChange: this.afterVisibleChange,\n popup: this.getMenuElementOrLambda(),\n onPopupVisibleChange: this.onVisibleChange,\n getPopupContainer: getPopupContainer\n }),\n this.renderChildren()\n );\n };\n\n return Dropdown;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nDropdown.propTypes = {\n minOverlayWidthMatchTrigger: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n onVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n onOverlayClick: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),\n transitionName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n overlayClassName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n openClassName: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n animation: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n overlayStyle: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),\n placement: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),\n overlay: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),\n trigger: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n showAction: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n hideAction: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool),\n defaultVisible: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool)\n};\nDropdown.defaultProps = {\n prefixCls: 'rc-dropdown',\n trigger: ['hover'],\n showAction: [],\n overlayClassName: '',\n overlayStyle: {},\n defaultVisible: false,\n onVisibleChange: function onVisibleChange() {},\n\n placement: 'bottomLeft'\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.onClick = function (e) {\n var props = _this2.props;\n var overlayProps = _this2.getOverlayElement().props;\n // do no call onVisibleChange, if you need click to hide, use onClick and control visible\n if (!('visible' in props)) {\n _this2.setState({\n visible: false\n });\n }\n if (props.onOverlayClick) {\n props.onOverlayClick(e);\n }\n if (overlayProps.onClick) {\n overlayProps.onClick(e);\n }\n };\n\n this.onVisibleChange = function (visible) {\n var props = _this2.props;\n if (!('visible' in props)) {\n _this2.setState({\n visible: visible\n });\n }\n props.onVisibleChange(visible);\n };\n\n this.getMinOverlayWidthMatchTrigger = function () {\n var _props3 = _this2.props,\n minOverlayWidthMatchTrigger = _props3.minOverlayWidthMatchTrigger,\n alignPoint = _props3.alignPoint;\n\n if ('minOverlayWidthMatchTrigger' in _this2.props) {\n return minOverlayWidthMatchTrigger;\n }\n\n return !alignPoint;\n };\n\n this.getMenuElement = function () {\n var prefixCls = _this2.props.prefixCls;\n\n var overlayElement = _this2.getOverlayElement();\n var extraOverlayProps = {\n prefixCls: prefixCls + '-menu',\n onClick: _this2.onClick\n };\n if (typeof overlayElement.type === 'string') {\n delete extraOverlayProps.prefixCls;\n }\n return react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(overlayElement, extraOverlayProps);\n };\n\n this.afterVisibleChange = function (visible) {\n if (visible && _this2.getMinOverlayWidthMatchTrigger()) {\n var overlayNode = _this2.getPopupDomNode();\n var rootNode = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(_this2);\n if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) {\n overlayNode.style.minWidth = rootNode.offsetWidth + 'px';\n if (_this2.trigger && _this2.trigger._component && _this2.trigger._component.alignInstance) {\n _this2.trigger._component.alignInstance.forceAlign();\n }\n }\n }\n };\n\n this.saveTrigger = function (node) {\n _this2.trigger = node;\n };\n};\n\n(0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_5__.polyfill)(Dropdown);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Dropdown);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/es/Dropdown.js?");
|
|
4525
|
+
|
|
4526
|
+
/***/ }),
|
|
4527
|
+
|
|
4528
|
+
/***/ "../../node_modules/rc-dropdown/es/index.js":
|
|
4529
|
+
/*!**************************************************!*\
|
|
4530
|
+
!*** ../../node_modules/rc-dropdown/es/index.js ***!
|
|
4531
|
+
\**************************************************/
|
|
4532
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4533
|
+
|
|
4534
|
+
"use strict";
|
|
4535
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Dropdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dropdown */ \"../../node_modules/rc-dropdown/es/Dropdown.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Dropdown__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/es/index.js?");
|
|
4536
|
+
|
|
4537
|
+
/***/ }),
|
|
4538
|
+
|
|
4539
|
+
/***/ "../../node_modules/rc-dropdown/es/placements.js":
|
|
4540
|
+
/*!*******************************************************!*\
|
|
4541
|
+
!*** ../../node_modules/rc-dropdown/es/placements.js ***!
|
|
4542
|
+
\*******************************************************/
|
|
4543
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4544
|
+
|
|
4545
|
+
"use strict";
|
|
4546
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ placements: () => (/* binding */ placements)\n/* harmony export */ });\nvar autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\n\nvar targetOffset = [0, 0];\n\nvar placements = {\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n topCenter: {\n points: ['bc', 'tc'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n topRight: {\n points: ['br', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n bottomCenter: {\n points: ['tc', 'bc'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n bottomRight: {\n points: ['tr', 'br'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n }\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (placements);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/es/placements.js?");
|
|
4547
|
+
|
|
4548
|
+
/***/ }),
|
|
4549
|
+
|
|
4550
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js":
|
|
4551
|
+
/*!**********************************************************************************!*\
|
|
4552
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js ***!
|
|
4553
|
+
\**********************************************************************************/
|
|
4554
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4555
|
+
|
|
4556
|
+
"use strict";
|
|
4557
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ \"../../node_modules/babel-runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\nvar LazyRenderBox = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(LazyRenderBox, _Component);\n\n function LazyRenderBox() {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, LazyRenderBox);\n\n return (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _Component.apply(this, arguments));\n }\n\n LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return nextProps.hiddenClassName || nextProps.visible;\n };\n\n LazyRenderBox.prototype.render = function render() {\n var _props = this.props,\n hiddenClassName = _props.hiddenClassName,\n visible = _props.visible,\n props = (0,babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_props, ['hiddenClassName', 'visible']);\n\n if (hiddenClassName || react__WEBPACK_IMPORTED_MODULE_4___default().Children.count(props.children) > 1) {\n if (!visible && hiddenClassName) {\n props.className += ' ' + hiddenClassName;\n }\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement('div', props);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(props.children);\n };\n\n return LazyRenderBox;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nLazyRenderBox.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n hiddenClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)\n};\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LazyRenderBox);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js?");
|
|
4558
|
+
|
|
4559
|
+
/***/ }),
|
|
4560
|
+
|
|
4561
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js":
|
|
4562
|
+
/*!**************************************************************************!*\
|
|
4563
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js ***!
|
|
4564
|
+
\**************************************************************************/
|
|
4565
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4566
|
+
|
|
4567
|
+
"use strict";
|
|
4568
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_align__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-align */ \"../../node_modules/rc-align/es/index.js\");\n/* harmony import */ var rc_animate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-animate */ \"../../node_modules/rc-animate/es/Animate.js\");\n/* harmony import */ var _PopupInner__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PopupInner */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/PopupInner.js\");\n/* harmony import */ var _LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LazyRenderBox */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Popup = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Popup, _Component);\n\n function Popup(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Popup);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.state = {\n // Used for stretch\n stretchChecked: false,\n targetWidth: undefined,\n targetHeight: undefined\n };\n\n _this.savePopupRef = _utils__WEBPACK_IMPORTED_MODULE_10__.saveRef.bind(_this, 'popupInstance');\n _this.saveAlignRef = _utils__WEBPACK_IMPORTED_MODULE_10__.saveRef.bind(_this, 'alignInstance');\n return _this;\n }\n\n Popup.prototype.componentDidMount = function componentDidMount() {\n this.rootNode = this.getPopupDomNode();\n this.setStretchSize();\n };\n\n Popup.prototype.componentDidUpdate = function componentDidUpdate() {\n this.setStretchSize();\n };\n\n // Record size if stretch needed\n\n\n Popup.prototype.getPopupDomNode = function getPopupDomNode() {\n return react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(this.popupInstance);\n };\n\n // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n\n Popup.prototype.getMaskTransitionName = function getMaskTransitionName() {\n var props = this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getTransitionName = function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getClassName = function getClassName(currentAlignClassName) {\n return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName;\n };\n\n Popup.prototype.getPopupElement = function getPopupElement() {\n var _this2 = this;\n\n var savePopupRef = this.savePopupRef;\n var _state = this.state,\n stretchChecked = _state.stretchChecked,\n targetHeight = _state.targetHeight,\n targetWidth = _state.targetWidth;\n var _props = this.props,\n align = _props.align,\n visible = _props.visible,\n prefixCls = _props.prefixCls,\n style = _props.style,\n getClassNameFromAlign = _props.getClassNameFromAlign,\n destroyPopupOnHide = _props.destroyPopupOnHide,\n stretch = _props.stretch,\n children = _props.children,\n onMouseEnter = _props.onMouseEnter,\n onMouseLeave = _props.onMouseLeave,\n onMouseDown = _props.onMouseDown,\n onTouchStart = _props.onTouchStart;\n\n var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align));\n var hiddenClassName = prefixCls + '-hidden';\n\n if (!visible) {\n this.currentAlignClassName = null;\n }\n\n var sizeStyle = {};\n if (stretch) {\n // Stretch with target\n if (stretch.indexOf('height') !== -1) {\n sizeStyle.height = targetHeight;\n } else if (stretch.indexOf('minHeight') !== -1) {\n sizeStyle.minHeight = targetHeight;\n }\n if (stretch.indexOf('width') !== -1) {\n sizeStyle.width = targetWidth;\n } else if (stretch.indexOf('minWidth') !== -1) {\n sizeStyle.minWidth = targetWidth;\n }\n\n // Delay force align to makes ui smooth\n if (!stretchChecked) {\n sizeStyle.visibility = 'hidden';\n setTimeout(function () {\n if (_this2.alignInstance) {\n _this2.alignInstance.forceAlign();\n }\n }, 0);\n }\n }\n\n var newStyle = (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sizeStyle, style, this.getZIndexStyle());\n\n var popupInnerProps = {\n className: className,\n prefixCls: prefixCls,\n ref: savePopupRef,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: newStyle\n };\n if (destroyPopupOnHide) {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName()\n },\n visible ? react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_align__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n align: align,\n onAlign: this.onAlign\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _PopupInner__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n visible: true\n }, popupInnerProps),\n children\n )\n ) : null\n );\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName(),\n showProp: 'xVisible'\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_align__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n xVisible: visible,\n childrenProps: { visible: 'xVisible' },\n disabled: !visible,\n align: align,\n onAlign: this.onAlign\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _PopupInner__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n hiddenClassName: hiddenClassName\n }, popupInnerProps),\n children\n )\n )\n );\n };\n\n Popup.prototype.getZIndexStyle = function getZIndexStyle() {\n var style = {};\n var props = this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n };\n\n Popup.prototype.getMaskElement = function getMaskElement() {\n var props = this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = this.getMaskTransitionName();\n maskElement = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n style: this.getZIndexStyle(),\n key: 'mask',\n className: props.prefixCls + '-mask',\n hiddenClassName: props.prefixCls + '-mask-hidden',\n visible: props.visible\n });\n if (maskTransition) {\n maskElement = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n key: 'mask',\n showProp: 'visible',\n transitionAppear: true,\n component: '',\n transitionName: maskTransition\n },\n maskElement\n );\n }\n }\n return maskElement;\n };\n\n Popup.prototype.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n 'div',\n null,\n this.getMaskElement(),\n this.getPopupElement()\n );\n };\n\n return Popup;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nPopup.propTypes = {\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n getClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onAlign: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n getRootDomNode: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().any),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n onMouseEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onMouseLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onTouchStart: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node),\n point: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({\n pageX: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),\n pageY: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number)\n })\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this3 = this;\n\n this.onAlign = function (popupDomNode, align) {\n var props = _this3.props;\n var currentAlignClassName = props.getClassNameFromAlign(align);\n // FIX: https://github.com/react-component/trigger/issues/56\n // FIX: https://github.com/react-component/tooltip/issues/79\n if (_this3.currentAlignClassName !== currentAlignClassName) {\n _this3.currentAlignClassName = currentAlignClassName;\n popupDomNode.className = _this3.getClassName(currentAlignClassName);\n }\n props.onAlign(popupDomNode, align);\n };\n\n this.setStretchSize = function () {\n var _props2 = _this3.props,\n stretch = _props2.stretch,\n getRootDomNode = _props2.getRootDomNode,\n visible = _props2.visible;\n var _state2 = _this3.state,\n stretchChecked = _state2.stretchChecked,\n targetHeight = _state2.targetHeight,\n targetWidth = _state2.targetWidth;\n\n\n if (!stretch || !visible) {\n if (stretchChecked) {\n _this3.setState({ stretchChecked: false });\n }\n return;\n }\n\n var $ele = getRootDomNode();\n if (!$ele) return;\n\n var height = $ele.offsetHeight;\n var width = $ele.offsetWidth;\n\n if (targetHeight !== height || targetWidth !== width || !stretchChecked) {\n _this3.setState({\n stretchChecked: true,\n targetHeight: height,\n targetWidth: width\n });\n }\n };\n\n this.getTargetElement = function () {\n return _this3.props.getRootDomNode();\n };\n\n this.getAlignTarget = function () {\n var point = _this3.props.point;\n\n if (point) {\n return point;\n }\n return _this3.getTargetElement;\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Popup);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js?");
|
|
4569
|
+
|
|
4570
|
+
/***/ }),
|
|
4571
|
+
|
|
4572
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-trigger/es/PopupInner.js":
|
|
4573
|
+
/*!*******************************************************************************!*\
|
|
4574
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-trigger/es/PopupInner.js ***!
|
|
4575
|
+
\*******************************************************************************/
|
|
4576
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4577
|
+
|
|
4578
|
+
"use strict";
|
|
4579
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _LazyRenderBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LazyRenderBox */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js\");\n\n\n\n\n\n\n\nvar PopupInner = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(PopupInner, _Component);\n\n function PopupInner() {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, PopupInner);\n\n return (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, _Component.apply(this, arguments));\n }\n\n PopupInner.prototype.render = function render() {\n var props = this.props;\n var className = props.className;\n if (!props.visible) {\n className += ' ' + props.hiddenClassName;\n }\n return react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\n 'div',\n {\n className: className,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onMouseDown: props.onMouseDown,\n onTouchStart: props.onTouchStart,\n style: props.style\n },\n react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\n _LazyRenderBox__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n { className: props.prefixCls + '-content', visible: props.visible },\n props.children\n )\n );\n };\n\n return PopupInner;\n}(react__WEBPACK_IMPORTED_MODULE_3__.Component);\n\nPopupInner.propTypes = {\n hiddenClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n onMouseEnter: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n onMouseLeave: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n onTouchStart: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any)\n};\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupInner);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/PopupInner.js?");
|
|
4580
|
+
|
|
4581
|
+
/***/ }),
|
|
4582
|
+
|
|
4583
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js":
|
|
4584
|
+
/*!**************************************************************************!*\
|
|
4585
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js ***!
|
|
4586
|
+
\**************************************************************************/
|
|
4587
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4588
|
+
|
|
4589
|
+
"use strict";
|
|
4590
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-lifecycles-compat */ \"../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/contains.js\");\n/* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ \"../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/addEventListener.js\");\n/* harmony import */ var rc_util_es_ContainerRender__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/ContainerRender */ \"../../node_modules/rc-dropdown/node_modules/rc-util/es/ContainerRender.js\");\n/* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Portal */ \"../../node_modules/rc-dropdown/node_modules/rc-util/es/Portal.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\nvar IS_REACT_16 = !!react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal;\n\nvar contextTypes = {\n rcTrigger: prop_types__WEBPACK_IMPORTED_MODULE_14___default().shape({\n onPopupMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func)\n })\n};\n\nvar Trigger = function (_React$Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Trigger, _React$Component);\n\n function Trigger(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Trigger);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n\n ALL_HANDLERS.forEach(function (h) {\n _this['fire' + h] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n Trigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n Trigger.prototype.componentDidMount = function componentDidMount() {\n this.componentDidUpdate({}, {\n popupVisible: this.state.popupVisible\n });\n };\n\n Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {\n var props = this.props;\n var state = this.state;\n var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() {\n if (prevState.popupVisible !== state.popupVisible) {\n props.afterPopupVisibleChange(state.popupVisible);\n }\n };\n if (!IS_REACT_16) {\n this.renderComponent(null, triggerAfterPopupVisibleChange);\n }\n\n // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n if (state.popupVisible) {\n var currentDocument = void 0;\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'mousedown', this.onDocumentClick);\n }\n // always hide on mobile\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'touchstart', this.onDocumentClick);\n }\n // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'scroll', this.onContextMenuClose);\n }\n // close popup when trigger type contains 'onContextMenu' and window is blur.\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(window, 'blur', this.onContextMenuClose);\n }\n return;\n }\n\n this.clearOutsideHandler();\n };\n\n Trigger.prototype.componentWillUnmount = function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n };\n\n Trigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n Trigger.prototype.getPopupDomNode = function getPopupDomNode() {\n // for test\n if (this._component && this._component.getPopupDomNode) {\n return this._component.getPopupDomNode();\n }\n return null;\n };\n\n Trigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_12__.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n\n\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible });\n }\n this.props.onPopupVisibleChange(popupVisible);\n }\n\n // Always record the point position since mouseEnterDelay will delay the show\n if (alignPoint && event) {\n this.setPoint(event);\n }\n };\n\n Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n var point = event ? { pageX: event.pageX, pageY: event.pageY } : null;\n this.delayTimer = setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n };\n\n Trigger.prototype.clearDelayTimer = function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n };\n\n Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n };\n\n Trigger.prototype.createTwoChains = function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this['fire' + event];\n }\n return childPros[event] || props[event];\n };\n\n Trigger.prototype.isClickToShow = function isClickToShow() {\n var _props = this.props,\n action = _props.action,\n showAction = _props.showAction;\n\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() {\n var _props2 = this.props,\n action = _props2.action,\n showAction = _props2.showAction;\n\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n };\n\n Trigger.prototype.isClickToHide = function isClickToHide() {\n var _props3 = this.props,\n action = _props3.action,\n hideAction = _props3.hideAction;\n\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() {\n var _props4 = this.props,\n action = _props4.action,\n showAction = _props4.showAction;\n\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n };\n\n Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() {\n var _props5 = this.props,\n action = _props5.action,\n hideAction = _props5.hideAction;\n\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n };\n\n Trigger.prototype.isFocusToShow = function isFocusToShow() {\n var _props6 = this.props,\n action = _props6.action,\n showAction = _props6.showAction;\n\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n };\n\n Trigger.prototype.isBlurToHide = function isBlurToHide() {\n var _props7 = this.props,\n action = _props7.action,\n hideAction = _props7.hideAction;\n\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n };\n\n Trigger.prototype.forcePopupAlign = function forcePopupAlign() {\n if (this.state.popupVisible && this._component && this._component.alignInstance) {\n this._component.alignInstance.forceAlign();\n }\n };\n\n Trigger.prototype.fireEvents = function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n };\n\n Trigger.prototype.close = function close() {\n this.setPopupVisible(false);\n };\n\n Trigger.prototype.render = function render() {\n var _this3 = this;\n\n var popupVisible = this.state.popupVisible;\n var _props8 = this.props,\n children = _props8.children,\n forceRender = _props8.forceRender,\n alignPoint = _props8.alignPoint,\n className = _props8.className;\n\n var child = react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(children);\n var newChildProps = { key: 'trigger' };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_11___default()(child && child.props && child.props.className, className);\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n var trigger = react__WEBPACK_IMPORTED_MODULE_4___default().cloneElement(child, newChildProps);\n\n if (!IS_REACT_16) {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_util_es_ContainerRender__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n {\n parent: this,\n visible: popupVisible,\n autoMount: false,\n forceRender: forceRender,\n getComponent: this.getComponent,\n getContainer: this.getContainer\n },\n function (_ref2) {\n var renderComponent = _ref2.renderComponent;\n\n _this3.renderComponent = renderComponent;\n return trigger;\n }\n );\n }\n\n var portal = void 0;\n // prevent unmounting after it's rendered\n if (popupVisible || this._component || forceRender) {\n portal = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate },\n this.getComponent()\n );\n }\n\n return [trigger, portal];\n };\n\n return Trigger;\n}((react__WEBPACK_IMPORTED_MODULE_4___default().Component));\n\nTrigger.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n action: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), prop_types__WEBPACK_IMPORTED_MODULE_14___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_14___default().string))]),\n showAction: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n hideAction: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n getPopupClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n onPopupVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n afterPopupVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n popup: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func)]).isRequired,\n popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n builtinPlacements: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n popupTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)]),\n popupAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n mouseEnterDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n mouseLeaveDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n zIndex: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n focusDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n blurDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n getDocument: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n mask: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n maskClosable: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n onPopupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n popupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n popupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n defaultPopupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n maskTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)]),\n maskAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool) // Maybe we can support user pass position in the future\n};\nTrigger.contextTypes = contextTypes;\nTrigger.childContextTypes = contextTypes;\nTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this4 = this;\n\n this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this4.props.mouseEnterDelay;\n\n _this4.fireEvents('onMouseEnter', e);\n _this4.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n this.onMouseMove = function (e) {\n _this4.fireEvents('onMouseMove', e);\n _this4.setPoint(e);\n };\n\n this.onMouseLeave = function (e) {\n _this4.fireEvents('onMouseLeave', e);\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onPopupMouseEnter = function () {\n _this4.clearDelayTimer();\n };\n\n this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this4._component && _this4._component.getPopupDomNode && (0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_this4._component.getPopupDomNode(), e.relatedTarget)) {\n return;\n }\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onFocus = function (e) {\n _this4.fireEvents('onFocus', e);\n // incase focusin and focusout\n _this4.clearDelayTimer();\n if (_this4.isFocusToShow()) {\n _this4.focusTime = Date.now();\n _this4.delaySetPopupVisible(true, _this4.props.focusDelay);\n }\n };\n\n this.onMouseDown = function (e) {\n _this4.fireEvents('onMouseDown', e);\n _this4.preClickTime = Date.now();\n };\n\n this.onTouchStart = function (e) {\n _this4.fireEvents('onTouchStart', e);\n _this4.preTouchTime = Date.now();\n };\n\n this.onBlur = function (e) {\n _this4.fireEvents('onBlur', e);\n _this4.clearDelayTimer();\n if (_this4.isBlurToHide()) {\n _this4.delaySetPopupVisible(false, _this4.props.blurDelay);\n }\n };\n\n this.onContextMenu = function (e) {\n e.preventDefault();\n _this4.fireEvents('onContextMenu', e);\n _this4.setPopupVisible(true, e);\n };\n\n this.onContextMenuClose = function () {\n if (_this4.isContextMenuToShow()) {\n _this4.close();\n }\n };\n\n this.onClick = function (event) {\n _this4.fireEvents('onClick', event);\n // focus will trigger click\n if (_this4.focusTime) {\n var preTime = void 0;\n if (_this4.preClickTime && _this4.preTouchTime) {\n preTime = Math.min(_this4.preClickTime, _this4.preTouchTime);\n } else if (_this4.preClickTime) {\n preTime = _this4.preClickTime;\n } else if (_this4.preTouchTime) {\n preTime = _this4.preTouchTime;\n }\n if (Math.abs(preTime - _this4.focusTime) < 20) {\n return;\n }\n _this4.focusTime = 0;\n }\n _this4.preClickTime = 0;\n _this4.preTouchTime = 0;\n\n // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n if (_this4.isClickToShow() && (_this4.isClickToHide() || _this4.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n var nextVisible = !_this4.state.popupVisible;\n if (_this4.isClickToHide() && !nextVisible || nextVisible && _this4.isClickToShow()) {\n _this4.setPopupVisible(!_this4.state.popupVisible, event);\n }\n };\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this4.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this4.hasPopupMouseDown = true;\n\n clearTimeout(_this4.mouseDownTimeout);\n _this4.mouseDownTimeout = setTimeout(function () {\n _this4.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.onDocumentClick = function (event) {\n if (_this4.props.mask && !_this4.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n var root = (0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4);\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(root, target) && !_this4.hasPopupMouseDown) {\n _this4.close();\n }\n };\n\n this.getRootDomNode = function () {\n return (0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props9 = _this4.props,\n popupPlacement = _props9.popupPlacement,\n builtinPlacements = _props9.builtinPlacements,\n prefixCls = _props9.prefixCls,\n alignPoint = _props9.alignPoint,\n getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0,_utils__WEBPACK_IMPORTED_MODULE_12__.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props10 = _this4.props,\n prefixCls = _props10.prefixCls,\n destroyPopupOnHide = _props10.destroyPopupOnHide,\n popupClassName = _props10.popupClassName,\n action = _props10.action,\n onPopupAlign = _props10.onPopupAlign,\n popupAnimation = _props10.popupAnimation,\n popupTransitionName = _props10.popupTransitionName,\n popupStyle = _props10.popupStyle,\n mask = _props10.mask,\n maskAnimation = _props10.maskAnimation,\n maskTransitionName = _props10.maskTransitionName,\n zIndex = _props10.zIndex,\n popup = _props10.popup,\n stretch = _props10.stretch,\n alignPoint = _props10.alignPoint;\n var _state = _this4.state,\n popupVisible = _state.popupVisible,\n point = _state.point;\n\n\n var align = _this4.getPopupAlign();\n\n var mouseProps = {};\n if (_this4.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this4.onPopupMouseEnter;\n }\n if (_this4.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this4.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this4.onPopupMouseDown;\n mouseProps.onTouchStart = _this4.onPopupMouseDown;\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _Popup__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: action,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this4.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this4.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this4.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this4.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer((0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.setPoint = function (point) {\n var alignPoint = _this4.props.alignPoint;\n\n if (!alignPoint || !point) return;\n\n _this4.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n this.handlePortalUpdate = function () {\n if (_this4.state.prevPopupVisible !== _this4.state.popupVisible) {\n _this4.props.afterPopupVisibleChange(_this4.state.popupVisible);\n }\n };\n\n this.savePopup = function (node) {\n _this4._component = node;\n };\n};\n\n(0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_6__.polyfill)(Trigger);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Trigger);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js?");
|
|
4591
|
+
|
|
4592
|
+
/***/ }),
|
|
4593
|
+
|
|
4594
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js":
|
|
4595
|
+
/*!**************************************************************************!*\
|
|
4596
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js ***!
|
|
4597
|
+
\**************************************************************************/
|
|
4598
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4599
|
+
|
|
4600
|
+
"use strict";
|
|
4601
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getAlignFromPlacement: () => (/* binding */ getAlignFromPlacement),\n/* harmony export */ getAlignPopupClassName: () => (/* binding */ getAlignPopupClassName),\n/* harmony export */ saveRef: () => (/* binding */ saveRef)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n\nfunction isPointsEq(a1, a2, isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nfunction getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, baseAlign, align);\n}\n\nfunction getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n for (var placement in builtinPlacements) {\n if (builtinPlacements.hasOwnProperty(placement)) {\n if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n return prefixCls + '-placement-' + placement;\n }\n }\n }\n return '';\n}\n\nfunction saveRef(name, component) {\n this[name] = component;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js?");
|
|
4602
|
+
|
|
4603
|
+
/***/ }),
|
|
4604
|
+
|
|
4605
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-util/es/ContainerRender.js":
|
|
4606
|
+
/*!*********************************************************************************!*\
|
|
4607
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-util/es/ContainerRender.js ***!
|
|
4608
|
+
\*********************************************************************************/
|
|
4609
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4610
|
+
|
|
4611
|
+
"use strict";
|
|
4612
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ContainerRender)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar ContainerRender = /*#__PURE__*/function (_React$Component) {\n _inherits(ContainerRender, _React$Component);\n\n var _super = _createSuper(ContainerRender);\n\n function ContainerRender() {\n var _this;\n\n _classCallCheck(this, ContainerRender);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _this.removeContainer = function () {\n if (_this.container) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unmountComponentAtNode(_this.container);\n\n _this.container.parentNode.removeChild(_this.container);\n\n _this.container = null;\n }\n };\n\n _this.renderComponent = function (props, ready) {\n var _this$props = _this.props,\n visible = _this$props.visible,\n getComponent = _this$props.getComponent,\n forceRender = _this$props.forceRender,\n getContainer = _this$props.getContainer,\n parent = _this$props.parent;\n\n if (visible || parent._component || forceRender) {\n if (!_this.container) {\n _this.container = getContainer();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {\n if (ready) {\n ready.call(this);\n }\n });\n }\n };\n\n return _this;\n }\n\n _createClass(ContainerRender, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.autoMount) {\n this.renderComponent();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.props.autoMount) {\n this.renderComponent();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.props.autoDestroy) {\n this.removeContainer();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children({\n renderComponent: this.renderComponent,\n removeContainer: this.removeContainer\n });\n }\n }]);\n\n return ContainerRender;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nContainerRender.propTypes = {\n autoMount: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n autoDestroy: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n parent: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired\n};\nContainerRender.defaultProps = {\n autoMount: true,\n autoDestroy: true,\n forceRender: false\n};\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-util/es/ContainerRender.js?");
|
|
4613
|
+
|
|
4614
|
+
/***/ }),
|
|
4615
|
+
|
|
4616
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/addEventListener.js":
|
|
4617
|
+
/*!**************************************************************************************!*\
|
|
4618
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/addEventListener.js ***!
|
|
4619
|
+
\**************************************************************************************/
|
|
4620
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4621
|
+
|
|
4622
|
+
"use strict";
|
|
4623
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ addEventListenerWrap)\n/* harmony export */ });\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! add-dom-event-listener */ \"../../node_modules/add-dom-event-listener/lib/index.js\");\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n\n\nfunction addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates ? function run(e) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates(cb, e);\n } : cb;\n return add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default()(target, eventType, callback, option);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/addEventListener.js?");
|
|
4624
|
+
|
|
4625
|
+
/***/ }),
|
|
4626
|
+
|
|
4627
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/contains.js":
|
|
4628
|
+
/*!******************************************************************************!*\
|
|
4629
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/contains.js ***!
|
|
4630
|
+
\******************************************************************************/
|
|
4631
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4632
|
+
|
|
4633
|
+
"use strict";
|
|
4634
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ contains)\n/* harmony export */ });\nfunction contains(root, n) {\n var node = n;\n\n while (node) {\n if (node === root) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-util/es/Dom/contains.js?");
|
|
4635
|
+
|
|
4636
|
+
/***/ }),
|
|
4637
|
+
|
|
4638
|
+
/***/ "../../node_modules/rc-dropdown/node_modules/rc-util/es/Portal.js":
|
|
4639
|
+
/*!************************************************************************!*\
|
|
4640
|
+
!*** ../../node_modules/rc-dropdown/node_modules/rc-util/es/Portal.js ***!
|
|
4641
|
+
\************************************************************************/
|
|
4642
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4643
|
+
|
|
4644
|
+
"use strict";
|
|
4645
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Portal)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar Portal = /*#__PURE__*/function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n var _super = _createSuper(Portal);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Portal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.createContainer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var didUpdate = this.props.didUpdate;\n\n if (didUpdate) {\n didUpdate(prevProps);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeContainer();\n }\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n this._container = this.props.getContainer();\n this.forceUpdate();\n }\n }, {\n key: \"removeContainer\",\n value: function removeContainer() {\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this._container) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal(this.props.children, this._container);\n }\n\n return null;\n }\n }]);\n\n return Portal;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nPortal.propTypes = {\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node).isRequired,\n didUpdate: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func)\n};\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-util/es/Portal.js?");
|
|
4646
|
+
|
|
4647
|
+
/***/ }),
|
|
4648
|
+
|
|
4649
|
+
/***/ "../../node_modules/rc-input-number/es/InputNumber.js":
|
|
4650
|
+
/*!************************************************************!*\
|
|
4651
|
+
!*** ../../node_modules/rc-input-number/es/InputNumber.js ***!
|
|
4652
|
+
\************************************************************/
|
|
4653
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4654
|
+
|
|
4655
|
+
"use strict";
|
|
4656
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @rc-component/mini-decimal */ \"../../node_modules/@rc-component/mini-decimal/es/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var rc_input__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-input */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/index.js\");\n/* harmony import */ var rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/hooks/useLayoutEffect */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js\");\n/* harmony import */ var rc_util_es_proxyObject__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/proxyObject */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/proxyObject.js\");\n/* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/ref */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/ref.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _hooks_useCursor__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./hooks/useCursor */ \"../../node_modules/rc-input-number/es/hooks/useCursor.js\");\n/* harmony import */ var _StepHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./StepHandler */ \"../../node_modules/rc-input-number/es/StepHandler.js\");\n/* harmony import */ var _utils_numberUtil__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/numberUtil */ \"../../node_modules/rc-input-number/es/utils/numberUtil.js\");\n/* harmony import */ var rc_input_es_utils_commonUtils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! rc-input/es/utils/commonUtils */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js\");\n/* harmony import */ var _hooks_useFrame__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./hooks/useFrame */ \"../../node_modules/rc-input-number/es/hooks/useFrame.js\");\n\n\n\n\n\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"min\", \"max\", \"step\", \"defaultValue\", \"value\", \"disabled\", \"readOnly\", \"upHandler\", \"downHandler\", \"keyboard\", \"changeOnWheel\", \"controls\", \"classNames\", \"stringMode\", \"parser\", \"formatter\", \"precision\", \"decimalSeparator\", \"onChange\", \"onInput\", \"onPressEnter\", \"onStep\", \"changeOnBlur\", \"domRef\"],\n _excluded2 = [\"disabled\", \"style\", \"prefixCls\", \"value\", \"prefix\", \"suffix\", \"addonBefore\", \"addonAfter\", \"className\", \"classNames\"];\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * We support `stringMode` which need handle correct type when user call in onChange\n * format max or min value\n * 1. if isInvalid return null\n * 2. if precision is undefined, return decimal\n * 3. format with precision\n * I. if max > 0, round down with precision. Example: max= 3.5, precision=0 afterFormat: 3\n * II. if max < 0, round up with precision. Example: max= -3.5, precision=0 afterFormat: -4\n * III. if min > 0, round up with precision. Example: min= 3.5, precision=0 afterFormat: 4\n * IV. if min < 0, round down with precision. Example: max= -3.5, precision=0 afterFormat: -3\n */\nvar getDecimalValue = function getDecimalValue(stringMode, decimalValue) {\n if (stringMode || decimalValue.isEmpty()) {\n return decimalValue.toString();\n }\n return decimalValue.toNumber();\n};\nvar getDecimalIfValidate = function getDecimalIfValidate(value) {\n var decimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(value);\n return decimal.isInvalidate() ? null : decimal;\n};\nvar InternalInputNumber = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n min = props.min,\n max = props.max,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n defaultValue = props.defaultValue,\n value = props.value,\n disabled = props.disabled,\n readOnly = props.readOnly,\n upHandler = props.upHandler,\n downHandler = props.downHandler,\n keyboard = props.keyboard,\n _props$changeOnWheel = props.changeOnWheel,\n changeOnWheel = _props$changeOnWheel === void 0 ? false : _props$changeOnWheel,\n _props$controls = props.controls,\n controls = _props$controls === void 0 ? true : _props$controls,\n classNames = props.classNames,\n stringMode = props.stringMode,\n parser = props.parser,\n formatter = props.formatter,\n precision = props.precision,\n decimalSeparator = props.decimalSeparator,\n onChange = props.onChange,\n onInput = props.onInput,\n onPressEnter = props.onPressEnter,\n onStep = props.onStep,\n _props$changeOnBlur = props.changeOnBlur,\n changeOnBlur = _props$changeOnBlur === void 0 ? true : _props$changeOnBlur,\n domRef = props.domRef,\n inputProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props, _excluded);\n var inputClassName = \"\".concat(prefixCls, \"-input\");\n var inputRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(null);\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_11__.useState(false),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState, 2),\n focus = _React$useState2[0],\n setFocus = _React$useState2[1];\n var userTypingRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(false);\n var compositionRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(false);\n var shiftKeyRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(false);\n\n // ============================ Value =============================\n // Real value control\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_11__.useState(function () {\n return (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(value !== null && value !== void 0 ? value : defaultValue);\n }),\n _React$useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState3, 2),\n decimalValue = _React$useState4[0],\n setDecimalValue = _React$useState4[1];\n function setUncontrolledDecimalValue(newDecimal) {\n if (value === undefined) {\n setDecimalValue(newDecimal);\n }\n }\n\n // ====================== Parser & Formatter ======================\n /**\n * `precision` is used for formatter & onChange.\n * It will auto generate by `value` & `step`.\n * But it will not block user typing.\n *\n * Note: Auto generate `precision` is used for legacy logic.\n * We should remove this since we already support high precision with BigInt.\n *\n * @param number Provide which number should calculate precision\n * @param userTyping Change by user typing\n */\n var getPrecision = react__WEBPACK_IMPORTED_MODULE_11__.useCallback(function (numStr, userTyping) {\n if (userTyping) {\n return undefined;\n }\n if (precision >= 0) {\n return precision;\n }\n return Math.max((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.getNumberPrecision)(numStr), (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.getNumberPrecision)(step));\n }, [precision, step]);\n\n // >>> Parser\n var mergedParser = react__WEBPACK_IMPORTED_MODULE_11__.useCallback(function (num) {\n var numStr = String(num);\n if (parser) {\n return parser(numStr);\n }\n var parsedStr = numStr;\n if (decimalSeparator) {\n parsedStr = parsedStr.replace(decimalSeparator, '.');\n }\n\n // [Legacy] We still support auto convert `$ 123,456` to `123456`\n return parsedStr.replace(/[^\\w.-]+/g, '');\n }, [parser, decimalSeparator]);\n\n // >>> Formatter\n var inputValueRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef('');\n var mergedFormatter = react__WEBPACK_IMPORTED_MODULE_11__.useCallback(function (number, userTyping) {\n if (formatter) {\n return formatter(number, {\n userTyping: userTyping,\n input: String(inputValueRef.current)\n });\n }\n var str = typeof number === 'number' ? (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.num2str)(number) : number;\n\n // User typing will not auto format with precision directly\n if (!userTyping) {\n var mergedPrecision = getPrecision(str, userTyping);\n if ((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.validateNumber)(str) && (decimalSeparator || mergedPrecision >= 0)) {\n // Separator\n var separatorStr = decimalSeparator || '.';\n str = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.toFixed)(str, separatorStr, mergedPrecision);\n }\n }\n return str;\n }, [formatter, getPrecision, decimalSeparator]);\n\n // ========================== InputValue ==========================\n /**\n * Input text value control\n *\n * User can not update input content directly. It updates with follow rules by priority:\n * 1. controlled `value` changed\n * * [SPECIAL] Typing like `1.` should not immediately convert to `1`\n * 2. User typing with format (not precision)\n * 3. Blur or Enter trigger revalidate\n */\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_11__.useState(function () {\n var initValue = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;\n if (decimalValue.isInvalidate() && ['string', 'number'].includes((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(initValue))) {\n return Number.isNaN(initValue) ? '' : initValue;\n }\n return mergedFormatter(decimalValue.toString(), false);\n }),\n _React$useState6 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState5, 2),\n inputValue = _React$useState6[0],\n setInternalInputValue = _React$useState6[1];\n inputValueRef.current = inputValue;\n\n // Should always be string\n function setInputValue(newValue, userTyping) {\n setInternalInputValue(mergedFormatter(\n // Invalidate number is sometime passed by external control, we should let it go\n // Otherwise is controlled by internal interactive logic which check by userTyping\n // You can ref 'show limited value when input is not focused' test for more info.\n newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping));\n }\n\n // >>> Max & Min limit\n var maxDecimal = react__WEBPACK_IMPORTED_MODULE_11__.useMemo(function () {\n return getDecimalIfValidate(max);\n }, [max, precision]);\n var minDecimal = react__WEBPACK_IMPORTED_MODULE_11__.useMemo(function () {\n return getDecimalIfValidate(min);\n }, [min, precision]);\n var upDisabled = react__WEBPACK_IMPORTED_MODULE_11__.useMemo(function () {\n if (!maxDecimal || !decimalValue || decimalValue.isInvalidate()) {\n return false;\n }\n return maxDecimal.lessEquals(decimalValue);\n }, [maxDecimal, decimalValue]);\n var downDisabled = react__WEBPACK_IMPORTED_MODULE_11__.useMemo(function () {\n if (!minDecimal || !decimalValue || decimalValue.isInvalidate()) {\n return false;\n }\n return decimalValue.lessEquals(minDecimal);\n }, [minDecimal, decimalValue]);\n\n // Cursor controller\n var _useCursor = (0,_hooks_useCursor__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(inputRef.current, focus),\n _useCursor2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useCursor, 2),\n recordCursor = _useCursor2[0],\n restoreCursor = _useCursor2[1];\n\n // ============================= Data =============================\n /**\n * Find target value closet within range.\n * e.g. [11, 28]:\n * 3 => 11\n * 23 => 23\n * 99 => 28\n */\n var getRangeValue = function getRangeValue(target) {\n // target > max\n if (maxDecimal && !target.lessEquals(maxDecimal)) {\n return maxDecimal;\n }\n\n // target < min\n if (minDecimal && !minDecimal.lessEquals(target)) {\n return minDecimal;\n }\n return null;\n };\n\n /**\n * Check value is in [min, max] range\n */\n var isInRange = function isInRange(target) {\n return !getRangeValue(target);\n };\n\n /**\n * Trigger `onChange` if value validated and not equals of origin.\n * Return the value that re-align in range.\n */\n var triggerValueUpdate = function triggerValueUpdate(newValue, userTyping) {\n var updateValue = newValue;\n var isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();\n\n // Skip align value when trigger value is empty.\n // We just trigger onChange(null)\n // This should not block user typing\n if (!updateValue.isEmpty() && !userTyping) {\n // Revert value in range if needed\n updateValue = getRangeValue(updateValue) || updateValue;\n isRangeValidate = true;\n }\n if (!readOnly && !disabled && isRangeValidate) {\n var numStr = updateValue.toString();\n var mergedPrecision = getPrecision(numStr, userTyping);\n if (mergedPrecision >= 0) {\n updateValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.toFixed)(numStr, '.', mergedPrecision));\n\n // When to fixed. The value may out of min & max range.\n // 4 in [0, 3.8] => 3.8 => 4 (toFixed)\n if (!isInRange(updateValue)) {\n updateValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__.toFixed)(numStr, '.', mergedPrecision, true));\n }\n }\n\n // Trigger event\n if (!updateValue.equals(decimalValue)) {\n setUncontrolledDecimalValue(updateValue);\n onChange === null || onChange === void 0 || onChange(updateValue.isEmpty() ? null : getDecimalValue(stringMode, updateValue));\n\n // Reformat input if value is not controlled\n if (value === undefined) {\n setInputValue(updateValue, userTyping);\n }\n }\n return updateValue;\n }\n return decimalValue;\n };\n\n // ========================== User Input ==========================\n var onNextPromise = (0,_hooks_useFrame__WEBPACK_IMPORTED_MODULE_16__[\"default\"])();\n\n // >>> Collect input value\n var collectInputValue = function collectInputValue(inputStr) {\n recordCursor();\n\n // Update inputValue in case input can not parse as number\n // Refresh ref value immediately since it may used by formatter\n inputValueRef.current = inputStr;\n setInternalInputValue(inputStr);\n\n // Parse number\n if (!compositionRef.current) {\n var finalValue = mergedParser(inputStr);\n var finalDecimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(finalValue);\n if (!finalDecimal.isNaN()) {\n triggerValueUpdate(finalDecimal, true);\n }\n }\n\n // Trigger onInput later to let user customize value if they want to handle something after onChange\n onInput === null || onInput === void 0 || onInput(inputStr);\n\n // optimize for chinese input experience\n // https://github.com/ant-design/ant-design/issues/8196\n onNextPromise(function () {\n var nextInputStr = inputStr;\n if (!parser) {\n nextInputStr = inputStr.replace(/。/g, '.');\n }\n if (nextInputStr !== inputStr) {\n collectInputValue(nextInputStr);\n }\n });\n };\n\n // >>> Composition\n var onCompositionStart = function onCompositionStart() {\n compositionRef.current = true;\n };\n var onCompositionEnd = function onCompositionEnd() {\n compositionRef.current = false;\n collectInputValue(inputRef.current.value);\n };\n\n // >>> Input\n var onInternalInput = function onInternalInput(e) {\n collectInputValue(e.target.value);\n };\n\n // ============================= Step =============================\n var onInternalStep = function onInternalStep(up) {\n var _inputRef$current;\n // Ignore step since out of range\n if (up && upDisabled || !up && downDisabled) {\n return;\n }\n\n // Clear typing status since it may be caused by up & down key.\n // We should sync with input value.\n userTypingRef.current = false;\n var stepDecimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(shiftKeyRef.current ? (0,_utils_numberUtil__WEBPACK_IMPORTED_MODULE_14__.getDecupleSteps)(step) : step);\n if (!up) {\n stepDecimal = stepDecimal.negate();\n }\n var target = (decimalValue || (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(0)).add(stepDecimal.toString());\n var updatedValue = triggerValueUpdate(target, false);\n onStep === null || onStep === void 0 || onStep(getDecimalValue(stringMode, updatedValue), {\n offset: shiftKeyRef.current ? (0,_utils_numberUtil__WEBPACK_IMPORTED_MODULE_14__.getDecupleSteps)(step) : step,\n type: up ? 'up' : 'down'\n });\n (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();\n };\n\n // ============================ Flush =============================\n /**\n * Flush current input content to trigger value change & re-formatter input if needed.\n * This will always flush input value for update.\n * If it's invalidate, will fallback to last validate value.\n */\n var flushInputValue = function flushInputValue(userTyping) {\n var parsedValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(mergedParser(inputValue));\n var formatValue;\n if (!parsedValue.isNaN()) {\n // Only validate value or empty value can be re-fill to inputValue\n // Reassign the formatValue within ranged of trigger control\n formatValue = triggerValueUpdate(parsedValue, userTyping);\n } else {\n formatValue = triggerValueUpdate(decimalValue, userTyping);\n }\n if (value !== undefined) {\n // Reset back with controlled value first\n setInputValue(decimalValue, false);\n } else if (!formatValue.isNaN()) {\n // Reset input back since no validate value\n setInputValue(formatValue, false);\n }\n };\n\n // Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)\n var onBeforeInput = function onBeforeInput() {\n userTypingRef.current = true;\n };\n var onKeyDown = function onKeyDown(event) {\n var key = event.key,\n shiftKey = event.shiftKey;\n userTypingRef.current = true;\n shiftKeyRef.current = shiftKey;\n if (key === 'Enter') {\n if (!compositionRef.current) {\n userTypingRef.current = false;\n }\n flushInputValue(false);\n onPressEnter === null || onPressEnter === void 0 || onPressEnter(event);\n }\n if (keyboard === false) {\n return;\n }\n\n // Do step\n if (!compositionRef.current && ['Up', 'ArrowUp', 'Down', 'ArrowDown'].includes(key)) {\n onInternalStep(key === 'Up' || key === 'ArrowUp');\n event.preventDefault();\n }\n };\n var onKeyUp = function onKeyUp() {\n userTypingRef.current = false;\n shiftKeyRef.current = false;\n };\n react__WEBPACK_IMPORTED_MODULE_11__.useEffect(function () {\n if (changeOnWheel && focus) {\n var onWheel = function onWheel(event) {\n // moving mouse wheel rises wheel event with deltaY < 0\n // scroll value grows from top to bottom, as screen Y coordinate\n onInternalStep(event.deltaY < 0);\n event.preventDefault();\n };\n var input = inputRef.current;\n if (input) {\n // React onWheel is passive and we can't preventDefault() in it.\n // That's why we should subscribe with DOM listener\n // https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev\n input.addEventListener('wheel', onWheel, {\n passive: false\n });\n return function () {\n return input.removeEventListener('wheel', onWheel);\n };\n }\n }\n });\n\n // >>> Focus & Blur\n var onBlur = function onBlur() {\n if (changeOnBlur) {\n flushInputValue(false);\n }\n setFocus(false);\n userTypingRef.current = false;\n };\n\n // ========================== Controlled ==========================\n // Input by precision & formatter\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n if (!decimalValue.isInvalidate()) {\n setInputValue(decimalValue, false);\n }\n }, [precision, formatter]);\n\n // Input by value\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n var newValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(value);\n setDecimalValue(newValue);\n var currentParsedValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(mergedParser(inputValue));\n\n // When user typing from `1.2` to `1.`, we should not convert to `1` immediately.\n // But let it go if user set `formatter`\n if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {\n // Update value as effect\n setInputValue(newValue, userTypingRef.current);\n }\n }, [value]);\n\n // ============================ Cursor ============================\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n if (formatter) {\n restoreCursor();\n }\n }, [inputValue]);\n\n // ============================ Render ============================\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(\"div\", {\n ref: domRef,\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, \"\".concat(prefixCls, \"-focused\"), focus), \"\".concat(prefixCls, \"-disabled\"), disabled), \"\".concat(prefixCls, \"-readonly\"), readOnly), \"\".concat(prefixCls, \"-not-a-number\"), decimalValue.isNaN()), \"\".concat(prefixCls, \"-out-of-range\"), !decimalValue.isInvalidate() && !isInRange(decimalValue))),\n style: style,\n onFocus: function onFocus() {\n setFocus(true);\n },\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onCompositionStart: onCompositionStart,\n onCompositionEnd: onCompositionEnd,\n onBeforeInput: onBeforeInput\n }, controls && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(_StepHandler__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n prefixCls: prefixCls,\n upNode: upHandler,\n downNode: downHandler,\n upDisabled: upDisabled,\n downDisabled: downDisabled,\n onStep: onInternalStep\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(\"div\", {\n className: \"\".concat(inputClassName, \"-wrap\")\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(\"input\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n autoComplete: \"off\",\n role: \"spinbutton\",\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": decimalValue.isInvalidate() ? null : decimalValue.toString(),\n step: step\n }, inputProps, {\n ref: (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_10__.composeRef)(inputRef, ref),\n className: inputClassName,\n value: inputValue,\n onChange: onInternalInput,\n disabled: disabled,\n readOnly: readOnly\n }))));\n});\nvar InputNumber = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.forwardRef(function (props, ref) {\n var disabled = props.disabled,\n style = props.style,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-input-number' : _props$prefixCls,\n value = props.value,\n prefix = props.prefix,\n suffix = props.suffix,\n addonBefore = props.addonBefore,\n addonAfter = props.addonAfter,\n className = props.className,\n classNames = props.classNames,\n rest = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props, _excluded2);\n var holderRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(null);\n var inputNumberDomRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(null);\n var inputFocusRef = react__WEBPACK_IMPORTED_MODULE_11__.useRef(null);\n var focus = function focus(option) {\n if (inputFocusRef.current) {\n (0,rc_input_es_utils_commonUtils__WEBPACK_IMPORTED_MODULE_15__.triggerFocus)(inputFocusRef.current, option);\n }\n };\n react__WEBPACK_IMPORTED_MODULE_11__.useImperativeHandle(ref, function () {\n return (0,rc_util_es_proxyObject__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(inputFocusRef.current, {\n focus: focus,\n nativeElement: holderRef.current.nativeElement || inputNumberDomRef.current\n });\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(rc_input__WEBPACK_IMPORTED_MODULE_7__.BaseInput, {\n className: className,\n triggerFocus: focus,\n prefixCls: prefixCls,\n value: value,\n disabled: disabled,\n style: style,\n prefix: prefix,\n suffix: suffix,\n addonAfter: addonAfter,\n addonBefore: addonBefore,\n classNames: classNames,\n components: {\n affixWrapper: 'div',\n groupWrapper: 'div',\n wrapper: 'div',\n groupAddon: 'div'\n },\n ref: holderRef\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__.createElement(InternalInputNumber, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prefixCls: prefixCls,\n disabled: disabled,\n ref: inputFocusRef,\n domRef: inputNumberDomRef,\n className: classNames === null || classNames === void 0 ? void 0 : classNames.input\n }, rest)));\n});\nif (true) {\n InputNumber.displayName = 'InputNumber';\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputNumber);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/InputNumber.js?");
|
|
4657
|
+
|
|
4658
|
+
/***/ }),
|
|
4659
|
+
|
|
4660
|
+
/***/ "../../node_modules/rc-input-number/es/StepHandler.js":
|
|
4661
|
+
/*!************************************************************!*\
|
|
4662
|
+
!*** ../../node_modules/rc-input-number/es/StepHandler.js ***!
|
|
4663
|
+
\************************************************************/
|
|
4664
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4665
|
+
|
|
4666
|
+
"use strict";
|
|
4667
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ StepHandler)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var rc_util_es_hooks_useMobile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useMobile */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMobile.js\");\n/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/raf */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/raf.js\");\n\n\n/* eslint-disable react/no-unknown-property */\n\n\n\n\n\n/**\n * When click and hold on a button - the speed of auto changing the value.\n */\nvar STEP_INTERVAL = 200;\n\n/**\n * When click and hold on a button - the delay before auto changing the value.\n */\nvar STEP_DELAY = 600;\nfunction StepHandler(_ref) {\n var prefixCls = _ref.prefixCls,\n upNode = _ref.upNode,\n downNode = _ref.downNode,\n upDisabled = _ref.upDisabled,\n downDisabled = _ref.downDisabled,\n onStep = _ref.onStep;\n // ======================== Step ========================\n var stepTimeoutRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef();\n var frameIds = react__WEBPACK_IMPORTED_MODULE_2__.useRef([]);\n var onStepRef = react__WEBPACK_IMPORTED_MODULE_2__.useRef();\n onStepRef.current = onStep;\n var onStopStep = function onStopStep() {\n clearTimeout(stepTimeoutRef.current);\n };\n\n // We will interval update step when hold mouse down\n var onStepMouseDown = function onStepMouseDown(e, up) {\n e.preventDefault();\n onStopStep();\n onStepRef.current(up);\n\n // Loop step for interval\n function loopStep() {\n onStepRef.current(up);\n stepTimeoutRef.current = setTimeout(loopStep, STEP_INTERVAL);\n }\n\n // First time press will wait some time to trigger loop step update\n stepTimeoutRef.current = setTimeout(loopStep, STEP_DELAY);\n };\n react__WEBPACK_IMPORTED_MODULE_2__.useEffect(function () {\n return function () {\n onStopStep();\n frameIds.current.forEach(function (id) {\n return rc_util_es_raf__WEBPACK_IMPORTED_MODULE_5__[\"default\"].cancel(id);\n });\n };\n }, []);\n\n // ======================= Render =======================\n var isMobile = (0,rc_util_es_hooks_useMobile__WEBPACK_IMPORTED_MODULE_4__[\"default\"])();\n if (isMobile) {\n return null;\n }\n var handlerClassName = \"\".concat(prefixCls, \"-handler\");\n var upClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(handlerClassName, \"\".concat(handlerClassName, \"-up\"), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, \"\".concat(handlerClassName, \"-up-disabled\"), upDisabled));\n var downClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(handlerClassName, \"\".concat(handlerClassName, \"-down\"), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, \"\".concat(handlerClassName, \"-down-disabled\"), downDisabled));\n\n // fix: https://github.com/ant-design/ant-design/issues/43088\n // In Safari, When we fire onmousedown and onmouseup events in quick succession, \n // there may be a problem that the onmouseup events are executed first, \n // resulting in a disordered program execution.\n // So, we need to use requestAnimationFrame to ensure that the onmouseup event is executed after the onmousedown event.\n var safeOnStopStep = function safeOnStopStep() {\n return frameIds.current.push((0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(onStopStep));\n };\n var sharedHandlerProps = {\n unselectable: 'on',\n role: 'button',\n onMouseUp: safeOnStopStep,\n onMouseLeave: safeOnStopStep\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"div\", {\n className: \"\".concat(handlerClassName, \"-wrap\")\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sharedHandlerProps, {\n onMouseDown: function onMouseDown(e) {\n onStepMouseDown(e, true);\n },\n \"aria-label\": \"Increase Value\",\n \"aria-disabled\": upDisabled,\n className: upClassName\n }), upNode || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-up-inner\")\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sharedHandlerProps, {\n onMouseDown: function onMouseDown(e) {\n onStepMouseDown(e, false);\n },\n \"aria-label\": \"Decrease Value\",\n \"aria-disabled\": downDisabled,\n className: downClassName\n }), downNode || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", {\n unselectable: \"on\",\n className: \"\".concat(prefixCls, \"-handler-down-inner\")\n })));\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/StepHandler.js?");
|
|
4668
|
+
|
|
4669
|
+
/***/ }),
|
|
4670
|
+
|
|
4671
|
+
/***/ "../../node_modules/rc-input-number/es/hooks/useCursor.js":
|
|
4672
|
+
/*!****************************************************************!*\
|
|
4673
|
+
!*** ../../node_modules/rc-input-number/es/hooks/useCursor.js ***!
|
|
4674
|
+
\****************************************************************/
|
|
4675
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4676
|
+
|
|
4677
|
+
"use strict";
|
|
4678
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useCursor)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/warning */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/warning.js\");\n\n\n/**\n * Keep input cursor in the correct position if possible.\n * Is this necessary since we have `formatter` which may mass the content?\n */\nfunction useCursor(input, focused) {\n var selectionRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n function recordCursor() {\n // Record position\n try {\n var start = input.selectionStart,\n end = input.selectionEnd,\n value = input.value;\n var beforeTxt = value.substring(0, start);\n var afterTxt = value.substring(end);\n selectionRef.current = {\n start: start,\n end: end,\n value: value,\n beforeTxt: beforeTxt,\n afterTxt: afterTxt\n };\n } catch (e) {\n // Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n }\n\n /**\n * Restore logic:\n * 1. back string same\n * 2. start string same\n */\n function restoreCursor() {\n if (input && selectionRef.current && focused) {\n try {\n var value = input.value;\n var _selectionRef$current = selectionRef.current,\n beforeTxt = _selectionRef$current.beforeTxt,\n afterTxt = _selectionRef$current.afterTxt,\n start = _selectionRef$current.start;\n var startPos = value.length;\n if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.current.afterTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n input.setSelectionRange(startPos, startPos);\n } catch (e) {\n (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }\n return [recordCursor, restoreCursor];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/hooks/useCursor.js?");
|
|
4679
|
+
|
|
4680
|
+
/***/ }),
|
|
4681
|
+
|
|
4682
|
+
/***/ "../../node_modules/rc-input-number/es/hooks/useFrame.js":
|
|
4683
|
+
/*!***************************************************************!*\
|
|
4684
|
+
!*** ../../node_modules/rc-input-number/es/hooks/useFrame.js ***!
|
|
4685
|
+
\***************************************************************/
|
|
4686
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4687
|
+
|
|
4688
|
+
"use strict";
|
|
4689
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/raf */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/raf.js\");\n\n\n\n/**\n * Always trigger latest once when call multiple time\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () {\n var idRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var cleanUp = function cleanUp() {\n rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__[\"default\"].cancel(idRef.current);\n };\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n return cleanUp;\n }, []);\n return function (callback) {\n cleanUp();\n idRef.current = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function () {\n callback();\n });\n };\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/hooks/useFrame.js?");
|
|
4690
|
+
|
|
4691
|
+
/***/ }),
|
|
4692
|
+
|
|
4693
|
+
/***/ "../../node_modules/rc-input-number/es/index.js":
|
|
4694
|
+
/*!******************************************************!*\
|
|
4695
|
+
!*** ../../node_modules/rc-input-number/es/index.js ***!
|
|
4696
|
+
\******************************************************/
|
|
4697
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4698
|
+
|
|
4699
|
+
"use strict";
|
|
4700
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _InputNumber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputNumber */ \"../../node_modules/rc-input-number/es/InputNumber.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_InputNumber__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/index.js?");
|
|
4701
|
+
|
|
4702
|
+
/***/ }),
|
|
4703
|
+
|
|
4704
|
+
/***/ "../../node_modules/rc-input-number/es/utils/numberUtil.js":
|
|
4705
|
+
/*!*****************************************************************!*\
|
|
4706
|
+
!*** ../../node_modules/rc-input-number/es/utils/numberUtil.js ***!
|
|
4707
|
+
\*****************************************************************/
|
|
4708
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4709
|
+
|
|
4710
|
+
"use strict";
|
|
4711
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getDecupleSteps: () => (/* binding */ getDecupleSteps)\n/* harmony export */ });\n/* harmony import */ var _rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rc-component/mini-decimal */ \"../../node_modules/@rc-component/mini-decimal/es/index.js\");\n\nfunction getDecupleSteps(step) {\n var stepStr = typeof step === 'number' ? (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_0__.num2str)(step) : (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_0__.trimNumber)(step).fullStr;\n var hasPoint = stepStr.includes('.');\n if (!hasPoint) {\n return step + '0';\n }\n return (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_0__.trimNumber)(stepStr.replace(/(\\d)\\.(\\d)/g, '$1$2.')).fullStr;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/utils/numberUtil.js?");
|
|
4712
|
+
|
|
4713
|
+
/***/ }),
|
|
4714
|
+
|
|
4715
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-input/es/BaseInput.js":
|
|
4716
|
+
/*!********************************************************************************!*\
|
|
4717
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-input/es/BaseInput.js ***!
|
|
4718
|
+
\********************************************************************************/
|
|
4719
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4720
|
+
|
|
4721
|
+
"use strict";
|
|
4722
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_commonUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/commonUtils */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js\");\n\n\n\n\n\n\n\nvar BaseInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().forwardRef(function (props, ref) {\n var _props, _props2, _props3;\n var inputEl = props.inputElement,\n children = props.children,\n prefixCls = props.prefixCls,\n prefix = props.prefix,\n suffix = props.suffix,\n addonBefore = props.addonBefore,\n addonAfter = props.addonAfter,\n className = props.className,\n style = props.style,\n disabled = props.disabled,\n readOnly = props.readOnly,\n focused = props.focused,\n triggerFocus = props.triggerFocus,\n allowClear = props.allowClear,\n value = props.value,\n handleReset = props.handleReset,\n hidden = props.hidden,\n classes = props.classes,\n classNames = props.classNames,\n dataAttrs = props.dataAttrs,\n styles = props.styles,\n components = props.components,\n onClear = props.onClear;\n var inputElement = children !== null && children !== void 0 ? children : inputEl;\n var AffixWrapperComponent = (components === null || components === void 0 ? void 0 : components.affixWrapper) || 'span';\n var GroupWrapperComponent = (components === null || components === void 0 ? void 0 : components.groupWrapper) || 'span';\n var WrapperComponent = (components === null || components === void 0 ? void 0 : components.wrapper) || 'span';\n var GroupAddonComponent = (components === null || components === void 0 ? void 0 : components.groupAddon) || 'span';\n var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n var onInputClick = function onInputClick(e) {\n var _containerRef$current;\n if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {\n triggerFocus === null || triggerFocus === void 0 || triggerFocus();\n }\n };\n var hasAffix = (0,_utils_commonUtils__WEBPACK_IMPORTED_MODULE_6__.hasPrefixSuffix)(props);\n var element = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_5__.cloneElement)(inputElement, {\n value: value,\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()((_props = inputElement.props) === null || _props === void 0 ? void 0 : _props.className, !hasAffix && (classNames === null || classNames === void 0 ? void 0 : classNames.variant)) || null\n });\n\n // ======================== Ref ======================== //\n var groupRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n react__WEBPACK_IMPORTED_MODULE_5___default().useImperativeHandle(ref, function () {\n return {\n nativeElement: groupRef.current || containerRef.current\n };\n });\n\n // ================== Prefix & Suffix ================== //\n if (hasAffix) {\n // ================== Clear Icon ================== //\n var clearIcon = null;\n if (allowClear) {\n var needClear = !disabled && !readOnly && value;\n var clearIconCls = \"\".concat(prefixCls, \"-clear-icon\");\n var iconNode = (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(allowClear) === 'object' && allowClear !== null && allowClear !== void 0 && allowClear.clearIcon ? allowClear.clearIcon : '✖';\n clearIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"button\", {\n type: \"button\",\n onClick: function onClick(event) {\n handleReset === null || handleReset === void 0 || handleReset(event);\n onClear === null || onClear === void 0 || onClear();\n }\n // Do not trigger onBlur when clear input\n // https://github.com/ant-design/ant-design/issues/31200\n ,\n onMouseDown: function onMouseDown(e) {\n return e.preventDefault();\n },\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(clearIconCls, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(clearIconCls, \"-hidden\"), !needClear), \"\".concat(clearIconCls, \"-has-suffix\"), !!suffix))\n }, iconNode);\n }\n var affixWrapperPrefixCls = \"\".concat(prefixCls, \"-affix-wrapper\");\n var affixWrapperCls = classnames__WEBPACK_IMPORTED_MODULE_4___default()(affixWrapperPrefixCls, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(prefixCls, \"-disabled\"), disabled), \"\".concat(affixWrapperPrefixCls, \"-disabled\"), disabled), \"\".concat(affixWrapperPrefixCls, \"-focused\"), focused), \"\".concat(affixWrapperPrefixCls, \"-readonly\"), readOnly), \"\".concat(affixWrapperPrefixCls, \"-input-with-clear-btn\"), suffix && allowClear && value), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.variant);\n var suffixNode = (suffix || allowClear) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"span\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(\"\".concat(prefixCls, \"-suffix\"), classNames === null || classNames === void 0 ? void 0 : classNames.suffix),\n style: styles === null || styles === void 0 ? void 0 : styles.suffix\n }, clearIcon, suffix);\n element = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(AffixWrapperComponent, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: affixWrapperCls,\n style: styles === null || styles === void 0 ? void 0 : styles.affixWrapper,\n onClick: onInputClick\n }, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.affixWrapper, {\n ref: containerRef\n }), prefix && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"span\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(\"\".concat(prefixCls, \"-prefix\"), classNames === null || classNames === void 0 ? void 0 : classNames.prefix),\n style: styles === null || styles === void 0 ? void 0 : styles.prefix\n }, prefix), element, suffixNode);\n }\n\n // ================== Addon ================== //\n if ((0,_utils_commonUtils__WEBPACK_IMPORTED_MODULE_6__.hasAddon)(props)) {\n var wrapperCls = \"\".concat(prefixCls, \"-group\");\n var addonCls = \"\".concat(wrapperCls, \"-addon\");\n var groupWrapperCls = \"\".concat(wrapperCls, \"-wrapper\");\n var mergedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(\"\".concat(prefixCls, \"-wrapper\"), wrapperCls, classes === null || classes === void 0 ? void 0 : classes.wrapper, classNames === null || classNames === void 0 ? void 0 : classNames.wrapper);\n var mergedGroupClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(groupWrapperCls, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(groupWrapperCls, \"-disabled\"), disabled), classes === null || classes === void 0 ? void 0 : classes.group, classNames === null || classNames === void 0 ? void 0 : classNames.groupWrapper);\n\n // Need another wrapper for changing display:table to display:inline-block\n // and put style prop in wrapper\n element = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(GroupWrapperComponent, {\n className: mergedGroupClassName,\n ref: groupRef\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(WrapperComponent, {\n className: mergedWrapperClassName\n }, addonBefore && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(GroupAddonComponent, {\n className: addonCls\n }, addonBefore), element, addonAfter && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(GroupAddonComponent, {\n className: addonCls\n }, addonAfter)));\n }\n\n // `className` and `style` are always on the root element\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().cloneElement(element, {\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()((_props2 = element.props) === null || _props2 === void 0 ? void 0 : _props2.className, className) || null,\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, (_props3 = element.props) === null || _props3 === void 0 ? void 0 : _props3.style), style),\n hidden: hidden\n });\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseInput);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-input/es/BaseInput.js?");
|
|
4723
|
+
|
|
4724
|
+
/***/ }),
|
|
4725
|
+
|
|
4726
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-input/es/Input.js":
|
|
4727
|
+
/*!****************************************************************************!*\
|
|
4728
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-input/es/Input.js ***!
|
|
4729
|
+
\****************************************************************************/
|
|
4730
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4731
|
+
|
|
4732
|
+
"use strict";
|
|
4733
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMergedState.js\");\n/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/omit.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _BaseInput__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./BaseInput */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/BaseInput.js\");\n/* harmony import */ var _hooks_useCount__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hooks/useCount */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/hooks/useCount.js\");\n/* harmony import */ var _utils_commonUtils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/commonUtils */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js\");\n\n\n\n\n\n\nvar _excluded = [\"autoComplete\", \"onChange\", \"onFocus\", \"onBlur\", \"onPressEnter\", \"onKeyDown\", \"onKeyUp\", \"prefixCls\", \"disabled\", \"htmlSize\", \"className\", \"maxLength\", \"suffix\", \"showCount\", \"count\", \"type\", \"classes\", \"classNames\", \"styles\", \"onCompositionStart\", \"onCompositionEnd\"];\n\n\n\n\n\n\n\nvar Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_9__.forwardRef)(function (props, ref) {\n var autoComplete = props.autoComplete,\n onChange = props.onChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onPressEnter = props.onPressEnter,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-input' : _props$prefixCls,\n disabled = props.disabled,\n htmlSize = props.htmlSize,\n className = props.className,\n maxLength = props.maxLength,\n suffix = props.suffix,\n showCount = props.showCount,\n count = props.count,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n classes = props.classes,\n classNames = props.classNames,\n styles = props.styles,\n _onCompositionStart = props.onCompositionStart,\n onCompositionEnd = props.onCompositionEnd,\n rest = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(props, _excluded);\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_9__.useState)(false),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState, 2),\n focused = _useState2[0],\n setFocused = _useState2[1];\n var compositionRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(false);\n var keyLockRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(false);\n var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);\n var holderRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);\n var focus = function focus(option) {\n if (inputRef.current) {\n (0,_utils_commonUtils__WEBPACK_IMPORTED_MODULE_12__.triggerFocus)(inputRef.current, option);\n }\n };\n\n // ====================== Value =======================\n var _useMergedState = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(props.defaultValue, {\n value: props.value\n }),\n _useMergedState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useMergedState, 2),\n value = _useMergedState2[0],\n setValue = _useMergedState2[1];\n var formatValue = value === undefined || value === null ? '' : String(value);\n\n // =================== Select Range ===================\n var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_9__.useState)(null),\n _useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState3, 2),\n selection = _useState4[0],\n setSelection = _useState4[1];\n\n // ====================== Count =======================\n var countConfig = (0,_hooks_useCount__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(count, showCount);\n var mergedMax = countConfig.max || maxLength;\n var valueLength = countConfig.strategy(formatValue);\n var isOutOfRange = !!mergedMax && valueLength > mergedMax;\n\n // ======================= Ref ========================\n (0,react__WEBPACK_IMPORTED_MODULE_9__.useImperativeHandle)(ref, function () {\n var _holderRef$current;\n return {\n focus: focus,\n blur: function blur() {\n var _inputRef$current;\n (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();\n },\n setSelectionRange: function setSelectionRange(start, end, direction) {\n var _inputRef$current2;\n (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.setSelectionRange(start, end, direction);\n },\n select: function select() {\n var _inputRef$current3;\n (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();\n },\n input: inputRef.current,\n nativeElement: ((_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.nativeElement) || inputRef.current\n };\n });\n (0,react__WEBPACK_IMPORTED_MODULE_9__.useEffect)(function () {\n if (keyLockRef.current) {\n keyLockRef.current = false;\n }\n setFocused(function (prev) {\n return prev && disabled ? false : prev;\n });\n }, [disabled]);\n var triggerChange = function triggerChange(e, currentValue, info) {\n var cutValue = currentValue;\n if (!compositionRef.current && countConfig.exceedFormatter && countConfig.max && countConfig.strategy(currentValue) > countConfig.max) {\n cutValue = countConfig.exceedFormatter(currentValue, {\n max: countConfig.max\n });\n if (currentValue !== cutValue) {\n var _inputRef$current4, _inputRef$current5;\n setSelection([((_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.selectionStart) || 0, ((_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.selectionEnd) || 0]);\n }\n } else if (info.source === 'compositionEnd') {\n // Avoid triggering twice\n // https://github.com/ant-design/ant-design/issues/46587\n return;\n }\n setValue(cutValue);\n if (inputRef.current) {\n (0,_utils_commonUtils__WEBPACK_IMPORTED_MODULE_12__.resolveOnChange)(inputRef.current, e, onChange, cutValue);\n }\n };\n (0,react__WEBPACK_IMPORTED_MODULE_9__.useEffect)(function () {\n if (selection) {\n var _inputRef$current6;\n (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 || _inputRef$current6.setSelectionRange.apply(_inputRef$current6, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(selection));\n }\n }, [selection]);\n var onInternalChange = function onInternalChange(e) {\n triggerChange(e, e.target.value, {\n source: 'change'\n });\n };\n var onInternalCompositionEnd = function onInternalCompositionEnd(e) {\n compositionRef.current = false;\n triggerChange(e, e.currentTarget.value, {\n source: 'compositionEnd'\n });\n onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);\n };\n var handleKeyDown = function handleKeyDown(e) {\n if (onPressEnter && e.key === 'Enter' && !keyLockRef.current) {\n keyLockRef.current = true;\n onPressEnter(e);\n }\n onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);\n };\n var handleKeyUp = function handleKeyUp(e) {\n if (e.key === 'Enter') {\n keyLockRef.current = false;\n }\n onKeyUp === null || onKeyUp === void 0 || onKeyUp(e);\n };\n var handleFocus = function handleFocus(e) {\n setFocused(true);\n onFocus === null || onFocus === void 0 || onFocus(e);\n };\n var handleBlur = function handleBlur(e) {\n if (keyLockRef.current) {\n keyLockRef.current = false;\n }\n setFocused(false);\n onBlur === null || onBlur === void 0 || onBlur(e);\n };\n var handleReset = function handleReset(e) {\n setValue('');\n focus();\n if (inputRef.current) {\n (0,_utils_commonUtils__WEBPACK_IMPORTED_MODULE_12__.resolveOnChange)(inputRef.current, e, onChange);\n }\n };\n\n // ====================== Input =======================\n var outOfRangeCls = isOutOfRange && \"\".concat(prefixCls, \"-out-of-range\");\n var getInputElement = function getInputElement() {\n // Fix https://fb.me/react-unknown-prop\n var otherProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear',\n // Input elements must be either controlled or uncontrolled,\n // specify either the value prop, or the defaultValue prop, but not both.\n 'defaultValue', 'showCount', 'count', 'classes', 'htmlSize', 'styles', 'classNames', 'onClear']);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"input\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n autoComplete: autoComplete\n }, otherProps, {\n onChange: onInternalChange,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(prefixCls, \"-disabled\"), disabled), classNames === null || classNames === void 0 ? void 0 : classNames.input),\n style: styles === null || styles === void 0 ? void 0 : styles.input,\n ref: inputRef,\n size: htmlSize,\n type: type,\n onCompositionStart: function onCompositionStart(e) {\n compositionRef.current = true;\n _onCompositionStart === null || _onCompositionStart === void 0 || _onCompositionStart(e);\n },\n onCompositionEnd: onInternalCompositionEnd\n }));\n };\n var getSuffix = function getSuffix() {\n // Max length value\n var hasMaxLength = Number(mergedMax) > 0;\n if (suffix || countConfig.show) {\n var dataCount = countConfig.showFormatter ? countConfig.showFormatter({\n value: formatValue,\n count: valueLength,\n maxLength: mergedMax\n }) : \"\".concat(valueLength).concat(hasMaxLength ? \" / \".concat(mergedMax) : '');\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement((react__WEBPACK_IMPORTED_MODULE_9___default().Fragment), null, countConfig.show && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"span\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-show-count-suffix\"), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(prefixCls, \"-show-count-has-suffix\"), !!suffix), classNames === null || classNames === void 0 ? void 0 : classNames.count),\n style: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, styles === null || styles === void 0 ? void 0 : styles.count)\n }, dataCount), suffix);\n }\n return null;\n };\n\n // ====================== Render ======================\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_BaseInput__WEBPACK_IMPORTED_MODULE_10__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, rest, {\n prefixCls: prefixCls,\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(className, outOfRangeCls),\n handleReset: handleReset,\n value: formatValue,\n focused: focused,\n triggerFocus: focus,\n suffix: getSuffix(),\n disabled: disabled,\n classes: classes,\n classNames: classNames,\n styles: styles\n }), getInputElement());\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Input);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-input/es/Input.js?");
|
|
4734
|
+
|
|
4735
|
+
/***/ }),
|
|
4736
|
+
|
|
4737
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-input/es/hooks/useCount.js":
|
|
4738
|
+
/*!*************************************************************************************!*\
|
|
4739
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-input/es/hooks/useCount.js ***!
|
|
4740
|
+
\*************************************************************************************/
|
|
4741
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4742
|
+
|
|
4743
|
+
"use strict";
|
|
4744
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useCount),\n/* harmony export */ inCountRange: () => (/* binding */ inCountRange)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\nvar _excluded = [\"show\"];\n\n/**\n * Cut `value` by the `count.max` prop.\n */\nfunction inCountRange(value, countConfig) {\n if (!countConfig.max) {\n return true;\n }\n var count = countConfig.strategy(value);\n return count <= countConfig.max;\n}\nfunction useCount(count, showCount) {\n return react__WEBPACK_IMPORTED_MODULE_3__.useMemo(function () {\n var mergedConfig = {};\n if (showCount) {\n mergedConfig.show = (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(showCount) === 'object' && showCount.formatter ? showCount.formatter : !!showCount;\n }\n mergedConfig = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, mergedConfig), count);\n var _ref = mergedConfig,\n show = _ref.show,\n rest = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, _excluded);\n return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, rest), {}, {\n show: !!show,\n showFormatter: typeof show === 'function' ? show : undefined,\n strategy: rest.strategy || function (value) {\n return value.length;\n }\n });\n }, [count, showCount]);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-input/es/hooks/useCount.js?");
|
|
4745
|
+
|
|
4746
|
+
/***/ }),
|
|
4747
|
+
|
|
4748
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-input/es/index.js":
|
|
4749
|
+
/*!****************************************************************************!*\
|
|
4750
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-input/es/index.js ***!
|
|
4751
|
+
\****************************************************************************/
|
|
4752
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4753
|
+
|
|
4754
|
+
"use strict";
|
|
4755
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseInput: () => (/* reexport safe */ _BaseInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _BaseInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseInput */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/BaseInput.js\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Input */ \"../../node_modules/rc-input-number/node_modules/rc-input/es/Input.js\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Input__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-input/es/index.js?");
|
|
4756
|
+
|
|
4757
|
+
/***/ }),
|
|
4758
|
+
|
|
4759
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js":
|
|
4760
|
+
/*!****************************************************************************************!*\
|
|
4761
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js ***!
|
|
4762
|
+
\****************************************************************************************/
|
|
4763
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4764
|
+
|
|
4765
|
+
"use strict";
|
|
4766
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hasAddon: () => (/* binding */ hasAddon),\n/* harmony export */ hasPrefixSuffix: () => (/* binding */ hasPrefixSuffix),\n/* harmony export */ resolveOnChange: () => (/* binding */ resolveOnChange),\n/* harmony export */ triggerFocus: () => (/* binding */ triggerFocus)\n/* harmony export */ });\nfunction hasAddon(props) {\n return !!(props.addonBefore || props.addonAfter);\n}\nfunction hasPrefixSuffix(props) {\n return !!(props.prefix || props.suffix || props.allowClear);\n}\n\n// TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.\nfunction cloneEvent(event, target, value) {\n // A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type=\"file\"> elements.\n // As of the last update, this bug was still marked as \"NEW,\" indicating that it might not have been resolved yet.\n // https://bugs.webkit.org/show_bug.cgi?id=28123\n var currentTarget = target.cloneNode(true);\n\n // click clear icon\n var newEvent = Object.create(event, {\n target: {\n value: currentTarget\n },\n currentTarget: {\n value: currentTarget\n }\n });\n\n // Fill data\n currentTarget.value = value;\n\n // Fill selection. Some type like `email` not support selection\n // https://github.com/ant-design/ant-design/issues/47833\n if (typeof target.selectionStart === 'number' && typeof target.selectionEnd === 'number') {\n currentTarget.selectionStart = target.selectionStart;\n currentTarget.selectionEnd = target.selectionEnd;\n }\n currentTarget.setSelectionRange = function () {\n target.setSelectionRange.apply(target, arguments);\n };\n return newEvent;\n}\nfunction resolveOnChange(target, e, onChange, targetValue) {\n if (!onChange) {\n return;\n }\n var event = e;\n if (e.type === 'click') {\n // Clone a new target for event.\n // Avoid the following usage, the setQuery method gets the original value.\n //\n // const [query, setQuery] = React.useState('');\n // <Input\n // allowClear\n // value={query}\n // onChange={(e)=> {\n // setQuery((prevStatus) => e.target.value);\n // }}\n // />\n\n event = cloneEvent(e, target, '');\n onChange(event);\n return;\n }\n\n // Trigger by composition event, this means we need force change the input value\n // https://github.com/ant-design/ant-design/issues/45737\n // https://github.com/ant-design/ant-design/issues/46598\n if (target.type !== 'file' && targetValue !== undefined) {\n event = cloneEvent(e, target, targetValue);\n onChange(event);\n return;\n }\n onChange(event);\n}\nfunction triggerFocus(element, option) {\n if (!element) return;\n element.focus(option);\n\n // Selection content\n var _ref = option || {},\n cursor = _ref.cursor;\n if (cursor) {\n var len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-input/es/utils/commonUtils.js?");
|
|
4767
|
+
|
|
4768
|
+
/***/ }),
|
|
4769
|
+
|
|
4770
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/Dom/canUseDom.js":
|
|
4771
|
+
/*!***********************************************************************************!*\
|
|
4772
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/Dom/canUseDom.js ***!
|
|
4773
|
+
\***********************************************************************************/
|
|
4774
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4775
|
+
|
|
4776
|
+
"use strict";
|
|
4777
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ canUseDom)\n/* harmony export */ });\nfunction canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/Dom/canUseDom.js?");
|
|
4778
|
+
|
|
4779
|
+
/***/ }),
|
|
4780
|
+
|
|
4781
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useEvent.js":
|
|
4782
|
+
/*!************************************************************************************!*\
|
|
4783
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useEvent.js ***!
|
|
4784
|
+
\************************************************************************************/
|
|
4785
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4786
|
+
|
|
4787
|
+
"use strict";
|
|
4788
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction useEvent(callback) {\n var fnRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n fnRef.current = callback;\n var memoFn = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function () {\n var _fnRef$current;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));\n }, []);\n return memoFn;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useEvent.js?");
|
|
4789
|
+
|
|
4790
|
+
/***/ }),
|
|
4791
|
+
|
|
4792
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js":
|
|
4793
|
+
/*!*******************************************************************************************!*\
|
|
4794
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js ***!
|
|
4795
|
+
\*******************************************************************************************/
|
|
4796
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4797
|
+
|
|
4798
|
+
"use strict";
|
|
4799
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ useLayoutUpdateEffect: () => (/* binding */ useLayoutUpdateEffect)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dom/canUseDom */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/Dom/canUseDom.js\");\n\n\n\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useInternalLayoutEffect = true && (0,_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__[\"default\"])() ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;\nvar useLayoutEffect = function useLayoutEffect(callback, deps) {\n var firstMountRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true);\n useInternalLayoutEffect(function () {\n return callback(firstMountRef.current);\n }, deps);\n\n // We tell react that first mount has passed\n useInternalLayoutEffect(function () {\n firstMountRef.current = false;\n return function () {\n firstMountRef.current = true;\n };\n }, []);\n};\nvar useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n useLayoutEffect(function (firstMount) {\n if (!firstMount) {\n return callback();\n }\n }, deps);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useLayoutEffect);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js?");
|
|
4800
|
+
|
|
4801
|
+
/***/ }),
|
|
4802
|
+
|
|
4803
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMemo.js":
|
|
4804
|
+
/*!***********************************************************************************!*\
|
|
4805
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMemo.js ***!
|
|
4806
|
+
\***********************************************************************************/
|
|
4807
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4808
|
+
|
|
4809
|
+
"use strict";
|
|
4810
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useMemo)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMemo.js?");
|
|
4811
|
+
|
|
4812
|
+
/***/ }),
|
|
4813
|
+
|
|
4814
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMergedState.js":
|
|
4815
|
+
/*!******************************************************************************************!*\
|
|
4816
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMergedState.js ***!
|
|
4817
|
+
\******************************************************************************************/
|
|
4818
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4819
|
+
|
|
4820
|
+
"use strict";
|
|
4821
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useMergedState)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _useEvent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useEvent */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useEvent.js\");\n/* harmony import */ var _useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useLayoutEffect */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js\");\n/* harmony import */ var _useState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useState */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useState.js\");\n\n\n\n\n/** We only think `undefined` is empty */\nfunction hasValue(value) {\n return value !== undefined;\n}\n\n/**\n * Similar to `useState` but will use props value if provided.\n * Note that internal use rc-util `useState` hook.\n */\nfunction useMergedState(defaultStateValue, option) {\n var _ref = option || {},\n defaultValue = _ref.defaultValue,\n value = _ref.value,\n onChange = _ref.onChange,\n postState = _ref.postState;\n\n // ======================= Init =======================\n var _useState = (0,_useState__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n if (hasValue(value)) {\n return value;\n } else if (hasValue(defaultValue)) {\n return typeof defaultValue === 'function' ? defaultValue() : defaultValue;\n } else {\n return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;\n }\n }),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n innerValue = _useState2[0],\n setInnerValue = _useState2[1];\n var mergedValue = value !== undefined ? value : innerValue;\n var postMergedValue = postState ? postState(mergedValue) : mergedValue;\n\n // ====================== Change ======================\n var onChangeFn = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(onChange);\n var _useState3 = (0,_useState__WEBPACK_IMPORTED_MODULE_3__[\"default\"])([mergedValue]),\n _useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n prevValue = _useState4[0],\n setPrevValue = _useState4[1];\n (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {\n var prev = prevValue[0];\n if (innerValue !== prev) {\n onChangeFn(innerValue, prev);\n }\n }, [prevValue]);\n\n // Sync value back to `undefined` when it from control to un-control\n (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {\n if (!hasValue(value)) {\n setInnerValue(value);\n }\n }, [value]);\n\n // ====================== Update ======================\n var triggerChange = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (updater, ignoreDestroy) {\n setInnerValue(updater, ignoreDestroy);\n setPrevValue([mergedValue], ignoreDestroy);\n });\n return [postMergedValue, triggerChange];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMergedState.js?");
|
|
4822
|
+
|
|
4823
|
+
/***/ }),
|
|
4824
|
+
|
|
4825
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMobile.js":
|
|
4826
|
+
/*!*************************************************************************************!*\
|
|
4827
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMobile.js ***!
|
|
4828
|
+
\*************************************************************************************/
|
|
4829
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4830
|
+
|
|
4831
|
+
"use strict";
|
|
4832
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _isMobile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../isMobile */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/isMobile.js\");\n/* harmony import */ var _useLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useLayoutEffect */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js\");\n\n\n\n\n\n/**\n * Hook to detect if the user is on a mobile device\n * Notice that this hook will only detect the device type in effect, so it will always be false in server side\n */\nvar useMobile = function useMobile() {\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n mobile = _useState2[0],\n setMobile = _useState2[1];\n (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n setMobile((0,_isMobile__WEBPACK_IMPORTED_MODULE_2__[\"default\"])());\n }, []);\n return mobile;\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useMobile);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMobile.js?");
|
|
4833
|
+
|
|
4834
|
+
/***/ }),
|
|
4835
|
+
|
|
4836
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useState.js":
|
|
4837
|
+
/*!************************************************************************************!*\
|
|
4838
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useState.js ***!
|
|
4839
|
+
\************************************************************************************/
|
|
4840
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4841
|
+
|
|
4842
|
+
"use strict";
|
|
4843
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useSafeState)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nfunction useSafeState(defaultValue) {\n var destroyRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(false);\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__.useState(defaultValue),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$useState, 2),\n value = _React$useState2[0],\n setValue = _React$useState2[1];\n react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () {\n destroyRef.current = false;\n return function () {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useState.js?");
|
|
4844
|
+
|
|
4845
|
+
/***/ }),
|
|
4846
|
+
|
|
4847
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/isMobile.js":
|
|
4848
|
+
/*!******************************************************************************!*\
|
|
4849
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/isMobile.js ***!
|
|
4850
|
+
\******************************************************************************/
|
|
4851
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4852
|
+
|
|
4853
|
+
"use strict";
|
|
4854
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () {\n if (typeof navigator === 'undefined' || typeof window === 'undefined') {\n return false;\n }\n var agent = navigator.userAgent || navigator.vendor || window.opera;\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/isMobile.js?");
|
|
4855
|
+
|
|
4856
|
+
/***/ }),
|
|
4857
|
+
|
|
4858
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/omit.js":
|
|
4859
|
+
/*!**************************************************************************!*\
|
|
4860
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/omit.js ***!
|
|
4861
|
+
\**************************************************************************/
|
|
4862
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4863
|
+
|
|
4864
|
+
"use strict";
|
|
4865
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ omit)\n/* harmony export */ });\nfunction omit(obj, fields) {\n var clone = Object.assign({}, obj);\n if (Array.isArray(fields)) {\n fields.forEach(function (key) {\n delete clone[key];\n });\n }\n return clone;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/omit.js?");
|
|
4866
|
+
|
|
4867
|
+
/***/ }),
|
|
4868
|
+
|
|
4869
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/proxyObject.js":
|
|
4870
|
+
/*!*********************************************************************************!*\
|
|
4871
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/proxyObject.js ***!
|
|
4872
|
+
\*********************************************************************************/
|
|
4873
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4874
|
+
|
|
4875
|
+
"use strict";
|
|
4876
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ proxyObject)\n/* harmony export */ });\n/**\n * Proxy object if environment supported\n */\nfunction proxyObject(obj, extendProps) {\n if (typeof Proxy !== 'undefined' && obj) {\n return new Proxy(obj, {\n get: function get(target, prop) {\n if (extendProps[prop]) {\n return extendProps[prop];\n }\n\n // Proxy origin property\n var originProp = target[prop];\n return typeof originProp === 'function' ? originProp.bind(target) : originProp;\n }\n });\n }\n return obj;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/proxyObject.js?");
|
|
4877
|
+
|
|
4878
|
+
/***/ }),
|
|
4879
|
+
|
|
4880
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/raf.js":
|
|
4881
|
+
/*!*************************************************************************!*\
|
|
4882
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/raf.js ***!
|
|
4883
|
+
\*************************************************************************/
|
|
4884
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4885
|
+
|
|
4886
|
+
"use strict";
|
|
4887
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nvar raf = function raf(callback) {\n return +setTimeout(callback, 16);\n};\nvar caf = function caf(num) {\n return clearTimeout(num);\n};\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = function raf(callback) {\n return window.requestAnimationFrame(callback);\n };\n caf = function caf(handle) {\n return window.cancelAnimationFrame(handle);\n };\n}\nvar rafUUID = 0;\nvar rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nvar wrapperRaf = function wrapperRaf(callback) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n rafUUID += 1;\n var id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n\n // Trigger\n callback();\n } else {\n // Next raf\n var realId = raf(function () {\n callRef(leftTimes - 1);\n });\n\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = function (id) {\n var realId = rafIds.get(id);\n cleanup(id);\n return caf(realId);\n};\nif (true) {\n wrapperRaf.ids = function () {\n return rafIds;\n };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (wrapperRaf);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/raf.js?");
|
|
4888
|
+
|
|
4889
|
+
/***/ }),
|
|
4890
|
+
|
|
4891
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/ref.js":
|
|
4892
|
+
/*!*************************************************************************!*\
|
|
4893
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/ref.js ***!
|
|
4894
|
+
\*************************************************************************/
|
|
4895
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4896
|
+
|
|
4897
|
+
"use strict";
|
|
4898
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRef: () => (/* binding */ composeRef),\n/* harmony export */ fillRef: () => (/* binding */ fillRef),\n/* harmony export */ getNodeRef: () => (/* binding */ getNodeRef),\n/* harmony export */ supportNodeRef: () => (/* binding */ supportNodeRef),\n/* harmony export */ supportRef: () => (/* binding */ supportRef),\n/* harmony export */ useComposeRef: () => (/* binding */ useComposeRef)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ \"../../node_modules/react-is/index.js\");\n/* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useMemo.js\");\n\n\n\n\nvar fillRef = function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n};\n\n/**\n * Merge refs into one ref function to support ref passing.\n */\nvar composeRef = function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(Boolean);\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n};\nvar useComposeRef = function useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return (0,_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length !== next.length || prev.every(function (ref, i) {\n return ref !== next[i];\n });\n });\n};\nvar supportRef = function supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = (0,react_is__WEBPACK_IMPORTED_MODULE_2__.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n return true;\n};\nfunction isReactElement(node) {\n return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(node) && !(0,react_is__WEBPACK_IMPORTED_MODULE_2__.isFragment)(node);\n}\nvar supportNodeRef = function supportNodeRef(node) {\n return isReactElement(node) && supportRef(node);\n};\n\n/**\n * In React 19. `ref` is not a property from node.\n * But a property from `props.ref`.\n * To check if `props.ref` exist or fallback to `ref`.\n */\nvar getNodeRef = Number(react__WEBPACK_IMPORTED_MODULE_1__.version.split('.')[0]) >= 19 ?\n// >= React 19\nfunction (node) {\n if (isReactElement(node)) {\n return node.props.ref;\n }\n return null;\n} :\n// < React 19\nfunction (node) {\n if (isReactElement(node)) {\n return node.ref;\n }\n return null;\n};\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/ref.js?");
|
|
4899
|
+
|
|
4900
|
+
/***/ }),
|
|
4901
|
+
|
|
4902
|
+
/***/ "../../node_modules/rc-input-number/node_modules/rc-util/es/warning.js":
|
|
4903
|
+
/*!*****************************************************************************!*\
|
|
4904
|
+
!*** ../../node_modules/rc-input-number/node_modules/rc-util/es/warning.js ***!
|
|
4905
|
+
\*****************************************************************************/
|
|
4906
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4907
|
+
|
|
4908
|
+
"use strict";
|
|
4909
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ call: () => (/* binding */ call),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ note: () => (/* binding */ note),\n/* harmony export */ noteOnce: () => (/* binding */ noteOnce),\n/* harmony export */ preMessage: () => (/* binding */ preMessage),\n/* harmony export */ resetWarned: () => (/* binding */ resetWarned),\n/* harmony export */ warning: () => (/* binding */ warning),\n/* harmony export */ warningOnce: () => (/* binding */ warningOnce)\n/* harmony export */ });\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warningOnce);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/node_modules/rc-util/es/warning.js?");
|
|
4910
|
+
|
|
4911
|
+
/***/ }),
|
|
4912
|
+
|
|
4913
|
+
/***/ "../../node_modules/rc-motion/es/CSSMotion.js":
|
|
4914
|
+
/*!****************************************************!*\
|
|
4915
|
+
!*** ../../node_modules/rc-motion/es/CSSMotion.js ***!
|
|
4916
|
+
\****************************************************/
|
|
4917
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4918
|
+
|
|
4919
|
+
"use strict";
|
|
4920
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ genCSSMotion: () => (/* binding */ genCSSMotion)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ \"../../node_modules/rc-motion/node_modules/rc-util/es/Dom/findDOMNode.js\");\n/* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/ref */ \"../../node_modules/rc-motion/node_modules/rc-util/es/ref.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ \"../../node_modules/rc-motion/es/context.js\");\n/* harmony import */ var _DomWrapper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./DomWrapper */ \"../../node_modules/rc-motion/es/DomWrapper.js\");\n/* harmony import */ var _hooks_useStatus__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hooks/useStatus */ \"../../node_modules/rc-motion/es/hooks/useStatus.js\");\n/* harmony import */ var _hooks_useStepQueue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hooks/useStepQueue */ \"../../node_modules/rc-motion/es/hooks/useStepQueue.js\");\n/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./interface */ \"../../node_modules/rc-motion/es/interface.js\");\n/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./util/motion */ \"../../node_modules/rc-motion/es/util/motion.js\");\n\n\n\n\n/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * `transitionSupport` is used for none transition test case.\n * Default we use browser transition event support check.\n */\nfunction genCSSMotion(config) {\n var transitionSupport = config;\n if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(config) === 'object') {\n transitionSupport = config.transitionSupport;\n }\n function isSupportTransition(props, contextMotion) {\n return !!(props.motionName && transitionSupport && contextMotion !== false);\n }\n var CSSMotion = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.forwardRef(function (props, ref) {\n var _props$visible = props.visible,\n visible = _props$visible === void 0 ? true : _props$visible,\n _props$removeOnLeave = props.removeOnLeave,\n removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,\n forceRender = props.forceRender,\n children = props.children,\n motionName = props.motionName,\n leavedClassName = props.leavedClassName,\n eventProps = props.eventProps;\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_7__.useContext(_context__WEBPACK_IMPORTED_MODULE_8__.Context),\n contextMotion = _React$useContext.motion;\n var supportMotion = isSupportTransition(props, contextMotion);\n\n // Ref to the react node, it may be a HTMLElement\n var nodeRef = (0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)();\n // Ref to the dom wrapper in case ref can not pass to HTMLElement\n var wrapperNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)();\n function getDomElement() {\n try {\n // Here we're avoiding call for findDOMNode since it's deprecated\n // in strict mode. We're calling it only when node ref is not\n // an instance of DOM HTMLElement. Otherwise use\n // findDOMNode as a final resort\n return nodeRef.current instanceof HTMLElement ? nodeRef.current : (0,rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(wrapperNodeRef.current);\n } catch (e) {\n // Only happen when `motionDeadline` trigger but element removed.\n return null;\n }\n }\n var _useStatus = (0,_hooks_useStatus__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(supportMotion, visible, getDomElement, props),\n _useStatus2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useStatus, 4),\n status = _useStatus2[0],\n statusStep = _useStatus2[1],\n statusStyle = _useStatus2[2],\n mergedVisible = _useStatus2[3];\n\n // Record whether content has rendered\n // Will return null for un-rendered even when `removeOnLeave={false}`\n var renderedRef = react__WEBPACK_IMPORTED_MODULE_7__.useRef(mergedVisible);\n if (mergedVisible) {\n renderedRef.current = true;\n }\n\n // ====================== Refs ======================\n var setNodeRef = react__WEBPACK_IMPORTED_MODULE_7__.useCallback(function (node) {\n nodeRef.current = node;\n (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__.fillRef)(ref, node);\n }, [ref]);\n\n // ===================== Render =====================\n var motionChildren;\n var mergedProps = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, eventProps), {}, {\n visible: visible\n });\n if (!children) {\n // No children\n motionChildren = null;\n } else if (status === _interface__WEBPACK_IMPORTED_MODULE_12__.STATUS_NONE) {\n // Stable children\n if (mergedVisible) {\n motionChildren = children((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, mergedProps), setNodeRef);\n } else if (!removeOnLeave && renderedRef.current && leavedClassName) {\n motionChildren = children((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, mergedProps), {}, {\n className: leavedClassName\n }), setNodeRef);\n } else if (forceRender || !removeOnLeave && !leavedClassName) {\n motionChildren = children((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, mergedProps), {}, {\n style: {\n display: 'none'\n }\n }), setNodeRef);\n } else {\n motionChildren = null;\n }\n } else {\n // In motion\n var statusSuffix;\n if (statusStep === _interface__WEBPACK_IMPORTED_MODULE_12__.STEP_PREPARE) {\n statusSuffix = 'prepare';\n } else if ((0,_hooks_useStepQueue__WEBPACK_IMPORTED_MODULE_11__.isActive)(statusStep)) {\n statusSuffix = 'active';\n } else if (statusStep === _interface__WEBPACK_IMPORTED_MODULE_12__.STEP_START) {\n statusSuffix = 'start';\n }\n var motionCls = (0,_util_motion__WEBPACK_IMPORTED_MODULE_13__.getTransitionName)(motionName, \"\".concat(status, \"-\").concat(statusSuffix));\n motionChildren = children((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, mergedProps), {}, {\n className: classnames__WEBPACK_IMPORTED_MODULE_4___default()((0,_util_motion__WEBPACK_IMPORTED_MODULE_13__.getTransitionName)(motionName, status), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName === 'string')),\n style: statusStyle\n }), setNodeRef);\n }\n\n // Auto inject ref if child node not have `ref` props\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.isValidElement(motionChildren) && (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__.supportRef)(motionChildren)) {\n var _ref = motionChildren,\n originNodeRef = _ref.ref;\n if (!originNodeRef) {\n motionChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.cloneElement(motionChildren, {\n ref: setNodeRef\n });\n }\n }\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createElement(_DomWrapper__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: wrapperNodeRef\n }, motionChildren);\n });\n CSSMotion.displayName = 'CSSMotion';\n return CSSMotion;\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (genCSSMotion(_util_motion__WEBPACK_IMPORTED_MODULE_13__.supportTransition));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/CSSMotion.js?");
|
|
4921
|
+
|
|
4922
|
+
/***/ }),
|
|
4923
|
+
|
|
4924
|
+
/***/ "../../node_modules/rc-motion/es/CSSMotionList.js":
|
|
4925
|
+
/*!********************************************************!*\
|
|
4926
|
+
!*** ../../node_modules/rc-motion/es/CSSMotionList.js ***!
|
|
4927
|
+
\********************************************************/
|
|
4928
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4929
|
+
|
|
4930
|
+
"use strict";
|
|
4931
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ genCSSMotionList: () => (/* binding */ genCSSMotionList)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"../../node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"../../node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ \"../../node_modules/@babel/runtime/helpers/esm/createSuper.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _CSSMotion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CSSMotion */ \"../../node_modules/rc-motion/es/CSSMotion.js\");\n/* harmony import */ var _util_diff__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./util/diff */ \"../../node_modules/rc-motion/es/util/diff.js\");\n/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util/motion */ \"../../node_modules/rc-motion/es/util/motion.js\");\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"component\", \"children\", \"onVisibleChanged\", \"onAllRemoved\"],\n _excluded2 = [\"status\"];\n/* eslint react/prop-types: 0 */\n\n\n\n\nvar MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearPrepare', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];\n/**\n * Generate a CSSMotionList component with config\n * @param transitionSupport No need since CSSMotionList no longer depends on transition support\n * @param CSSMotion CSSMotion component\n */\nfunction genCSSMotionList(transitionSupport) {\n var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _CSSMotion__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\n var CSSMotionList = /*#__PURE__*/function (_React$Component) {\n (0,_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(CSSMotionList, _React$Component);\n var _super = (0,_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(CSSMotionList);\n function CSSMotionList() {\n var _this;\n (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, CSSMotionList);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this), \"state\", {\n keyEntities: []\n });\n // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.\n (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this), \"removeKey\", function (removeKey) {\n _this.setState(function (prevState) {\n var nextKeyEntities = prevState.keyEntities.map(function (entity) {\n if (entity.key !== removeKey) return entity;\n return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, entity), {}, {\n status: _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_REMOVED\n });\n });\n return {\n keyEntities: nextKeyEntities\n };\n }, function () {\n var keyEntities = _this.state.keyEntities;\n var restKeysCount = keyEntities.filter(function (_ref) {\n var status = _ref.status;\n return status !== _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_REMOVED;\n }).length;\n if (restKeysCount === 0 && _this.props.onAllRemoved) {\n _this.props.onAllRemoved();\n }\n });\n });\n return _this;\n }\n (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(CSSMotionList, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var keyEntities = this.state.keyEntities;\n var _this$props = this.props,\n component = _this$props.component,\n children = _this$props.children,\n _onVisibleChanged = _this$props.onVisibleChanged,\n onAllRemoved = _this$props.onAllRemoved,\n restProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, _excluded);\n var Component = component || react__WEBPACK_IMPORTED_MODULE_9__.Fragment;\n var motionProps = {};\n MOTION_PROP_NAMES.forEach(function (prop) {\n motionProps[prop] = restProps[prop];\n delete restProps[prop];\n });\n delete restProps.keys;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9__.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {\n var status = _ref2.status,\n eventProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref2, _excluded2);\n var visible = status === _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_ADD || status === _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_KEEP;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9__.createElement(CSSMotion, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, motionProps, {\n key: eventProps.key,\n visible: visible,\n eventProps: eventProps,\n onVisibleChanged: function onVisibleChanged(changedVisible) {\n _onVisibleChanged === null || _onVisibleChanged === void 0 || _onVisibleChanged(changedVisible, {\n key: eventProps.key\n });\n if (!changedVisible) {\n _this2.removeKey(eventProps.key);\n }\n }\n }), function (props, ref) {\n return children((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, props), {}, {\n index: index\n }), ref);\n });\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref3, _ref4) {\n var keys = _ref3.keys;\n var keyEntities = _ref4.keyEntities;\n var parsedKeyObjects = (0,_util_diff__WEBPACK_IMPORTED_MODULE_11__.parseKeys)(keys);\n var mixedKeyEntities = (0,_util_diff__WEBPACK_IMPORTED_MODULE_11__.diffKeys)(keyEntities, parsedKeyObjects);\n return {\n keyEntities: mixedKeyEntities.filter(function (entity) {\n var prevEntity = keyEntities.find(function (_ref5) {\n var key = _ref5.key;\n return entity.key === key;\n });\n\n // Remove if already mark as removed\n if (prevEntity && prevEntity.status === _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_REMOVED && entity.status === _util_diff__WEBPACK_IMPORTED_MODULE_11__.STATUS_REMOVE) {\n return false;\n }\n return true;\n })\n };\n }\n }]);\n return CSSMotionList;\n }(react__WEBPACK_IMPORTED_MODULE_9__.Component);\n (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(CSSMotionList, \"defaultProps\", {\n component: 'div'\n });\n return CSSMotionList;\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (genCSSMotionList(_util_motion__WEBPACK_IMPORTED_MODULE_12__.supportTransition));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/CSSMotionList.js?");
|
|
4932
|
+
|
|
4933
|
+
/***/ }),
|
|
4934
|
+
|
|
4935
|
+
/***/ "../../node_modules/rc-motion/es/DomWrapper.js":
|
|
4936
|
+
/*!*****************************************************!*\
|
|
4937
|
+
!*** ../../node_modules/rc-motion/es/DomWrapper.js ***!
|
|
4938
|
+
\*****************************************************/
|
|
4939
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4940
|
+
|
|
4941
|
+
"use strict";
|
|
4942
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"../../node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"../../node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ \"../../node_modules/@babel/runtime/helpers/esm/createSuper.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nvar DomWrapper = /*#__PURE__*/function (_React$Component) {\n (0,_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(DomWrapper, _React$Component);\n var _super = (0,_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(DomWrapper);\n function DomWrapper() {\n (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, DomWrapper);\n return _super.apply(this, arguments);\n }\n (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(DomWrapper, [{\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n return DomWrapper;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DomWrapper);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/DomWrapper.js?");
|
|
4943
|
+
|
|
4944
|
+
/***/ }),
|
|
4945
|
+
|
|
4946
|
+
/***/ "../../node_modules/rc-motion/es/context.js":
|
|
4947
|
+
/*!**************************************************!*\
|
|
4948
|
+
!*** ../../node_modules/rc-motion/es/context.js ***!
|
|
4949
|
+
\**************************************************/
|
|
4950
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4951
|
+
|
|
4952
|
+
"use strict";
|
|
4953
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Context: () => (/* binding */ Context),\n/* harmony export */ \"default\": () => (/* binding */ MotionProvider)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\nvar _excluded = [\"children\"];\n\nvar Context = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createContext({});\nfunction MotionProvider(_ref) {\n var children = _ref.children,\n props = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, _excluded);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Context.Provider, {\n value: props\n }, children);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/context.js?");
|
|
4954
|
+
|
|
4955
|
+
/***/ }),
|
|
4956
|
+
|
|
4957
|
+
/***/ "../../node_modules/rc-motion/es/hooks/useDomMotionEvents.js":
|
|
4958
|
+
/*!*******************************************************************!*\
|
|
4959
|
+
!*** ../../node_modules/rc-motion/es/hooks/useDomMotionEvents.js ***!
|
|
4960
|
+
\*******************************************************************/
|
|
4961
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4962
|
+
|
|
4963
|
+
"use strict";
|
|
4964
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/motion */ \"../../node_modules/rc-motion/es/util/motion.js\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (onInternalMotionEnd) {\n var cacheElementRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n\n // Remove events\n function removeMotionEvents(element) {\n if (element) {\n element.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_1__.transitionEndName, onInternalMotionEnd);\n element.removeEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_1__.animationEndName, onInternalMotionEnd);\n }\n }\n\n // Patch events\n function patchMotionEvents(element) {\n if (cacheElementRef.current && cacheElementRef.current !== element) {\n removeMotionEvents(cacheElementRef.current);\n }\n if (element && element !== cacheElementRef.current) {\n element.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_1__.transitionEndName, onInternalMotionEnd);\n element.addEventListener(_util_motion__WEBPACK_IMPORTED_MODULE_1__.animationEndName, onInternalMotionEnd);\n\n // Save as cache in case dom removed trigger by `motionDeadline`\n cacheElementRef.current = element;\n }\n }\n\n // Clean up when removed\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n return function () {\n removeMotionEvents(cacheElementRef.current);\n };\n }, []);\n return [patchMotionEvents, removeMotionEvents];\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/hooks/useDomMotionEvents.js?");
|
|
4349
4965
|
|
|
4350
4966
|
/***/ }),
|
|
4351
4967
|
|
|
4352
|
-
/***/ "../../node_modules/rc-
|
|
4353
|
-
|
|
4354
|
-
!*** ../../node_modules/rc-
|
|
4355
|
-
|
|
4968
|
+
/***/ "../../node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js":
|
|
4969
|
+
/*!**************************************************************************!*\
|
|
4970
|
+
!*** ../../node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js ***!
|
|
4971
|
+
\**************************************************************************/
|
|
4356
4972
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4357
4973
|
|
|
4358
4974
|
"use strict";
|
|
4359
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var
|
|
4975
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/Dom/canUseDom */ \"../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n// It's safe to use `useLayoutEffect` but the warning is annoying\nvar useIsomorphicLayoutEffect = (0,rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_0__[\"default\"])() ? react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_1__.useEffect;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useIsomorphicLayoutEffect);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js?");
|
|
4360
4976
|
|
|
4361
4977
|
/***/ }),
|
|
4362
4978
|
|
|
4363
|
-
/***/ "../../node_modules/rc-
|
|
4364
|
-
|
|
4365
|
-
!*** ../../node_modules/rc-
|
|
4366
|
-
|
|
4979
|
+
/***/ "../../node_modules/rc-motion/es/hooks/useNextFrame.js":
|
|
4980
|
+
/*!*************************************************************!*\
|
|
4981
|
+
!*** ../../node_modules/rc-motion/es/hooks/useNextFrame.js ***!
|
|
4982
|
+
\*************************************************************/
|
|
4367
4983
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4368
4984
|
|
|
4369
4985
|
"use strict";
|
|
4370
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4986
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ \"../../node_modules/rc-motion/node_modules/rc-util/es/raf.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () {\n var nextFrameRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);\n function cancelNextFrame() {\n rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[\"default\"].cancel(nextFrameRef.current);\n }\n function nextFrame(callback) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n cancelNextFrame();\n var nextFrameId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function () {\n if (delay <= 1) {\n callback({\n isCanceled: function isCanceled() {\n return nextFrameId !== nextFrameRef.current;\n }\n });\n } else {\n nextFrame(callback, delay - 1);\n }\n });\n nextFrameRef.current = nextFrameId;\n }\n react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [nextFrame, cancelNextFrame];\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/hooks/useNextFrame.js?");
|
|
4371
4987
|
|
|
4372
4988
|
/***/ }),
|
|
4373
4989
|
|
|
4374
|
-
/***/ "../../node_modules/rc-
|
|
4375
|
-
|
|
4376
|
-
!*** ../../node_modules/rc-
|
|
4377
|
-
|
|
4990
|
+
/***/ "../../node_modules/rc-motion/es/hooks/useStatus.js":
|
|
4991
|
+
/*!**********************************************************!*\
|
|
4992
|
+
!*** ../../node_modules/rc-motion/es/hooks/useStatus.js ***!
|
|
4993
|
+
\**********************************************************/
|
|
4378
4994
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4379
4995
|
|
|
4380
4996
|
"use strict";
|
|
4381
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ \"../../node_modules/babel-runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\nvar LazyRenderBox = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(LazyRenderBox, _Component);\n\n function LazyRenderBox() {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, LazyRenderBox);\n\n return (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _Component.apply(this, arguments));\n }\n\n LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return nextProps.hiddenClassName || nextProps.visible;\n };\n\n LazyRenderBox.prototype.render = function render() {\n var _props = this.props,\n hiddenClassName = _props.hiddenClassName,\n visible = _props.visible,\n props = (0,babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_props, ['hiddenClassName', 'visible']);\n\n if (hiddenClassName || react__WEBPACK_IMPORTED_MODULE_4___default().Children.count(props.children) > 1) {\n if (!visible && hiddenClassName) {\n props.className += ' ' + hiddenClassName;\n }\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement('div', props);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(props.children);\n };\n\n return LazyRenderBox;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nLazyRenderBox.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n hiddenClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)\n};\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LazyRenderBox);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js?");
|
|
4997
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useStatus)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var rc_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util */ \"../../node_modules/rc-motion/node_modules/rc-util/es/index.js\");\n/* harmony import */ var rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/hooks/useState */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js\");\n/* harmony import */ var rc_util_es_hooks_useSyncState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useSyncState */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useSyncState.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../interface */ \"../../node_modules/rc-motion/es/interface.js\");\n/* harmony import */ var _useDomMotionEvents__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useDomMotionEvents */ \"../../node_modules/rc-motion/es/hooks/useDomMotionEvents.js\");\n/* harmony import */ var _useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./useIsomorphicLayoutEffect */ \"../../node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js\");\n/* harmony import */ var _useStepQueue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./useStepQueue */ \"../../node_modules/rc-motion/es/hooks/useStepQueue.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction useStatus(supportMotion, visible, getElement, _ref) {\n var _ref$motionEnter = _ref.motionEnter,\n motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,\n _ref$motionAppear = _ref.motionAppear,\n motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,\n _ref$motionLeave = _ref.motionLeave,\n motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,\n motionDeadline = _ref.motionDeadline,\n motionLeaveImmediately = _ref.motionLeaveImmediately,\n onAppearPrepare = _ref.onAppearPrepare,\n onEnterPrepare = _ref.onEnterPrepare,\n onLeavePrepare = _ref.onLeavePrepare,\n onAppearStart = _ref.onAppearStart,\n onEnterStart = _ref.onEnterStart,\n onLeaveStart = _ref.onLeaveStart,\n onAppearActive = _ref.onAppearActive,\n onEnterActive = _ref.onEnterActive,\n onLeaveActive = _ref.onLeaveActive,\n onAppearEnd = _ref.onAppearEnd,\n onEnterEnd = _ref.onEnterEnd,\n onLeaveEnd = _ref.onLeaveEnd,\n onVisibleChanged = _ref.onVisibleChanged;\n // Used for outer render usage to avoid `visible: false & status: none` to render nothing\n var _useState = (0,rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState, 2),\n asyncVisible = _useState2[0],\n setAsyncVisible = _useState2[1];\n var _useSyncState = (0,rc_util_es_hooks_useSyncState__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE),\n _useSyncState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useSyncState, 2),\n getStatus = _useSyncState2[0],\n setStatus = _useSyncState2[1];\n var _useState3 = (0,rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(null),\n _useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState3, 2),\n style = _useState4[0],\n setStyle = _useState4[1];\n var currentStatus = getStatus();\n var mountedRef = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)(false);\n var deadlineRef = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)(null);\n\n // =========================== Dom Node ===========================\n function getDomElement() {\n return getElement();\n }\n\n // ========================== Motion End ==========================\n var activeRef = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)(false);\n\n /**\n * Clean up status & style\n */\n function updateMotionEndStatus() {\n setStatus(_interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE);\n setStyle(null, true);\n }\n var onInternalMotionEnd = (0,rc_util__WEBPACK_IMPORTED_MODULE_3__.useEvent)(function (event) {\n var status = getStatus();\n // Do nothing since not in any transition status.\n // This may happen when `motionDeadline` trigger.\n if (status === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE) {\n return;\n }\n var element = getDomElement();\n if (event && !event.deadline && event.target !== element) {\n // event exists\n // not initiated by deadline\n // transitionEnd not fired by inner elements\n return;\n }\n var currentActive = activeRef.current;\n var canEnd;\n if (status === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_APPEAR && currentActive) {\n canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);\n } else if (status === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_ENTER && currentActive) {\n canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);\n } else if (status === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_LEAVE && currentActive) {\n canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);\n }\n\n // Only update status when `canEnd` and not destroyed\n if (currentActive && canEnd !== false) {\n updateMotionEndStatus();\n }\n });\n var _useDomMotionEvents = (0,_useDomMotionEvents__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(onInternalMotionEnd),\n _useDomMotionEvents2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDomMotionEvents, 1),\n patchMotionEvents = _useDomMotionEvents2[0];\n\n // ============================= Step =============================\n var getEventHandlers = function getEventHandlers(targetStatus) {\n switch (targetStatus) {\n case _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_APPEAR:\n return (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE, onAppearPrepare), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_START, onAppearStart), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_ACTIVE, onAppearActive);\n case _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_ENTER:\n return (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE, onEnterPrepare), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_START, onEnterStart), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_ACTIVE, onEnterActive);\n case _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_LEAVE:\n return (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE, onLeavePrepare), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_START, onLeaveStart), _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_ACTIVE, onLeaveActive);\n default:\n return {};\n }\n };\n var eventHandlers = react__WEBPACK_IMPORTED_MODULE_6__.useMemo(function () {\n return getEventHandlers(currentStatus);\n }, [currentStatus]);\n var _useStepQueue = (0,_useStepQueue__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(currentStatus, !supportMotion, function (newStep) {\n // Only prepare step can be skip\n if (newStep === _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE) {\n var onPrepare = eventHandlers[_interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE];\n if (!onPrepare) {\n return _useStepQueue__WEBPACK_IMPORTED_MODULE_10__.SkipStep;\n }\n return onPrepare(getDomElement());\n }\n\n // Rest step is sync update\n if (step in eventHandlers) {\n var _eventHandlers$step;\n setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);\n }\n if (step === _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_ACTIVE && currentStatus !== _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE) {\n // Patch events when motion needed\n patchMotionEvents(getDomElement());\n if (motionDeadline > 0) {\n clearTimeout(deadlineRef.current);\n deadlineRef.current = setTimeout(function () {\n onInternalMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n }\n if (step === _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARED) {\n updateMotionEndStatus();\n }\n return _useStepQueue__WEBPACK_IMPORTED_MODULE_10__.DoStep;\n }),\n _useStepQueue2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useStepQueue, 2),\n startStep = _useStepQueue2[0],\n step = _useStepQueue2[1];\n var active = (0,_useStepQueue__WEBPACK_IMPORTED_MODULE_10__.isActive)(step);\n activeRef.current = active;\n\n // ============================ Status ============================\n // Update with new status\n (0,_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function () {\n setAsyncVisible(visible);\n var isMounted = mountedRef.current;\n mountedRef.current = true;\n\n // if (!supportMotion) {\n // return;\n // }\n\n var nextStatus;\n\n // Appear\n if (!isMounted && visible && motionAppear) {\n nextStatus = _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_APPEAR;\n }\n\n // Enter\n if (isMounted && visible && motionEnter) {\n nextStatus = _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_ENTER;\n }\n\n // Leave\n if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {\n nextStatus = _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_LEAVE;\n }\n var nextEventHandlers = getEventHandlers(nextStatus);\n\n // Update to next status\n if (nextStatus && (supportMotion || nextEventHandlers[_interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE])) {\n setStatus(nextStatus);\n startStep();\n } else {\n // Set back in case no motion but prev status has prepare step\n setStatus(_interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE);\n }\n }, [visible]);\n\n // ============================ Effect ============================\n // Reset when motion changed\n (0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {\n if (\n // Cancel appear\n currentStatus === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_APPEAR && !motionAppear ||\n // Cancel enter\n currentStatus === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_ENTER && !motionEnter ||\n // Cancel leave\n currentStatus === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_LEAVE && !motionLeave) {\n setStatus(_interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE);\n }\n }, [motionAppear, motionEnter, motionLeave]);\n (0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {\n return function () {\n mountedRef.current = false;\n clearTimeout(deadlineRef.current);\n };\n }, []);\n\n // Trigger `onVisibleChanged`\n var firstMountChangeRef = react__WEBPACK_IMPORTED_MODULE_6__.useRef(false);\n (0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {\n // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged\n if (asyncVisible) {\n firstMountChangeRef.current = true;\n }\n if (asyncVisible !== undefined && currentStatus === _interface__WEBPACK_IMPORTED_MODULE_7__.STATUS_NONE) {\n // Skip first render is invisible since it's nothing changed\n if (firstMountChangeRef.current || asyncVisible) {\n onVisibleChanged === null || onVisibleChanged === void 0 || onVisibleChanged(asyncVisible);\n }\n firstMountChangeRef.current = true;\n }\n }, [asyncVisible, currentStatus]);\n\n // ============================ Styles ============================\n var mergedStyle = style;\n if (eventHandlers[_interface__WEBPACK_IMPORTED_MODULE_7__.STEP_PREPARE] && step === _interface__WEBPACK_IMPORTED_MODULE_7__.STEP_START) {\n mergedStyle = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n transition: 'none'\n }, mergedStyle);\n }\n return [currentStatus, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/hooks/useStatus.js?");
|
|
4382
4998
|
|
|
4383
4999
|
/***/ }),
|
|
4384
5000
|
|
|
4385
|
-
/***/ "../../node_modules/rc-
|
|
4386
|
-
|
|
4387
|
-
!*** ../../node_modules/rc-
|
|
4388
|
-
|
|
5001
|
+
/***/ "../../node_modules/rc-motion/es/hooks/useStepQueue.js":
|
|
5002
|
+
/*!*************************************************************!*\
|
|
5003
|
+
!*** ../../node_modules/rc-motion/es/hooks/useStepQueue.js ***!
|
|
5004
|
+
\*************************************************************/
|
|
4389
5005
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4390
5006
|
|
|
4391
5007
|
"use strict";
|
|
4392
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_align__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-align */ \"../../node_modules/rc-align/es/index.js\");\n/* harmony import */ var rc_animate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-animate */ \"../../node_modules/rc-animate/es/Animate.js\");\n/* harmony import */ var _PopupInner__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PopupInner */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/PopupInner.js\");\n/* harmony import */ var _LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LazyRenderBox */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/LazyRenderBox.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Popup = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Popup, _Component);\n\n function Popup(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Popup);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.state = {\n // Used for stretch\n stretchChecked: false,\n targetWidth: undefined,\n targetHeight: undefined\n };\n\n _this.savePopupRef = _utils__WEBPACK_IMPORTED_MODULE_10__.saveRef.bind(_this, 'popupInstance');\n _this.saveAlignRef = _utils__WEBPACK_IMPORTED_MODULE_10__.saveRef.bind(_this, 'alignInstance');\n return _this;\n }\n\n Popup.prototype.componentDidMount = function componentDidMount() {\n this.rootNode = this.getPopupDomNode();\n this.setStretchSize();\n };\n\n Popup.prototype.componentDidUpdate = function componentDidUpdate() {\n this.setStretchSize();\n };\n\n // Record size if stretch needed\n\n\n Popup.prototype.getPopupDomNode = function getPopupDomNode() {\n return react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode(this.popupInstance);\n };\n\n // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n\n Popup.prototype.getMaskTransitionName = function getMaskTransitionName() {\n var props = this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getTransitionName = function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getClassName = function getClassName(currentAlignClassName) {\n return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName;\n };\n\n Popup.prototype.getPopupElement = function getPopupElement() {\n var _this2 = this;\n\n var savePopupRef = this.savePopupRef;\n var _state = this.state,\n stretchChecked = _state.stretchChecked,\n targetHeight = _state.targetHeight,\n targetWidth = _state.targetWidth;\n var _props = this.props,\n align = _props.align,\n visible = _props.visible,\n prefixCls = _props.prefixCls,\n style = _props.style,\n getClassNameFromAlign = _props.getClassNameFromAlign,\n destroyPopupOnHide = _props.destroyPopupOnHide,\n stretch = _props.stretch,\n children = _props.children,\n onMouseEnter = _props.onMouseEnter,\n onMouseLeave = _props.onMouseLeave,\n onMouseDown = _props.onMouseDown,\n onTouchStart = _props.onTouchStart;\n\n var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align));\n var hiddenClassName = prefixCls + '-hidden';\n\n if (!visible) {\n this.currentAlignClassName = null;\n }\n\n var sizeStyle = {};\n if (stretch) {\n // Stretch with target\n if (stretch.indexOf('height') !== -1) {\n sizeStyle.height = targetHeight;\n } else if (stretch.indexOf('minHeight') !== -1) {\n sizeStyle.minHeight = targetHeight;\n }\n if (stretch.indexOf('width') !== -1) {\n sizeStyle.width = targetWidth;\n } else if (stretch.indexOf('minWidth') !== -1) {\n sizeStyle.minWidth = targetWidth;\n }\n\n // Delay force align to makes ui smooth\n if (!stretchChecked) {\n sizeStyle.visibility = 'hidden';\n setTimeout(function () {\n if (_this2.alignInstance) {\n _this2.alignInstance.forceAlign();\n }\n }, 0);\n }\n }\n\n var newStyle = (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sizeStyle, style, this.getZIndexStyle());\n\n var popupInnerProps = {\n className: className,\n prefixCls: prefixCls,\n ref: savePopupRef,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: newStyle\n };\n if (destroyPopupOnHide) {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName()\n },\n visible ? react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_align__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n align: align,\n onAlign: this.onAlign\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _PopupInner__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n visible: true\n }, popupInnerProps),\n children\n )\n ) : null\n );\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName(),\n showProp: 'xVisible'\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_align__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n xVisible: visible,\n childrenProps: { visible: 'xVisible' },\n disabled: !visible,\n align: align,\n onAlign: this.onAlign\n },\n react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _PopupInner__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n hiddenClassName: hiddenClassName\n }, popupInnerProps),\n children\n )\n )\n );\n };\n\n Popup.prototype.getZIndexStyle = function getZIndexStyle() {\n var style = {};\n var props = this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n };\n\n Popup.prototype.getMaskElement = function getMaskElement() {\n var props = this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = this.getMaskTransitionName();\n maskElement = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_LazyRenderBox__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n style: this.getZIndexStyle(),\n key: 'mask',\n className: props.prefixCls + '-mask',\n hiddenClassName: props.prefixCls + '-mask-hidden',\n visible: props.visible\n });\n if (maskTransition) {\n maskElement = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n {\n key: 'mask',\n showProp: 'visible',\n transitionAppear: true,\n component: '',\n transitionName: maskTransition\n },\n maskElement\n );\n }\n }\n return maskElement;\n };\n\n Popup.prototype.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n 'div',\n null,\n this.getMaskElement(),\n this.getPopupElement()\n );\n };\n\n return Popup;\n}(react__WEBPACK_IMPORTED_MODULE_4__.Component);\n\nPopup.propTypes = {\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n getClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onAlign: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n getRootDomNode: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n align: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().any),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n onMouseEnter: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onMouseLeave: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n onTouchStart: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node),\n point: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({\n pageX: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number),\n pageY: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().number)\n })\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this3 = this;\n\n this.onAlign = function (popupDomNode, align) {\n var props = _this3.props;\n var currentAlignClassName = props.getClassNameFromAlign(align);\n // FIX: https://github.com/react-component/trigger/issues/56\n // FIX: https://github.com/react-component/tooltip/issues/79\n if (_this3.currentAlignClassName !== currentAlignClassName) {\n _this3.currentAlignClassName = currentAlignClassName;\n popupDomNode.className = _this3.getClassName(currentAlignClassName);\n }\n props.onAlign(popupDomNode, align);\n };\n\n this.setStretchSize = function () {\n var _props2 = _this3.props,\n stretch = _props2.stretch,\n getRootDomNode = _props2.getRootDomNode,\n visible = _props2.visible;\n var _state2 = _this3.state,\n stretchChecked = _state2.stretchChecked,\n targetHeight = _state2.targetHeight,\n targetWidth = _state2.targetWidth;\n\n\n if (!stretch || !visible) {\n if (stretchChecked) {\n _this3.setState({ stretchChecked: false });\n }\n return;\n }\n\n var $ele = getRootDomNode();\n if (!$ele) return;\n\n var height = $ele.offsetHeight;\n var width = $ele.offsetWidth;\n\n if (targetHeight !== height || targetWidth !== width || !stretchChecked) {\n _this3.setState({\n stretchChecked: true,\n targetHeight: height,\n targetWidth: width\n });\n }\n };\n\n this.getTargetElement = function () {\n return _this3.props.getRootDomNode();\n };\n\n this.getAlignTarget = function () {\n var point = _this3.props.point;\n\n if (point) {\n return point;\n }\n return _this3.getTargetElement;\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Popup);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js?");
|
|
5008
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DoStep: () => (/* binding */ DoStep),\n/* harmony export */ SkipStep: () => (/* binding */ SkipStep),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ isActive: () => (/* binding */ isActive)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/hooks/useState */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interface */ \"../../node_modules/rc-motion/es/interface.js\");\n/* harmony import */ var _useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useIsomorphicLayoutEffect */ \"../../node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js\");\n/* harmony import */ var _useNextFrame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./useNextFrame */ \"../../node_modules/rc-motion/es/hooks/useNextFrame.js\");\n\n\n\n\n\n\nvar FULL_STEP_QUEUE = [_interface__WEBPACK_IMPORTED_MODULE_3__.STEP_PREPARE, _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_START, _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_ACTIVE, _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_ACTIVATED];\nvar SIMPLE_STEP_QUEUE = [_interface__WEBPACK_IMPORTED_MODULE_3__.STEP_PREPARE, _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_PREPARED];\n\n/** Skip current step */\nvar SkipStep = false;\n/** Current step should be update in */\nvar DoStep = true;\nfunction isActive(step) {\n return step === _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_ACTIVE || step === _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_ACTIVATED;\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (status, prepareOnly, callback) {\n var _useState = (0,rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_interface__WEBPACK_IMPORTED_MODULE_3__.STEP_NONE),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n step = _useState2[0],\n setStep = _useState2[1];\n var _useNextFrame = (0,_useNextFrame__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(),\n _useNextFrame2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useNextFrame, 2),\n nextFrame = _useNextFrame2[0],\n cancelNextFrame = _useNextFrame2[1];\n function startQueue() {\n setStep(_interface__WEBPACK_IMPORTED_MODULE_3__.STEP_PREPARE, true);\n }\n var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;\n (0,_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function () {\n if (step !== _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_NONE && step !== _interface__WEBPACK_IMPORTED_MODULE_3__.STEP_ACTIVATED) {\n var index = STEP_QUEUE.indexOf(step);\n var nextStep = STEP_QUEUE[index + 1];\n var result = callback(step);\n if (result === SkipStep) {\n // Skip when no needed\n setStep(nextStep, true);\n } else if (nextStep) {\n // Do as frame for step update\n nextFrame(function (info) {\n function doNext() {\n // Skip since current queue is ood\n if (info.isCanceled()) return;\n setStep(nextStep, true);\n }\n if (result === true) {\n doNext();\n } else {\n // Only promise should be async\n Promise.resolve(result).then(doNext);\n }\n });\n }\n }\n }, [status, step]);\n react__WEBPACK_IMPORTED_MODULE_2__.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [startQueue, step];\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/hooks/useStepQueue.js?");
|
|
4393
5009
|
|
|
4394
5010
|
/***/ }),
|
|
4395
5011
|
|
|
4396
|
-
/***/ "../../node_modules/rc-
|
|
4397
|
-
|
|
4398
|
-
!*** ../../node_modules/rc-
|
|
4399
|
-
|
|
5012
|
+
/***/ "../../node_modules/rc-motion/es/index.js":
|
|
5013
|
+
/*!************************************************!*\
|
|
5014
|
+
!*** ../../node_modules/rc-motion/es/index.js ***!
|
|
5015
|
+
\************************************************/
|
|
4400
5016
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4401
5017
|
|
|
4402
5018
|
"use strict";
|
|
4403
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
5019
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CSSMotionList: () => (/* reexport safe */ _CSSMotionList__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ Provider: () => (/* reexport safe */ _context__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _CSSMotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CSSMotion */ \"../../node_modules/rc-motion/es/CSSMotion.js\");\n/* harmony import */ var _CSSMotionList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSSMotionList */ \"../../node_modules/rc-motion/es/CSSMotionList.js\");\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./context */ \"../../node_modules/rc-motion/es/context.js\");\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_CSSMotion__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/index.js?");
|
|
4404
5020
|
|
|
4405
5021
|
/***/ }),
|
|
4406
5022
|
|
|
4407
|
-
/***/ "../../node_modules/rc-
|
|
4408
|
-
|
|
4409
|
-
!*** ../../node_modules/rc-
|
|
4410
|
-
|
|
5023
|
+
/***/ "../../node_modules/rc-motion/es/interface.js":
|
|
5024
|
+
/*!****************************************************!*\
|
|
5025
|
+
!*** ../../node_modules/rc-motion/es/interface.js ***!
|
|
5026
|
+
\****************************************************/
|
|
4411
5027
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4412
5028
|
|
|
4413
5029
|
"use strict";
|
|
4414
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-lifecycles-compat */ \"../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n/* harmony import */ var rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/Dom/contains */ \"../../node_modules/rc-util/es/Dom/contains.js\");\n/* harmony import */ var rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/Dom/addEventListener */ \"../../node_modules/rc-util/es/Dom/addEventListener.js\");\n/* harmony import */ var rc_util_es_ContainerRender__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/ContainerRender */ \"../../node_modules/rc-util/es/ContainerRender.js\");\n/* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/Portal */ \"../../node_modules/rc-util/es/Portal.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/utils.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/rc-dropdown/node_modules/rc-trigger/es/Popup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\nvar IS_REACT_16 = !!react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal;\n\nvar contextTypes = {\n rcTrigger: prop_types__WEBPACK_IMPORTED_MODULE_14___default().shape({\n onPopupMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func)\n })\n};\n\nvar Trigger = function (_React$Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Trigger, _React$Component);\n\n function Trigger(props) {\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Trigger);\n\n var _this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n\n ALL_HANDLERS.forEach(function (h) {\n _this['fire' + h] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n Trigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n Trigger.prototype.componentDidMount = function componentDidMount() {\n this.componentDidUpdate({}, {\n popupVisible: this.state.popupVisible\n });\n };\n\n Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {\n var props = this.props;\n var state = this.state;\n var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() {\n if (prevState.popupVisible !== state.popupVisible) {\n props.afterPopupVisibleChange(state.popupVisible);\n }\n };\n if (!IS_REACT_16) {\n this.renderComponent(null, triggerAfterPopupVisibleChange);\n }\n\n // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n if (state.popupVisible) {\n var currentDocument = void 0;\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'mousedown', this.onDocumentClick);\n }\n // always hide on mobile\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'touchstart', this.onDocumentClick);\n }\n // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(currentDocument, 'scroll', this.onContextMenuClose);\n }\n // close popup when trigger type contains 'onContextMenu' and window is blur.\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(window, 'blur', this.onContextMenuClose);\n }\n return;\n }\n\n this.clearOutsideHandler();\n };\n\n Trigger.prototype.componentWillUnmount = function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n };\n\n Trigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n Trigger.prototype.getPopupDomNode = function getPopupDomNode() {\n // for test\n if (this._component && this._component.getPopupDomNode) {\n return this._component.getPopupDomNode();\n }\n return null;\n };\n\n Trigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_12__.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n\n\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible });\n }\n this.props.onPopupVisibleChange(popupVisible);\n }\n\n // Always record the point position since mouseEnterDelay will delay the show\n if (alignPoint && event) {\n this.setPoint(event);\n }\n };\n\n Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n var point = event ? { pageX: event.pageX, pageY: event.pageY } : null;\n this.delayTimer = setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n };\n\n Trigger.prototype.clearDelayTimer = function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n };\n\n Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n };\n\n Trigger.prototype.createTwoChains = function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this['fire' + event];\n }\n return childPros[event] || props[event];\n };\n\n Trigger.prototype.isClickToShow = function isClickToShow() {\n var _props = this.props,\n action = _props.action,\n showAction = _props.showAction;\n\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() {\n var _props2 = this.props,\n action = _props2.action,\n showAction = _props2.showAction;\n\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n };\n\n Trigger.prototype.isClickToHide = function isClickToHide() {\n var _props3 = this.props,\n action = _props3.action,\n hideAction = _props3.hideAction;\n\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() {\n var _props4 = this.props,\n action = _props4.action,\n showAction = _props4.showAction;\n\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n };\n\n Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() {\n var _props5 = this.props,\n action = _props5.action,\n hideAction = _props5.hideAction;\n\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n };\n\n Trigger.prototype.isFocusToShow = function isFocusToShow() {\n var _props6 = this.props,\n action = _props6.action,\n showAction = _props6.showAction;\n\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n };\n\n Trigger.prototype.isBlurToHide = function isBlurToHide() {\n var _props7 = this.props,\n action = _props7.action,\n hideAction = _props7.hideAction;\n\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n };\n\n Trigger.prototype.forcePopupAlign = function forcePopupAlign() {\n if (this.state.popupVisible && this._component && this._component.alignInstance) {\n this._component.alignInstance.forceAlign();\n }\n };\n\n Trigger.prototype.fireEvents = function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n };\n\n Trigger.prototype.close = function close() {\n this.setPopupVisible(false);\n };\n\n Trigger.prototype.render = function render() {\n var _this3 = this;\n\n var popupVisible = this.state.popupVisible;\n var _props8 = this.props,\n children = _props8.children,\n forceRender = _props8.forceRender,\n alignPoint = _props8.alignPoint,\n className = _props8.className;\n\n var child = react__WEBPACK_IMPORTED_MODULE_4___default().Children.only(children);\n var newChildProps = { key: 'trigger' };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_11___default()(child && child.props && child.props.className, className);\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n var trigger = react__WEBPACK_IMPORTED_MODULE_4___default().cloneElement(child, newChildProps);\n\n if (!IS_REACT_16) {\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_util_es_ContainerRender__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n {\n parent: this,\n visible: popupVisible,\n autoMount: false,\n forceRender: forceRender,\n getComponent: this.getComponent,\n getContainer: this.getContainer\n },\n function (_ref2) {\n var renderComponent = _ref2.renderComponent;\n\n _this3.renderComponent = renderComponent;\n return trigger;\n }\n );\n }\n\n var portal = void 0;\n // prevent unmounting after it's rendered\n if (popupVisible || this._component || forceRender) {\n portal = react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate },\n this.getComponent()\n );\n }\n\n return [trigger, portal];\n };\n\n return Trigger;\n}((react__WEBPACK_IMPORTED_MODULE_4___default().Component));\n\nTrigger.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n action: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), prop_types__WEBPACK_IMPORTED_MODULE_14___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_14___default().string))]),\n showAction: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n hideAction: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n getPopupClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n onPopupVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n afterPopupVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n popup: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func)]).isRequired,\n popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n builtinPlacements: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n popupTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)]),\n popupAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().any),\n mouseEnterDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n mouseLeaveDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n zIndex: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n focusDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n blurDelay: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n getDocument: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n mask: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n maskClosable: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n onPopupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func),\n popupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object),\n popupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n defaultPopupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool),\n maskTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)]),\n maskAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool) // Maybe we can support user pass position in the future\n};\nTrigger.contextTypes = contextTypes;\nTrigger.childContextTypes = contextTypes;\nTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this4 = this;\n\n this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this4.props.mouseEnterDelay;\n\n _this4.fireEvents('onMouseEnter', e);\n _this4.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n this.onMouseMove = function (e) {\n _this4.fireEvents('onMouseMove', e);\n _this4.setPoint(e);\n };\n\n this.onMouseLeave = function (e) {\n _this4.fireEvents('onMouseLeave', e);\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onPopupMouseEnter = function () {\n _this4.clearDelayTimer();\n };\n\n this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this4._component && _this4._component.getPopupDomNode && (0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_this4._component.getPopupDomNode(), e.relatedTarget)) {\n return;\n }\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onFocus = function (e) {\n _this4.fireEvents('onFocus', e);\n // incase focusin and focusout\n _this4.clearDelayTimer();\n if (_this4.isFocusToShow()) {\n _this4.focusTime = Date.now();\n _this4.delaySetPopupVisible(true, _this4.props.focusDelay);\n }\n };\n\n this.onMouseDown = function (e) {\n _this4.fireEvents('onMouseDown', e);\n _this4.preClickTime = Date.now();\n };\n\n this.onTouchStart = function (e) {\n _this4.fireEvents('onTouchStart', e);\n _this4.preTouchTime = Date.now();\n };\n\n this.onBlur = function (e) {\n _this4.fireEvents('onBlur', e);\n _this4.clearDelayTimer();\n if (_this4.isBlurToHide()) {\n _this4.delaySetPopupVisible(false, _this4.props.blurDelay);\n }\n };\n\n this.onContextMenu = function (e) {\n e.preventDefault();\n _this4.fireEvents('onContextMenu', e);\n _this4.setPopupVisible(true, e);\n };\n\n this.onContextMenuClose = function () {\n if (_this4.isContextMenuToShow()) {\n _this4.close();\n }\n };\n\n this.onClick = function (event) {\n _this4.fireEvents('onClick', event);\n // focus will trigger click\n if (_this4.focusTime) {\n var preTime = void 0;\n if (_this4.preClickTime && _this4.preTouchTime) {\n preTime = Math.min(_this4.preClickTime, _this4.preTouchTime);\n } else if (_this4.preClickTime) {\n preTime = _this4.preClickTime;\n } else if (_this4.preTouchTime) {\n preTime = _this4.preTouchTime;\n }\n if (Math.abs(preTime - _this4.focusTime) < 20) {\n return;\n }\n _this4.focusTime = 0;\n }\n _this4.preClickTime = 0;\n _this4.preTouchTime = 0;\n\n // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n if (_this4.isClickToShow() && (_this4.isClickToHide() || _this4.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n var nextVisible = !_this4.state.popupVisible;\n if (_this4.isClickToHide() && !nextVisible || nextVisible && _this4.isClickToShow()) {\n _this4.setPopupVisible(!_this4.state.popupVisible, event);\n }\n };\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this4.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this4.hasPopupMouseDown = true;\n\n clearTimeout(_this4.mouseDownTimeout);\n _this4.mouseDownTimeout = setTimeout(function () {\n _this4.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.onDocumentClick = function (event) {\n if (_this4.props.mask && !_this4.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n var root = (0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4);\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(root, target) && !_this4.hasPopupMouseDown) {\n _this4.close();\n }\n };\n\n this.getRootDomNode = function () {\n return (0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props9 = _this4.props,\n popupPlacement = _props9.popupPlacement,\n builtinPlacements = _props9.builtinPlacements,\n prefixCls = _props9.prefixCls,\n alignPoint = _props9.alignPoint,\n getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0,_utils__WEBPACK_IMPORTED_MODULE_12__.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props10 = _this4.props,\n prefixCls = _props10.prefixCls,\n destroyPopupOnHide = _props10.destroyPopupOnHide,\n popupClassName = _props10.popupClassName,\n action = _props10.action,\n onPopupAlign = _props10.onPopupAlign,\n popupAnimation = _props10.popupAnimation,\n popupTransitionName = _props10.popupTransitionName,\n popupStyle = _props10.popupStyle,\n mask = _props10.mask,\n maskAnimation = _props10.maskAnimation,\n maskTransitionName = _props10.maskTransitionName,\n zIndex = _props10.zIndex,\n popup = _props10.popup,\n stretch = _props10.stretch,\n alignPoint = _props10.alignPoint;\n var _state = _this4.state,\n popupVisible = _state.popupVisible,\n point = _state.point;\n\n\n var align = _this4.getPopupAlign();\n\n var mouseProps = {};\n if (_this4.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this4.onPopupMouseEnter;\n }\n if (_this4.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this4.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this4.onPopupMouseDown;\n mouseProps.onTouchStart = _this4.onPopupMouseDown;\n\n return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\n _Popup__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: action,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this4.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this4.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this4.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this4.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer((0,react_dom__WEBPACK_IMPORTED_MODULE_5__.findDOMNode)(_this4)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.setPoint = function (point) {\n var alignPoint = _this4.props.alignPoint;\n\n if (!alignPoint || !point) return;\n\n _this4.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n this.handlePortalUpdate = function () {\n if (_this4.state.prevPopupVisible !== _this4.state.popupVisible) {\n _this4.props.afterPopupVisibleChange(_this4.state.popupVisible);\n }\n };\n\n this.savePopup = function (node) {\n _this4._component = node;\n };\n};\n\n(0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_6__.polyfill)(Trigger);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Trigger);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-dropdown/node_modules/rc-trigger/es/index.js?");
|
|
5030
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ STATUS_APPEAR: () => (/* binding */ STATUS_APPEAR),\n/* harmony export */ STATUS_ENTER: () => (/* binding */ STATUS_ENTER),\n/* harmony export */ STATUS_LEAVE: () => (/* binding */ STATUS_LEAVE),\n/* harmony export */ STATUS_NONE: () => (/* binding */ STATUS_NONE),\n/* harmony export */ STEP_ACTIVATED: () => (/* binding */ STEP_ACTIVATED),\n/* harmony export */ STEP_ACTIVE: () => (/* binding */ STEP_ACTIVE),\n/* harmony export */ STEP_NONE: () => (/* binding */ STEP_NONE),\n/* harmony export */ STEP_PREPARE: () => (/* binding */ STEP_PREPARE),\n/* harmony export */ STEP_PREPARED: () => (/* binding */ STEP_PREPARED),\n/* harmony export */ STEP_START: () => (/* binding */ STEP_START)\n/* harmony export */ });\nvar STATUS_NONE = 'none';\nvar STATUS_APPEAR = 'appear';\nvar STATUS_ENTER = 'enter';\nvar STATUS_LEAVE = 'leave';\nvar STEP_NONE = 'none';\nvar STEP_PREPARE = 'prepare';\nvar STEP_START = 'start';\nvar STEP_ACTIVE = 'active';\nvar STEP_ACTIVATED = 'end';\n/**\n * Used for disabled motion case.\n * Prepare stage will still work but start & active will be skipped.\n */\nvar STEP_PREPARED = 'prepared';\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/interface.js?");
|
|
4415
5031
|
|
|
4416
5032
|
/***/ }),
|
|
4417
5033
|
|
|
4418
|
-
/***/ "../../node_modules/rc-
|
|
4419
|
-
|
|
4420
|
-
!*** ../../node_modules/rc-
|
|
4421
|
-
|
|
5034
|
+
/***/ "../../node_modules/rc-motion/es/util/diff.js":
|
|
5035
|
+
/*!****************************************************!*\
|
|
5036
|
+
!*** ../../node_modules/rc-motion/es/util/diff.js ***!
|
|
5037
|
+
\****************************************************/
|
|
4422
5038
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4423
5039
|
|
|
4424
5040
|
"use strict";
|
|
4425
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
5041
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ STATUS_ADD: () => (/* binding */ STATUS_ADD),\n/* harmony export */ STATUS_KEEP: () => (/* binding */ STATUS_KEEP),\n/* harmony export */ STATUS_REMOVE: () => (/* binding */ STATUS_REMOVE),\n/* harmony export */ STATUS_REMOVED: () => (/* binding */ STATUS_REMOVED),\n/* harmony export */ diffKeys: () => (/* binding */ diffKeys),\n/* harmony export */ parseKeys: () => (/* binding */ parseKeys),\n/* harmony export */ wrapKeyToObject: () => (/* binding */ wrapKeyToObject)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n\n\nvar STATUS_ADD = 'add';\nvar STATUS_KEEP = 'keep';\nvar STATUS_REMOVE = 'remove';\nvar STATUS_REMOVED = 'removed';\nfunction wrapKeyToObject(key) {\n var keyObj;\n if (key && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(key) === 'object' && 'key' in key) {\n keyObj = key;\n } else {\n keyObj = {\n key: key\n };\n }\n return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, keyObj), {}, {\n key: String(keyObj.key)\n });\n}\nfunction parseKeys() {\n var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return keys.map(wrapKeyToObject);\n}\nfunction diffKeys() {\n var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var list = [];\n var currentIndex = 0;\n var currentLen = currentKeys.length;\n var prevKeyObjects = parseKeys(prevKeys);\n var currentKeyObjects = parseKeys(currentKeys);\n\n // Check prev keys to insert or keep\n prevKeyObjects.forEach(function (keyObj) {\n var hit = false;\n for (var i = currentIndex; i < currentLen; i += 1) {\n var currentKeyObj = currentKeyObjects[i];\n if (currentKeyObj.key === keyObj.key) {\n // New added keys should add before current key\n if (currentIndex < i) {\n list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {\n return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n currentIndex = i;\n }\n list.push((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, currentKeyObj), {}, {\n status: STATUS_KEEP\n }));\n currentIndex += 1;\n hit = true;\n break;\n }\n }\n\n // If not hit, it means key is removed\n if (!hit) {\n list.push((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, keyObj), {}, {\n status: STATUS_REMOVE\n }));\n }\n });\n\n // Add rest to the list\n if (currentIndex < currentLen) {\n list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {\n return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n }\n\n /**\n * Merge same key when it remove and add again:\n * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]\n */\n var keys = {};\n list.forEach(function (_ref) {\n var key = _ref.key;\n keys[key] = (keys[key] || 0) + 1;\n });\n var duplicatedKeys = Object.keys(keys).filter(function (key) {\n return keys[key] > 1;\n });\n duplicatedKeys.forEach(function (matchKey) {\n // Remove `STATUS_REMOVE` node.\n list = list.filter(function (_ref2) {\n var key = _ref2.key,\n status = _ref2.status;\n return key !== matchKey || status !== STATUS_REMOVE;\n });\n\n // Update `STATUS_ADD` to `STATUS_KEEP`\n list.forEach(function (node) {\n if (node.key === matchKey) {\n // eslint-disable-next-line no-param-reassign\n node.status = STATUS_KEEP;\n }\n });\n });\n return list;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/util/diff.js?");
|
|
4426
5042
|
|
|
4427
5043
|
/***/ }),
|
|
4428
5044
|
|
|
4429
|
-
/***/ "../../node_modules/rc-
|
|
4430
|
-
|
|
4431
|
-
!*** ../../node_modules/rc-
|
|
4432
|
-
|
|
5045
|
+
/***/ "../../node_modules/rc-motion/es/util/motion.js":
|
|
5046
|
+
/*!******************************************************!*\
|
|
5047
|
+
!*** ../../node_modules/rc-motion/es/util/motion.js ***!
|
|
5048
|
+
\******************************************************/
|
|
4433
5049
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4434
5050
|
|
|
4435
5051
|
"use strict";
|
|
4436
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/KeyCode */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/KeyCode.js\");\n/* harmony import */ var rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/hooks/useLayoutEffect */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/hooks/useLayoutEffect.js\");\n/* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/ref */ \"../../node_modules/rc-input-number/node_modules/rc-util/es/ref.js\");\n/* harmony import */ var _rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @rc-component/mini-decimal */ \"../../node_modules/@rc-component/mini-decimal/es/index.js\");\n/* harmony import */ var _StepHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./StepHandler */ \"../../node_modules/rc-input-number/es/StepHandler.js\");\n/* harmony import */ var _utils_numberUtil__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/numberUtil */ \"../../node_modules/rc-input-number/es/utils/numberUtil.js\");\n/* harmony import */ var _hooks_useCursor__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./hooks/useCursor */ \"../../node_modules/rc-input-number/es/hooks/useCursor.js\");\n/* harmony import */ var _hooks_useFrame__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./hooks/useFrame */ \"../../node_modules/rc-input-number/es/hooks/useFrame.js\");\n\n\n\n\n\nvar _excluded = [\"prefixCls\", \"className\", \"style\", \"min\", \"max\", \"step\", \"defaultValue\", \"value\", \"disabled\", \"readOnly\", \"upHandler\", \"downHandler\", \"keyboard\", \"controls\", \"stringMode\", \"parser\", \"formatter\", \"precision\", \"decimalSeparator\", \"onChange\", \"onInput\", \"onPressEnter\", \"onStep\"];\n\n\n\n\n\n\n\n\n\n\n\n/**\n * We support `stringMode` which need handle correct type when user call in onChange\n * format max or min value\n * 1. if isInvalid return null\n * 2. if precision is undefined, return decimal\n * 3. format with precision\n * I. if max > 0, round down with precision. Example: max= 3.5, precision=0 afterFormat: 3\n * II. if max < 0, round up with precision. Example: max= -3.5, precision=0 afterFormat: -4\n * III. if min > 0, round up with precision. Example: min= 3.5, precision=0 afterFormat: 4\n * IV. if min < 0, round down with precision. Example: max= -3.5, precision=0 afterFormat: -3\n */\nvar getDecimalValue = function getDecimalValue(stringMode, decimalValue) {\n if (stringMode || decimalValue.isEmpty()) {\n return decimalValue.toString();\n }\n return decimalValue.toNumber();\n};\nvar getDecimalIfValidate = function getDecimalIfValidate(value) {\n var decimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(value);\n return decimal.isInvalidate() ? null : decimal;\n};\nvar InputNumber = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.forwardRef(function (props, ref) {\n var _classNames;\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-input-number' : _props$prefixCls,\n className = props.className,\n style = props.style,\n min = props.min,\n max = props.max,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n defaultValue = props.defaultValue,\n value = props.value,\n disabled = props.disabled,\n readOnly = props.readOnly,\n upHandler = props.upHandler,\n downHandler = props.downHandler,\n keyboard = props.keyboard,\n _props$controls = props.controls,\n controls = _props$controls === void 0 ? true : _props$controls,\n stringMode = props.stringMode,\n parser = props.parser,\n formatter = props.formatter,\n precision = props.precision,\n decimalSeparator = props.decimalSeparator,\n onChange = props.onChange,\n onInput = props.onInput,\n onPressEnter = props.onPressEnter,\n onStep = props.onStep,\n inputProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props, _excluded);\n var inputClassName = \"\".concat(prefixCls, \"-input\");\n var inputRef = react__WEBPACK_IMPORTED_MODULE_5__.useRef(null);\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__.useState(false),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState, 2),\n focus = _React$useState2[0],\n setFocus = _React$useState2[1];\n var userTypingRef = react__WEBPACK_IMPORTED_MODULE_5__.useRef(false);\n var compositionRef = react__WEBPACK_IMPORTED_MODULE_5__.useRef(false);\n var shiftKeyRef = react__WEBPACK_IMPORTED_MODULE_5__.useRef(false);\n\n // ============================ Value =============================\n // Real value control\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_5__.useState(function () {\n return (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(value !== null && value !== void 0 ? value : defaultValue);\n }),\n _React$useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState3, 2),\n decimalValue = _React$useState4[0],\n setDecimalValue = _React$useState4[1];\n function setUncontrolledDecimalValue(newDecimal) {\n if (value === undefined) {\n setDecimalValue(newDecimal);\n }\n }\n\n // ====================== Parser & Formatter ======================\n /**\n * `precision` is used for formatter & onChange.\n * It will auto generate by `value` & `step`.\n * But it will not block user typing.\n *\n * Note: Auto generate `precision` is used for legacy logic.\n * We should remove this since we already support high precision with BigInt.\n *\n * @param number Provide which number should calculate precision\n * @param userTyping Change by user typing\n */\n var getPrecision = react__WEBPACK_IMPORTED_MODULE_5__.useCallback(function (numStr, userTyping) {\n if (userTyping) {\n return undefined;\n }\n if (precision >= 0) {\n return precision;\n }\n return Math.max((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.getNumberPrecision)(numStr), (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.getNumberPrecision)(step));\n }, [precision, step]);\n\n // >>> Parser\n var mergedParser = react__WEBPACK_IMPORTED_MODULE_5__.useCallback(function (num) {\n var numStr = String(num);\n if (parser) {\n return parser(numStr);\n }\n var parsedStr = numStr;\n if (decimalSeparator) {\n parsedStr = parsedStr.replace(decimalSeparator, '.');\n }\n\n // [Legacy] We still support auto convert `$ 123,456` to `123456`\n return parsedStr.replace(/[^\\w.-]+/g, '');\n }, [parser, decimalSeparator]);\n\n // >>> Formatter\n var inputValueRef = react__WEBPACK_IMPORTED_MODULE_5__.useRef('');\n var mergedFormatter = react__WEBPACK_IMPORTED_MODULE_5__.useCallback(function (number, userTyping) {\n if (formatter) {\n return formatter(number, {\n userTyping: userTyping,\n input: String(inputValueRef.current)\n });\n }\n var str = typeof number === 'number' ? (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.num2str)(number) : number;\n\n // User typing will not auto format with precision directly\n if (!userTyping) {\n var mergedPrecision = getPrecision(str, userTyping);\n if ((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.validateNumber)(str) && (decimalSeparator || mergedPrecision >= 0)) {\n // Separator\n var separatorStr = decimalSeparator || '.';\n str = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.toFixed)(str, separatorStr, mergedPrecision);\n }\n }\n return str;\n }, [formatter, getPrecision, decimalSeparator]);\n\n // ========================== InputValue ==========================\n /**\n * Input text value control\n *\n * User can not update input content directly. It update with follow rules by priority:\n * 1. controlled `value` changed\n * * [SPECIAL] Typing like `1.` should not immediately convert to `1`\n * 2. User typing with format (not precision)\n * 3. Blur or Enter trigger revalidate\n */\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_5__.useState(function () {\n var initValue = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;\n if (decimalValue.isInvalidate() && ['string', 'number'].includes((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(initValue))) {\n return Number.isNaN(initValue) ? '' : initValue;\n }\n return mergedFormatter(decimalValue.toString(), false);\n }),\n _React$useState6 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_React$useState5, 2),\n inputValue = _React$useState6[0],\n setInternalInputValue = _React$useState6[1];\n inputValueRef.current = inputValue;\n\n // Should always be string\n function setInputValue(newValue, userTyping) {\n setInternalInputValue(mergedFormatter(\n // Invalidate number is sometime passed by external control, we should let it go\n // Otherwise is controlled by internal interactive logic which check by userTyping\n // You can ref 'show limited value when input is not focused' test for more info.\n newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping));\n }\n\n // >>> Max & Min limit\n var maxDecimal = react__WEBPACK_IMPORTED_MODULE_5__.useMemo(function () {\n return getDecimalIfValidate(max);\n }, [max, precision]);\n var minDecimal = react__WEBPACK_IMPORTED_MODULE_5__.useMemo(function () {\n return getDecimalIfValidate(min);\n }, [min, precision]);\n var upDisabled = react__WEBPACK_IMPORTED_MODULE_5__.useMemo(function () {\n if (!maxDecimal || !decimalValue || decimalValue.isInvalidate()) {\n return false;\n }\n return maxDecimal.lessEquals(decimalValue);\n }, [maxDecimal, decimalValue]);\n var downDisabled = react__WEBPACK_IMPORTED_MODULE_5__.useMemo(function () {\n if (!minDecimal || !decimalValue || decimalValue.isInvalidate()) {\n return false;\n }\n return decimalValue.lessEquals(minDecimal);\n }, [minDecimal, decimalValue]);\n\n // Cursor controller\n var _useCursor = (0,_hooks_useCursor__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(inputRef.current, focus),\n _useCursor2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useCursor, 2),\n recordCursor = _useCursor2[0],\n restoreCursor = _useCursor2[1];\n\n // ============================= Data =============================\n /**\n * Find target value closet within range.\n * e.g. [11, 28]:\n * 3 => 11\n * 23 => 23\n * 99 => 28\n */\n var getRangeValue = function getRangeValue(target) {\n // target > max\n if (maxDecimal && !target.lessEquals(maxDecimal)) {\n return maxDecimal;\n }\n\n // target < min\n if (minDecimal && !minDecimal.lessEquals(target)) {\n return minDecimal;\n }\n return null;\n };\n\n /**\n * Check value is in [min, max] range\n */\n var isInRange = function isInRange(target) {\n return !getRangeValue(target);\n };\n\n /**\n * Trigger `onChange` if value validated and not equals of origin.\n * Return the value that re-align in range.\n */\n var triggerValueUpdate = function triggerValueUpdate(newValue, userTyping) {\n var updateValue = newValue;\n var isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();\n\n // Skip align value when trigger value is empty.\n // We just trigger onChange(null)\n // This should not block user typing\n if (!updateValue.isEmpty() && !userTyping) {\n // Revert value in range if needed\n updateValue = getRangeValue(updateValue) || updateValue;\n isRangeValidate = true;\n }\n if (!readOnly && !disabled && isRangeValidate) {\n var numStr = updateValue.toString();\n var mergedPrecision = getPrecision(numStr, userTyping);\n if (mergedPrecision >= 0) {\n updateValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.toFixed)(numStr, '.', mergedPrecision));\n\n // When to fixed. The value may out of min & max range.\n // 4 in [0, 3.8] => 3.8 => 4 (toFixed)\n if (!isInRange(updateValue)) {\n updateValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])((0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__.toFixed)(numStr, '.', mergedPrecision, true));\n }\n }\n\n // Trigger event\n if (!updateValue.equals(decimalValue)) {\n setUncontrolledDecimalValue(updateValue);\n onChange === null || onChange === void 0 ? void 0 : onChange(updateValue.isEmpty() ? null : getDecimalValue(stringMode, updateValue));\n\n // Reformat input if value is not controlled\n if (value === undefined) {\n setInputValue(updateValue, userTyping);\n }\n }\n return updateValue;\n }\n return decimalValue;\n };\n\n // ========================== User Input ==========================\n var onNextPromise = (0,_hooks_useFrame__WEBPACK_IMPORTED_MODULE_14__[\"default\"])();\n\n // >>> Collect input value\n var collectInputValue = function collectInputValue(inputStr) {\n recordCursor();\n\n // Update inputValue incase input can not parse as number\n setInternalInputValue(inputStr);\n\n // Parse number\n if (!compositionRef.current) {\n var finalValue = mergedParser(inputStr);\n var finalDecimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(finalValue);\n if (!finalDecimal.isNaN()) {\n triggerValueUpdate(finalDecimal, true);\n }\n }\n\n // Trigger onInput later to let user customize value if they want do handle something after onChange\n onInput === null || onInput === void 0 ? void 0 : onInput(inputStr);\n\n // optimize for chinese input experience\n // https://github.com/ant-design/ant-design/issues/8196\n onNextPromise(function () {\n var nextInputStr = inputStr;\n if (!parser) {\n nextInputStr = inputStr.replace(/。/g, '.');\n }\n if (nextInputStr !== inputStr) {\n collectInputValue(nextInputStr);\n }\n });\n };\n\n // >>> Composition\n var onCompositionStart = function onCompositionStart() {\n compositionRef.current = true;\n };\n var onCompositionEnd = function onCompositionEnd() {\n compositionRef.current = false;\n collectInputValue(inputRef.current.value);\n };\n\n // >>> Input\n var onInternalInput = function onInternalInput(e) {\n collectInputValue(e.target.value);\n };\n\n // ============================= Step =============================\n var onInternalStep = function onInternalStep(up) {\n var _inputRef$current;\n // Ignore step since out of range\n if (up && upDisabled || !up && downDisabled) {\n return;\n }\n\n // Clear typing status since it may caused by up & down key.\n // We should sync with input value.\n userTypingRef.current = false;\n var stepDecimal = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(shiftKeyRef.current ? (0,_utils_numberUtil__WEBPACK_IMPORTED_MODULE_12__.getDecupleSteps)(step) : step);\n if (!up) {\n stepDecimal = stepDecimal.negate();\n }\n var target = (decimalValue || (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(0)).add(stepDecimal.toString());\n var updatedValue = triggerValueUpdate(target, false);\n onStep === null || onStep === void 0 ? void 0 : onStep(getDecimalValue(stringMode, updatedValue), {\n offset: shiftKeyRef.current ? (0,_utils_numberUtil__WEBPACK_IMPORTED_MODULE_12__.getDecupleSteps)(step) : step,\n type: up ? 'up' : 'down'\n });\n (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();\n };\n\n // ============================ Flush =============================\n /**\n * Flush current input content to trigger value change & re-formatter input if needed\n */\n var flushInputValue = function flushInputValue(userTyping) {\n var parsedValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(mergedParser(inputValue));\n var formatValue = parsedValue;\n if (!parsedValue.isNaN()) {\n // Only validate value or empty value can be re-fill to inputValue\n // Reassign the formatValue within ranged of trigger control\n formatValue = triggerValueUpdate(parsedValue, userTyping);\n } else {\n formatValue = decimalValue;\n }\n if (value !== undefined) {\n // Reset back with controlled value first\n setInputValue(decimalValue, false);\n } else if (!formatValue.isNaN()) {\n // Reset input back since no validate value\n setInputValue(formatValue, false);\n }\n };\n\n // Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)\n var onBeforeInput = function onBeforeInput() {\n userTypingRef.current = true;\n };\n var onKeyDown = function onKeyDown(event) {\n var which = event.which,\n shiftKey = event.shiftKey;\n userTypingRef.current = true;\n if (shiftKey) {\n shiftKeyRef.current = true;\n } else {\n shiftKeyRef.current = false;\n }\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ENTER) {\n if (!compositionRef.current) {\n userTypingRef.current = false;\n }\n flushInputValue(false);\n onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event);\n }\n if (keyboard === false) {\n return;\n }\n\n // Do step\n if (!compositionRef.current && [rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[\"default\"].UP, rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[\"default\"].DOWN].includes(which)) {\n onInternalStep(rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[\"default\"].UP === which);\n event.preventDefault();\n }\n };\n var onKeyUp = function onKeyUp() {\n userTypingRef.current = false;\n shiftKeyRef.current = false;\n };\n\n // >>> Focus & Blur\n var onBlur = function onBlur() {\n flushInputValue(false);\n setFocus(false);\n userTypingRef.current = false;\n };\n\n // ========================== Controlled ==========================\n // Input by precision\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n if (!decimalValue.isInvalidate()) {\n setInputValue(decimalValue, false);\n }\n }, [precision]);\n\n // Input by value\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n var newValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(value);\n setDecimalValue(newValue);\n var currentParsedValue = (0,_rc_component_mini_decimal__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(mergedParser(inputValue));\n\n // When user typing from `1.2` to `1.`, we should not convert to `1` immediately.\n // But let it go if user set `formatter`\n if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {\n // Update value as effect\n setInputValue(newValue, userTypingRef.current);\n }\n }, [value]);\n\n // ============================ Cursor ============================\n (0,rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_8__.useLayoutUpdateEffect)(function () {\n if (formatter) {\n restoreCursor();\n }\n }, [inputValue]);\n\n // ============================ Render ============================\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_classNames, \"\".concat(prefixCls, \"-focused\"), focus), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_classNames, \"\".concat(prefixCls, \"-readonly\"), readOnly), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_classNames, \"\".concat(prefixCls, \"-not-a-number\"), decimalValue.isNaN()), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_classNames, \"\".concat(prefixCls, \"-out-of-range\"), !decimalValue.isInvalidate() && !isInRange(decimalValue)), _classNames)),\n style: style,\n onFocus: function onFocus() {\n setFocus(true);\n },\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onCompositionStart: onCompositionStart,\n onCompositionEnd: onCompositionEnd,\n onBeforeInput: onBeforeInput\n }, controls && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(_StepHandler__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n prefixCls: prefixCls,\n upNode: upHandler,\n downNode: downHandler,\n upDisabled: upDisabled,\n downDisabled: downDisabled,\n onStep: onInternalStep\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", {\n className: \"\".concat(inputClassName, \"-wrap\")\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"input\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n autoComplete: \"off\",\n role: \"spinbutton\",\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": decimalValue.isInvalidate() ? null : decimalValue.toString(),\n step: step\n }, inputProps, {\n ref: (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__.composeRef)(inputRef, ref),\n className: inputClassName,\n value: inputValue,\n onChange: onInternalInput,\n disabled: disabled,\n readOnly: readOnly\n }))));\n});\nInputNumber.displayName = 'InputNumber';\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InputNumber);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-input-number/es/InputNumber.js?");
|
|
5052
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ animationEndName: () => (/* binding */ animationEndName),\n/* harmony export */ getTransitionName: () => (/* binding */ getTransitionName),\n/* harmony export */ getVendorPrefixedEventName: () => (/* binding */ getVendorPrefixedEventName),\n/* harmony export */ getVendorPrefixes: () => (/* binding */ getVendorPrefixes),\n/* harmony export */ supportTransition: () => (/* binding */ supportTransition),\n/* harmony export */ transitionEndName: () => (/* binding */ transitionEndName)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Dom/canUseDom */ \"../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js\");\n\n\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\".concat(styleProp)] = \"webkit\".concat(eventName);\n prefixes[\"Moz\".concat(styleProp)] = \"moz\".concat(eventName);\n prefixes[\"ms\".concat(styleProp)] = \"MS\".concat(eventName);\n prefixes[\"O\".concat(styleProp)] = \"o\".concat(eventName.toLowerCase());\n return prefixes;\n}\nfunction getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n return prefixes;\n}\nvar vendorPrefixes = getVendorPrefixes((0,rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), typeof window !== 'undefined' ? window : {});\nvar style = {};\nif ((0,rc_util_es_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__[\"default\"])()) {\n var _document$createEleme = document.createElement('div');\n style = _document$createEleme.style;\n}\nvar prefixedEventNames = {};\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n var prefixMap = vendorPrefixes[eventName];\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n return '';\n}\nvar internalAnimationEndName = getVendorPrefixedEventName('animationend');\nvar internalTransitionEndName = getVendorPrefixedEventName('transitionend');\nvar supportTransition = !!(internalAnimationEndName && internalTransitionEndName);\nvar animationEndName = internalAnimationEndName || 'animationend';\nvar transitionEndName = internalTransitionEndName || 'transitionend';\nfunction getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(transitionName) === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n return \"\".concat(transitionName, \"-\").concat(transitionType);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/es/util/motion.js?");
|
|
4437
5053
|
|
|
4438
5054
|
/***/ }),
|
|
4439
5055
|
|
|
4440
|
-
/***/ "../../node_modules/rc-
|
|
4441
|
-
|
|
4442
|
-
!*** ../../node_modules/rc-
|
|
4443
|
-
|
|
5056
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js":
|
|
5057
|
+
/*!*****************************************************************************!*\
|
|
5058
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js ***!
|
|
5059
|
+
\*****************************************************************************/
|
|
4444
5060
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4445
5061
|
|
|
4446
5062
|
"use strict";
|
|
4447
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */
|
|
5063
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ canUseDom)\n/* harmony export */ });\nfunction canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js?");
|
|
4448
5064
|
|
|
4449
5065
|
/***/ }),
|
|
4450
5066
|
|
|
4451
|
-
/***/ "../../node_modules/rc-
|
|
4452
|
-
|
|
4453
|
-
!*** ../../node_modules/rc-
|
|
4454
|
-
|
|
5067
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/Dom/findDOMNode.js":
|
|
5068
|
+
/*!*******************************************************************************!*\
|
|
5069
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/Dom/findDOMNode.js ***!
|
|
5070
|
+
\*******************************************************************************/
|
|
4455
5071
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4456
5072
|
|
|
4457
5073
|
"use strict";
|
|
4458
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */
|
|
5074
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ findDOMNode),\n/* harmony export */ getDOM: () => (/* binding */ getDOM),\n/* harmony export */ isDOM: () => (/* binding */ isDOM)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n\n\n\nfunction isDOM(node) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Element\n // Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement\n return node instanceof HTMLElement || node instanceof SVGElement;\n}\n\n/**\n * Retrieves a DOM node via a ref, and does not invoke `findDOMNode`.\n */\nfunction getDOM(node) {\n if (node && (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node) === 'object' && isDOM(node.nativeElement)) {\n return node.nativeElement;\n }\n if (isDOM(node)) {\n return node;\n }\n return null;\n}\n\n/**\n * Return if a node is a DOM node. Else will return by `findDOMNode`\n */\nfunction findDOMNode(node) {\n var domNode = getDOM(node);\n if (domNode) {\n return domNode;\n }\n if (node instanceof (react__WEBPACK_IMPORTED_MODULE_1___default().Component)) {\n var _ReactDOM$findDOMNode;\n return (_ReactDOM$findDOMNode = react_dom__WEBPACK_IMPORTED_MODULE_2__.findDOMNode) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call(react_dom__WEBPACK_IMPORTED_MODULE_2__, node);\n }\n return null;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/Dom/findDOMNode.js?");
|
|
4459
5075
|
|
|
4460
5076
|
/***/ }),
|
|
4461
5077
|
|
|
4462
|
-
/***/ "../../node_modules/rc-
|
|
4463
|
-
|
|
4464
|
-
!*** ../../node_modules/rc-
|
|
4465
|
-
|
|
5078
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js":
|
|
5079
|
+
/*!******************************************************************************!*\
|
|
5080
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js ***!
|
|
5081
|
+
\******************************************************************************/
|
|
4466
5082
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4467
5083
|
|
|
4468
5084
|
"use strict";
|
|
4469
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (
|
|
5085
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction useEvent(callback) {\n var fnRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n fnRef.current = callback;\n var memoFn = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function () {\n var _fnRef$current;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));\n }, []);\n return memoFn;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js?");
|
|
4470
5086
|
|
|
4471
5087
|
/***/ }),
|
|
4472
5088
|
|
|
4473
|
-
/***/ "../../node_modules/rc-
|
|
4474
|
-
|
|
4475
|
-
!*** ../../node_modules/rc-
|
|
4476
|
-
|
|
5089
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useLayoutEffect.js":
|
|
5090
|
+
/*!*************************************************************************************!*\
|
|
5091
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useLayoutEffect.js ***!
|
|
5092
|
+
\*************************************************************************************/
|
|
4477
5093
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4478
5094
|
|
|
4479
5095
|
"use strict";
|
|
4480
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var
|
|
5096
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ useLayoutUpdateEffect: () => (/* binding */ useLayoutUpdateEffect)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dom/canUseDom */ \"../../node_modules/rc-motion/node_modules/rc-util/es/Dom/canUseDom.js\");\n\n\n\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useInternalLayoutEffect = true && (0,_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__[\"default\"])() ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;\nvar useLayoutEffect = function useLayoutEffect(callback, deps) {\n var firstMountRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(true);\n useInternalLayoutEffect(function () {\n return callback(firstMountRef.current);\n }, deps);\n\n // We tell react that first mount has passed\n useInternalLayoutEffect(function () {\n firstMountRef.current = false;\n return function () {\n firstMountRef.current = true;\n };\n }, []);\n};\nvar useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n useLayoutEffect(function (firstMount) {\n if (!firstMount) {\n return callback();\n }\n }, deps);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useLayoutEffect);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useLayoutEffect.js?");
|
|
4481
5097
|
|
|
4482
5098
|
/***/ }),
|
|
4483
5099
|
|
|
4484
|
-
/***/ "../../node_modules/rc-
|
|
4485
|
-
|
|
4486
|
-
!*** ../../node_modules/rc-
|
|
4487
|
-
|
|
5100
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMemo.js":
|
|
5101
|
+
/*!*****************************************************************************!*\
|
|
5102
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMemo.js ***!
|
|
5103
|
+
\*****************************************************************************/
|
|
4488
5104
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4489
5105
|
|
|
4490
5106
|
"use strict";
|
|
4491
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
5107
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useMemo)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMemo.js?");
|
|
4492
5108
|
|
|
4493
5109
|
/***/ }),
|
|
4494
5110
|
|
|
4495
|
-
/***/ "../../node_modules/rc-
|
|
4496
|
-
|
|
4497
|
-
!*** ../../node_modules/rc-
|
|
4498
|
-
|
|
5111
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMergedState.js":
|
|
5112
|
+
/*!************************************************************************************!*\
|
|
5113
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMergedState.js ***!
|
|
5114
|
+
\************************************************************************************/
|
|
4499
5115
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4500
5116
|
|
|
4501
5117
|
"use strict";
|
|
4502
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */
|
|
5118
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useMergedState)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _useEvent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useEvent */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js\");\n/* harmony import */ var _useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useLayoutEffect */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useLayoutEffect.js\");\n/* harmony import */ var _useState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useState */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js\");\n\n\n\n\n/** We only think `undefined` is empty */\nfunction hasValue(value) {\n return value !== undefined;\n}\n\n/**\n * Similar to `useState` but will use props value if provided.\n * Note that internal use rc-util `useState` hook.\n */\nfunction useMergedState(defaultStateValue, option) {\n var _ref = option || {},\n defaultValue = _ref.defaultValue,\n value = _ref.value,\n onChange = _ref.onChange,\n postState = _ref.postState;\n\n // ======================= Init =======================\n var _useState = (0,_useState__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n if (hasValue(value)) {\n return value;\n } else if (hasValue(defaultValue)) {\n return typeof defaultValue === 'function' ? defaultValue() : defaultValue;\n } else {\n return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;\n }\n }),\n _useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n innerValue = _useState2[0],\n setInnerValue = _useState2[1];\n var mergedValue = value !== undefined ? value : innerValue;\n var postMergedValue = postState ? postState(mergedValue) : mergedValue;\n\n // ====================== Change ======================\n var onChangeFn = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(onChange);\n var _useState3 = (0,_useState__WEBPACK_IMPORTED_MODULE_3__[\"default\"])([mergedValue]),\n _useState4 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n prevValue = _useState4[0],\n setPrevValue = _useState4[1];\n (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {\n var prev = prevValue[0];\n if (innerValue !== prev) {\n onChangeFn(innerValue, prev);\n }\n }, [prevValue]);\n\n // Sync value back to `undefined` when it from control to un-control\n (0,_useLayoutEffect__WEBPACK_IMPORTED_MODULE_2__.useLayoutUpdateEffect)(function () {\n if (!hasValue(value)) {\n setInnerValue(value);\n }\n }, [value]);\n\n // ====================== Update ======================\n var triggerChange = (0,_useEvent__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function (updater, ignoreDestroy) {\n setInnerValue(updater, ignoreDestroy);\n setPrevValue([mergedValue], ignoreDestroy);\n });\n return [postMergedValue, triggerChange];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMergedState.js?");
|
|
4503
5119
|
|
|
4504
5120
|
/***/ }),
|
|
4505
5121
|
|
|
4506
|
-
/***/ "../../node_modules/rc-
|
|
4507
|
-
|
|
4508
|
-
!*** ../../node_modules/rc-
|
|
4509
|
-
|
|
5122
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js":
|
|
5123
|
+
/*!******************************************************************************!*\
|
|
5124
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js ***!
|
|
5125
|
+
\******************************************************************************/
|
|
4510
5126
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4511
5127
|
|
|
4512
5128
|
"use strict";
|
|
4513
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (
|
|
5129
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useSafeState)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nfunction useSafeState(defaultValue) {\n var destroyRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(false);\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__.useState(defaultValue),\n _React$useState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$useState, 2),\n value = _React$useState2[0],\n setValue = _React$useState2[1];\n react__WEBPACK_IMPORTED_MODULE_1__.useEffect(function () {\n destroyRef.current = false;\n return function () {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useState.js?");
|
|
4514
5130
|
|
|
4515
5131
|
/***/ }),
|
|
4516
5132
|
|
|
4517
|
-
/***/ "../../node_modules/rc-
|
|
4518
|
-
|
|
4519
|
-
!*** ../../node_modules/rc-
|
|
4520
|
-
|
|
5133
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useSyncState.js":
|
|
5134
|
+
/*!**********************************************************************************!*\
|
|
5135
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useSyncState.js ***!
|
|
5136
|
+
\**********************************************************************************/
|
|
4521
5137
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4522
5138
|
|
|
4523
5139
|
"use strict";
|
|
4524
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (
|
|
5140
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ useSyncState)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _useEvent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useEvent */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js\");\n\n\n\n/**\n * Same as React.useState but will always get latest state.\n * This is useful when React merge multiple state updates into one.\n * e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.\n */\nfunction useSyncState(defaultValue) {\n var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_1__.useReducer(function (x) {\n return x + 1;\n }, 0),\n _React$useReducer2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$useReducer, 2),\n forceUpdate = _React$useReducer2[1];\n var currentValueRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(defaultValue);\n var getValue = (0,_useEvent__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function () {\n return currentValueRef.current;\n });\n var setValue = (0,_useEvent__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(function (updater) {\n currentValueRef.current = typeof updater === 'function' ? updater(currentValueRef.current) : updater;\n forceUpdate();\n });\n return [getValue, setValue];\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useSyncState.js?");
|
|
4525
5141
|
|
|
4526
5142
|
/***/ }),
|
|
4527
5143
|
|
|
4528
|
-
/***/ "../../node_modules/rc-
|
|
4529
|
-
|
|
4530
|
-
!*** ../../node_modules/rc-
|
|
4531
|
-
|
|
5144
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/index.js":
|
|
5145
|
+
/*!*********************************************************************!*\
|
|
5146
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/index.js ***!
|
|
5147
|
+
\*********************************************************************/
|
|
4532
5148
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4533
5149
|
|
|
4534
5150
|
"use strict";
|
|
4535
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/*
|
|
5151
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ get: () => (/* reexport safe */ _utils_get__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n/* harmony export */ set: () => (/* reexport safe */ _utils_set__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ supportNodeRef: () => (/* reexport safe */ _ref__WEBPACK_IMPORTED_MODULE_2__.supportNodeRef),\n/* harmony export */ supportRef: () => (/* reexport safe */ _ref__WEBPACK_IMPORTED_MODULE_2__.supportRef),\n/* harmony export */ useComposeRef: () => (/* reexport safe */ _ref__WEBPACK_IMPORTED_MODULE_2__.useComposeRef),\n/* harmony export */ useEvent: () => (/* reexport safe */ _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ useMergedState: () => (/* reexport safe */ _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ warning: () => (/* reexport safe */ _warning__WEBPACK_IMPORTED_MODULE_5__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var _hooks_useEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hooks/useEvent */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useEvent.js\");\n/* harmony import */ var _hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks/useMergedState */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMergedState.js\");\n/* harmony import */ var _ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ref */ \"../../node_modules/rc-motion/node_modules/rc-util/es/ref.js\");\n/* harmony import */ var _utils_get__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/get */ \"../../node_modules/rc-motion/node_modules/rc-util/es/utils/get.js\");\n/* harmony import */ var _utils_set__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/set */ \"../../node_modules/rc-motion/node_modules/rc-util/es/utils/set.js\");\n/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./warning */ \"../../node_modules/rc-motion/node_modules/rc-util/es/warning.js\");\n\n\n\n\n\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/index.js?");
|
|
4536
5152
|
|
|
4537
5153
|
/***/ }),
|
|
4538
5154
|
|
|
4539
|
-
/***/ "../../node_modules/rc-
|
|
4540
|
-
|
|
4541
|
-
!*** ../../node_modules/rc-
|
|
4542
|
-
|
|
5155
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/raf.js":
|
|
5156
|
+
/*!*******************************************************************!*\
|
|
5157
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/raf.js ***!
|
|
5158
|
+
\*******************************************************************/
|
|
4543
5159
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4544
5160
|
|
|
4545
5161
|
"use strict";
|
|
4546
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\
|
|
5162
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nvar raf = function raf(callback) {\n return +setTimeout(callback, 16);\n};\nvar caf = function caf(num) {\n return clearTimeout(num);\n};\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = function raf(callback) {\n return window.requestAnimationFrame(callback);\n };\n caf = function caf(handle) {\n return window.cancelAnimationFrame(handle);\n };\n}\nvar rafUUID = 0;\nvar rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nvar wrapperRaf = function wrapperRaf(callback) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n rafUUID += 1;\n var id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n\n // Trigger\n callback();\n } else {\n // Next raf\n var realId = raf(function () {\n callRef(leftTimes - 1);\n });\n\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = function (id) {\n var realId = rafIds.get(id);\n cleanup(id);\n return caf(realId);\n};\nif (true) {\n wrapperRaf.ids = function () {\n return rafIds;\n };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (wrapperRaf);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/raf.js?");
|
|
4547
5163
|
|
|
4548
5164
|
/***/ }),
|
|
4549
5165
|
|
|
4550
|
-
/***/ "../../node_modules/rc-
|
|
4551
|
-
|
|
4552
|
-
!*** ../../node_modules/rc-
|
|
4553
|
-
|
|
5166
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/ref.js":
|
|
5167
|
+
/*!*******************************************************************!*\
|
|
5168
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/ref.js ***!
|
|
5169
|
+
\*******************************************************************/
|
|
4554
5170
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4555
5171
|
|
|
4556
5172
|
"use strict";
|
|
4557
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
5173
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRef: () => (/* binding */ composeRef),\n/* harmony export */ fillRef: () => (/* binding */ fillRef),\n/* harmony export */ getNodeRef: () => (/* binding */ getNodeRef),\n/* harmony export */ supportNodeRef: () => (/* binding */ supportNodeRef),\n/* harmony export */ supportRef: () => (/* binding */ supportRef),\n/* harmony export */ useComposeRef: () => (/* binding */ useComposeRef)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ \"../../node_modules/react-is/index.js\");\n/* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ \"../../node_modules/rc-motion/node_modules/rc-util/es/hooks/useMemo.js\");\n\n\n\n\nvar fillRef = function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if ((0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n};\n\n/**\n * Merge refs into one ref function to support ref passing.\n */\nvar composeRef = function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(Boolean);\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n};\nvar useComposeRef = function useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return (0,_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length !== next.length || prev.every(function (ref, i) {\n return ref !== next[i];\n });\n });\n};\nvar supportRef = function supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = (0,react_is__WEBPACK_IMPORTED_MODULE_2__.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__.ForwardRef) {\n return false;\n }\n return true;\n};\nfunction isReactElement(node) {\n return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(node) && !(0,react_is__WEBPACK_IMPORTED_MODULE_2__.isFragment)(node);\n}\nvar supportNodeRef = function supportNodeRef(node) {\n return isReactElement(node) && supportRef(node);\n};\n\n/**\n * In React 19. `ref` is not a property from node.\n * But a property from `props.ref`.\n * To check if `props.ref` exist or fallback to `ref`.\n */\nvar getNodeRef = Number(react__WEBPACK_IMPORTED_MODULE_1__.version.split('.')[0]) >= 19 ?\n// >= React 19\nfunction (node) {\n if (isReactElement(node)) {\n return node.props.ref;\n }\n return null;\n} :\n// < React 19\nfunction (node) {\n if (isReactElement(node)) {\n return node.ref;\n }\n return null;\n};\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/ref.js?");
|
|
4558
5174
|
|
|
4559
5175
|
/***/ }),
|
|
4560
5176
|
|
|
4561
|
-
/***/ "../../node_modules/rc-
|
|
5177
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/utils/get.js":
|
|
4562
5178
|
/*!*************************************************************************!*\
|
|
4563
|
-
!*** ../../node_modules/rc-
|
|
5179
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/utils/get.js ***!
|
|
4564
5180
|
\*************************************************************************/
|
|
4565
5181
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4566
5182
|
|
|
4567
5183
|
"use strict";
|
|
4568
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (
|
|
5184
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ get)\n/* harmony export */ });\nfunction get(entity, path) {\n var current = entity;\n for (var i = 0; i < path.length; i += 1) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = current[path[i]];\n }\n return current;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/utils/get.js?");
|
|
4569
5185
|
|
|
4570
5186
|
/***/ }),
|
|
4571
5187
|
|
|
4572
|
-
/***/ "../../node_modules/rc-
|
|
5188
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/utils/set.js":
|
|
4573
5189
|
/*!*************************************************************************!*\
|
|
4574
|
-
!*** ../../node_modules/rc-
|
|
5190
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/utils/set.js ***!
|
|
4575
5191
|
\*************************************************************************/
|
|
4576
5192
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4577
5193
|
|
|
4578
5194
|
"use strict";
|
|
4579
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
5195
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ set),\n/* harmony export */ merge: () => (/* binding */ merge)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"../../node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ \"../../node_modules/@babel/runtime/helpers/esm/toArray.js\");\n/* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get */ \"../../node_modules/rc-motion/node_modules/rc-util/es/utils/get.js\");\n\n\n\n\n\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n var _paths = (0,_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(paths),\n path = _paths[0],\n restPath = _paths.slice(1);\n var clone;\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(entity);\n } else {\n clone = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, entity);\n }\n\n // Delete prop if `removeIfUndefined` and value is undefined\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n return clone;\n}\nfunction set(entity, paths, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !(0,_get__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entity, paths.slice(0, -1))) {\n return entity;\n }\n return internalSet(entity, paths, value, removeIfUndefined);\n}\nfunction isObject(obj) {\n return (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\nfunction createEmpty(source) {\n return Array.isArray(source) ? [] : {};\n}\nvar keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;\n\n/**\n * Merge objects which will create\n */\nfunction merge() {\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n var clone = createEmpty(sources[0]);\n sources.forEach(function (src) {\n function internalMerge(path, parentLoopSet) {\n var loopSet = new Set(parentLoopSet);\n var value = (0,_get__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(src, path);\n var isArr = Array.isArray(value);\n if (isArr || isObject(value)) {\n // Only add not loop obj\n if (!loopSet.has(value)) {\n loopSet.add(value);\n var originValue = (0,_get__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(clone, path);\n if (isArr) {\n // Array will always be override\n clone = set(clone, path, []);\n } else if (!originValue || (0,_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(originValue) !== 'object') {\n // Init container if not exist\n clone = set(clone, path, createEmpty(value));\n }\n keys(value).forEach(function (key) {\n internalMerge([].concat((0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(path), [key]), loopSet);\n });\n }\n } else {\n clone = set(clone, path, value);\n }\n }\n internalMerge([]);\n });\n return clone;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/utils/set.js?");
|
|
4580
5196
|
|
|
4581
5197
|
/***/ }),
|
|
4582
5198
|
|
|
4583
|
-
/***/ "../../node_modules/rc-
|
|
4584
|
-
|
|
4585
|
-
!*** ../../node_modules/rc-
|
|
4586
|
-
|
|
5199
|
+
/***/ "../../node_modules/rc-motion/node_modules/rc-util/es/warning.js":
|
|
5200
|
+
/*!***********************************************************************!*\
|
|
5201
|
+
!*** ../../node_modules/rc-motion/node_modules/rc-util/es/warning.js ***!
|
|
5202
|
+
\***********************************************************************/
|
|
4587
5203
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4588
5204
|
|
|
4589
5205
|
"use strict";
|
|
4590
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ call: () => (/* binding */ call),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ note: () => (/* binding */ note),\n/* harmony export */ noteOnce: () => (/* binding */ noteOnce),\n/* harmony export */ preMessage: () => (/* binding */ preMessage),\n/* harmony export */ resetWarned: () => (/* binding */ resetWarned),\n/* harmony export */ warning: () => (/* binding */ warning),\n/* harmony export */ warningOnce: () => (/* binding */ warningOnce)\n/* harmony export */ });\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warningOnce);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-
|
|
5206
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ call: () => (/* binding */ call),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ note: () => (/* binding */ note),\n/* harmony export */ noteOnce: () => (/* binding */ noteOnce),\n/* harmony export */ preMessage: () => (/* binding */ preMessage),\n/* harmony export */ resetWarned: () => (/* binding */ resetWarned),\n/* harmony export */ warning: () => (/* binding */ warning),\n/* harmony export */ warningOnce: () => (/* binding */ warningOnce)\n/* harmony export */ });\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if ( true && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warningOnce);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-motion/node_modules/rc-util/es/warning.js?");
|
|
4591
5207
|
|
|
4592
5208
|
/***/ }),
|
|
4593
5209
|
|
|
@@ -4609,7 +5225,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4609
5225
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4610
5226
|
|
|
4611
5227
|
"use strict";
|
|
4612
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ \"../../node_modules/babel-runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"../../node_modules/babel-runtime/helpers/defineProperty.js\");\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_animate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-animate */ \"../../node_modules/rc-animate/es/Animate.js\");\n/* harmony import */ var rc_util_es_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/createChainedFunction */ \"../../node_modules/rc-util/es/createChainedFunction.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _Notice__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Notice */ \"../../node_modules/rc-notification/es/Notice.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar seed = 0;\nvar now = Date.now();\n\nfunction getUuid() {\n return 'rcNotification_' + now + '_' + seed++;\n}\n\nvar Notification = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Notification, _Component);\n\n function Notification() {\n var _ref;\n\n var _temp, _this, _ret;\n\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Notification);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, (_ref = Notification.__proto__ || Object.getPrototypeOf(Notification)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n notices: []\n }, _this.add = function (notice) {\n var key = notice.key = notice.key || getUuid();\n var maxCount = _this.props.maxCount;\n\n _this.setState(function (previousState) {\n var notices = previousState.notices;\n var noticeIndex = notices.map(function (v) {\n return v.key;\n }).indexOf(key);\n var updatedNotices = notices.concat();\n if (noticeIndex !== -1) {\n updatedNotices.splice(noticeIndex, 1, notice);\n } else {\n if (maxCount && notices.length >= maxCount) {\n notice.updateKey = updatedNotices[0].updateKey || updatedNotices[0].key;\n updatedNotices.shift();\n }\n updatedNotices.push(notice);\n }\n return {\n notices: updatedNotices\n };\n });\n }, _this.remove = function (key) {\n _this.setState(function (previousState) {\n return {\n notices: previousState.notices.filter(function (notice) {\n return notice.key !== key;\n })\n };\n });\n }, _temp), (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this, _ret);\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Notification, [{\n key: 'getTransitionName',\n value: function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this,\n _className;\n\n var props = this.props;\n var notices = this.state.notices;\n\n var noticeNodes = notices.map(function (notice, index) {\n var update = Boolean(index === notices.length - 1 && notice.updateKey);\n var key = notice.updateKey ? notice.updateKey : notice.key;\n var onClose = (0,rc_util_es_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_this2.remove.bind(_this2, notice.key), notice.onClose);\n return react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n _Notice__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n prefixCls: props.prefixCls\n }, notice, {\n key: key,\n update: update,\n onClose: onClose,\n onClick: notice.onClick,\n closeIcon: props.closeIcon\n }),\n notice.content\n );\n });\n var className = (_className = {}, (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_className, props.prefixCls, 1), (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_className, props.className, !!props.className), _className);\n return react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n 'div',\n { className: classnames__WEBPACK_IMPORTED_MODULE_11___default()(className), style: props.style },\n react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n { transitionName: this.getTransitionName() },\n noticeNodes\n )\n );\n }\n }]);\n\n return Notification;\n}(react__WEBPACK_IMPORTED_MODULE_7__.Component);\n\nNotification.propTypes = {\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().string),\n transitionName: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().string),\n animation: prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_13___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_13___default().object)]),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().object),\n maxCount: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().number),\n closeIcon: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().node)\n};\nNotification.defaultProps = {\n prefixCls: 'rc-notification',\n animation: 'fade',\n style: {\n top: 65,\n left: '50%'\n }\n};\n\n\nNotification.newInstance = function newNotificationInstance(properties, callback) {\n var _ref2 = properties || {},\n getContainer = _ref2.getContainer,\n props = (0,babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, ['getContainer']);\n\n var div = document.createElement('div');\n if (getContainer) {\n var root = getContainer();\n root.appendChild(div);\n } else {\n document.body.appendChild(div);\n }\n var called = false;\n function ref(notification) {\n if (called) {\n return;\n }\n called = true;\n callback({\n notice: function notice(noticeProps) {\n notification.add(noticeProps);\n },\n removeNotice: function removeNotice(key) {\n notification.remove(key);\n },\n\n component: notification,\n destroy: function destroy() {\n react_dom__WEBPACK_IMPORTED_MODULE_8__.unmountComponentAtNode(div);\n div.parentNode.removeChild(div);\n }\n });\n }\n react_dom__WEBPACK_IMPORTED_MODULE_8__.render(react__WEBPACK_IMPORTED_MODULE_7___default().createElement(Notification, (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, props, { ref: ref })), div);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Notification);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-notification/es/Notification.js?");
|
|
5228
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ \"../../node_modules/babel-runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"../../node_modules/babel-runtime/helpers/defineProperty.js\");\n/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/extends */ \"../../node_modules/babel-runtime/helpers/extends.js\");\n/* harmony import */ var babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"../../node_modules/babel-runtime/helpers/classCallCheck.js\");\n/* harmony import */ var babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"../../node_modules/babel-runtime/helpers/createClass.js\");\n/* harmony import */ var babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"../../node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"../../node_modules/babel-runtime/helpers/inherits.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_animate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-animate */ \"../../node_modules/rc-animate/es/Animate.js\");\n/* harmony import */ var rc_util_es_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/createChainedFunction */ \"../../node_modules/rc-notification/node_modules/rc-util/es/createChainedFunction.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _Notice__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Notice */ \"../../node_modules/rc-notification/es/Notice.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar seed = 0;\nvar now = Date.now();\n\nfunction getUuid() {\n return 'rcNotification_' + now + '_' + seed++;\n}\n\nvar Notification = function (_Component) {\n (0,babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(Notification, _Component);\n\n function Notification() {\n var _ref;\n\n var _temp, _this, _ret;\n\n (0,babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, Notification);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, (_ref = Notification.__proto__ || Object.getPrototypeOf(Notification)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n notices: []\n }, _this.add = function (notice) {\n var key = notice.key = notice.key || getUuid();\n var maxCount = _this.props.maxCount;\n\n _this.setState(function (previousState) {\n var notices = previousState.notices;\n var noticeIndex = notices.map(function (v) {\n return v.key;\n }).indexOf(key);\n var updatedNotices = notices.concat();\n if (noticeIndex !== -1) {\n updatedNotices.splice(noticeIndex, 1, notice);\n } else {\n if (maxCount && notices.length >= maxCount) {\n notice.updateKey = updatedNotices[0].updateKey || updatedNotices[0].key;\n updatedNotices.shift();\n }\n updatedNotices.push(notice);\n }\n return {\n notices: updatedNotices\n };\n });\n }, _this.remove = function (key) {\n _this.setState(function (previousState) {\n return {\n notices: previousState.notices.filter(function (notice) {\n return notice.key !== key;\n })\n };\n });\n }, _temp), (0,babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this, _ret);\n }\n\n (0,babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Notification, [{\n key: 'getTransitionName',\n value: function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this,\n _className;\n\n var props = this.props;\n var notices = this.state.notices;\n\n var noticeNodes = notices.map(function (notice, index) {\n var update = Boolean(index === notices.length - 1 && notice.updateKey);\n var key = notice.updateKey ? notice.updateKey : notice.key;\n var onClose = (0,rc_util_es_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_this2.remove.bind(_this2, notice.key), notice.onClose);\n return react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n _Notice__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n prefixCls: props.prefixCls\n }, notice, {\n key: key,\n update: update,\n onClose: onClose,\n onClick: notice.onClick,\n closeIcon: props.closeIcon\n }),\n notice.content\n );\n });\n var className = (_className = {}, (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_className, props.prefixCls, 1), (0,babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_className, props.className, !!props.className), _className);\n return react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n 'div',\n { className: classnames__WEBPACK_IMPORTED_MODULE_11___default()(className), style: props.style },\n react__WEBPACK_IMPORTED_MODULE_7___default().createElement(\n rc_animate__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n { transitionName: this.getTransitionName() },\n noticeNodes\n )\n );\n }\n }]);\n\n return Notification;\n}(react__WEBPACK_IMPORTED_MODULE_7__.Component);\n\nNotification.propTypes = {\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().string),\n transitionName: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().string),\n animation: prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_13___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_13___default().object)]),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().object),\n maxCount: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().number),\n closeIcon: (prop_types__WEBPACK_IMPORTED_MODULE_13___default().node)\n};\nNotification.defaultProps = {\n prefixCls: 'rc-notification',\n animation: 'fade',\n style: {\n top: 65,\n left: '50%'\n }\n};\n\n\nNotification.newInstance = function newNotificationInstance(properties, callback) {\n var _ref2 = properties || {},\n getContainer = _ref2.getContainer,\n props = (0,babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, ['getContainer']);\n\n var div = document.createElement('div');\n if (getContainer) {\n var root = getContainer();\n root.appendChild(div);\n } else {\n document.body.appendChild(div);\n }\n var called = false;\n function ref(notification) {\n if (called) {\n return;\n }\n called = true;\n callback({\n notice: function notice(noticeProps) {\n notification.add(noticeProps);\n },\n removeNotice: function removeNotice(key) {\n notification.remove(key);\n },\n\n component: notification,\n destroy: function destroy() {\n react_dom__WEBPACK_IMPORTED_MODULE_8__.unmountComponentAtNode(div);\n div.parentNode.removeChild(div);\n }\n });\n }\n react_dom__WEBPACK_IMPORTED_MODULE_8__.render(react__WEBPACK_IMPORTED_MODULE_7___default().createElement(Notification, (0,babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, props, { ref: ref })), div);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Notification);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-notification/es/Notification.js?");
|
|
4613
5229
|
|
|
4614
5230
|
/***/ }),
|
|
4615
5231
|
|
|
@@ -4624,6 +5240,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4624
5240
|
|
|
4625
5241
|
/***/ }),
|
|
4626
5242
|
|
|
5243
|
+
/***/ "../../node_modules/rc-notification/node_modules/rc-util/es/createChainedFunction.js":
|
|
5244
|
+
/*!*******************************************************************************************!*\
|
|
5245
|
+
!*** ../../node_modules/rc-notification/node_modules/rc-util/es/createChainedFunction.js ***!
|
|
5246
|
+
\*******************************************************************************************/
|
|
5247
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5248
|
+
|
|
5249
|
+
"use strict";
|
|
5250
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createChainedFunction)\n/* harmony export */ });\n/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n var args = [].slice.call(arguments, 0);\n\n if (args.length === 1) {\n return args[0];\n }\n\n return function chainedFunction() {\n for (var i = 0; i < args.length; i++) {\n if (args[i] && args[i].apply) {\n args[i].apply(this, arguments);\n }\n }\n };\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-notification/node_modules/rc-util/es/createChainedFunction.js?");
|
|
5251
|
+
|
|
5252
|
+
/***/ }),
|
|
5253
|
+
|
|
4627
5254
|
/***/ "../../node_modules/rc-resize-observer/es/Collection.js":
|
|
4628
5255
|
/*!**************************************************************!*\
|
|
4629
5256
|
!*** ../../node_modules/rc-resize-observer/es/Collection.js ***!
|
|
@@ -4741,7 +5368,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4741
5368
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4742
5369
|
|
|
4743
5370
|
"use strict";
|
|
4744
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Popup)\n/* harmony export */ });\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\nfunction Popup(props) {\n var children = props.children,\n prefixCls = props.prefixCls,\n id = props.id,\n
|
|
5371
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Popup)\n/* harmony export */ });\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\nfunction Popup(props) {\n var children = props.children,\n prefixCls = props.prefixCls,\n id = props.id,\n innerStyle = props.overlayInnerStyle,\n bodyClassName = props.bodyClassName,\n className = props.className,\n style = props.style;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(\"\".concat(prefixCls, \"-content\"), className),\n style: style\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(\"\".concat(prefixCls, \"-inner\"), bodyClassName),\n id: id,\n role: \"tooltip\",\n style: innerStyle\n }, typeof children === 'function' ? children() : children));\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-tooltip/es/Popup.js?");
|
|
4745
5372
|
|
|
4746
5373
|
/***/ }),
|
|
4747
5374
|
|
|
@@ -4752,7 +5379,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4752
5379
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4753
5380
|
|
|
4754
5381
|
"use strict";
|
|
4755
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _rc_component_trigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @rc-component/trigger */ \"../../node_modules/@rc-component/trigger/es/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./placements */ \"../../node_modules/rc-tooltip/es/placements.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/rc-tooltip/es/Popup.js\");\n\n\n\nvar _excluded = [\"overlayClassName\", \"trigger\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayStyle\", \"prefixCls\", \"children\", \"onVisibleChange\", \"afterVisibleChange\", \"transitionName\", \"animation\", \"motion\", \"placement\", \"align\", \"destroyTooltipOnHide\", \"defaultVisible\", \"getTooltipContainer\", \"overlayInnerStyle\", \"arrowContent\", \"overlay\", \"id\", \"showArrow\"];\n\n\n\n\n\nvar Tooltip = function Tooltip(props, ref) {\n var overlayClassName = props.overlayClassName,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,\n _props$mouseEnterDela = props.mouseEnterDelay,\n mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,\n _props$mouseLeaveDela = props.mouseLeaveDelay,\n mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,\n overlayStyle = props.overlayStyle,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,\n children = props.children,\n onVisibleChange = props.onVisibleChange,\n afterVisibleChange = props.afterVisibleChange,\n transitionName = props.transitionName,\n animation = props.animation,\n motion = props.motion,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'right' : _props$placement,\n _props$align = props.align,\n align = _props$align === void 0 ? {} : _props$align,\n _props$destroyTooltip = props.destroyTooltipOnHide,\n destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,\n defaultVisible = props.defaultVisible,\n getTooltipContainer = props.getTooltipContainer,\n overlayInnerStyle = props.overlayInnerStyle,\n arrowContent = props.arrowContent,\n overlay = props.overlay,\n id = props.id,\n _props$showArrow = props.showArrow,\n showArrow = _props$showArrow === void 0 ? true : _props$showArrow,\n restProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, _excluded);\n var triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_4__.useImperativeHandle)(ref, function () {\n return triggerRef.current;\n });\n var extraProps = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restProps);\n if ('visible' in props) {\n extraProps.popupVisible = props.visible;\n }\n var getPopupElement = function getPopupElement() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(_Popup__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n key: \"content\",\n prefixCls: prefixCls,\n id: id,\n overlayInnerStyle: overlayInnerStyle\n }, overlay);\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(_rc_component_trigger__WEBPACK_IMPORTED_MODULE_3__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n popupClassName: overlayClassName,\n prefixCls: prefixCls,\n popup: getPopupElement,\n action: trigger,\n builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_5__.placements,\n popupPlacement: placement,\n ref: triggerRef,\n popupAlign: align,\n getPopupContainer: getTooltipContainer,\n onPopupVisibleChange: onVisibleChange,\n afterPopupVisibleChange: afterVisibleChange,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n popupMotion: motion,\n defaultPopupVisible: defaultVisible,\n autoDestroy: destroyTooltipOnHide,\n mouseLeaveDelay: mouseLeaveDelay,\n popupStyle: overlayStyle,\n mouseEnterDelay: mouseEnterDelay,\n arrow: showArrow\n }, extraProps), children);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(Tooltip));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-tooltip/es/Tooltip.js?");
|
|
5382
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ \"../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _rc_component_trigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @rc-component/trigger */ \"../../node_modules/@rc-component/trigger/es/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./placements */ \"../../node_modules/rc-tooltip/es/placements.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/rc-tooltip/es/Popup.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\nvar _excluded = [\"overlayClassName\", \"trigger\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayStyle\", \"prefixCls\", \"children\", \"onVisibleChange\", \"afterVisibleChange\", \"transitionName\", \"animation\", \"motion\", \"placement\", \"align\", \"destroyTooltipOnHide\", \"defaultVisible\", \"getTooltipContainer\", \"overlayInnerStyle\", \"arrowContent\", \"overlay\", \"id\", \"showArrow\", \"classNames\", \"styles\"];\n\n\n\n\n\n\nvar Tooltip = function Tooltip(props, ref) {\n var overlayClassName = props.overlayClassName,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,\n _props$mouseEnterDela = props.mouseEnterDelay,\n mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,\n _props$mouseLeaveDela = props.mouseLeaveDelay,\n mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,\n overlayStyle = props.overlayStyle,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,\n children = props.children,\n onVisibleChange = props.onVisibleChange,\n afterVisibleChange = props.afterVisibleChange,\n transitionName = props.transitionName,\n animation = props.animation,\n motion = props.motion,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'right' : _props$placement,\n _props$align = props.align,\n align = _props$align === void 0 ? {} : _props$align,\n _props$destroyTooltip = props.destroyTooltipOnHide,\n destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,\n defaultVisible = props.defaultVisible,\n getTooltipContainer = props.getTooltipContainer,\n overlayInnerStyle = props.overlayInnerStyle,\n arrowContent = props.arrowContent,\n overlay = props.overlay,\n id = props.id,\n _props$showArrow = props.showArrow,\n showArrow = _props$showArrow === void 0 ? true : _props$showArrow,\n tooltipClassNames = props.classNames,\n tooltipStyles = props.styles,\n restProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, _excluded);\n var triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_4__.useImperativeHandle)(ref, function () {\n return triggerRef.current;\n });\n var extraProps = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restProps);\n if ('visible' in props) {\n extraProps.popupVisible = props.visible;\n }\n var getPopupElement = function getPopupElement() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(_Popup__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n key: \"content\",\n prefixCls: prefixCls,\n id: id,\n bodyClassName: tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.body,\n overlayInnerStyle: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, overlayInnerStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.body)\n }, overlay);\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(_rc_component_trigger__WEBPACK_IMPORTED_MODULE_3__[\"default\"], (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n popupClassName: classnames__WEBPACK_IMPORTED_MODULE_7___default()(overlayClassName, tooltipClassNames === null || tooltipClassNames === void 0 ? void 0 : tooltipClassNames.root),\n prefixCls: prefixCls,\n popup: getPopupElement,\n action: trigger,\n builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_5__.placements,\n popupPlacement: placement,\n ref: triggerRef,\n popupAlign: align,\n getPopupContainer: getTooltipContainer,\n onPopupVisibleChange: onVisibleChange,\n afterPopupVisibleChange: afterVisibleChange,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n popupMotion: motion,\n defaultPopupVisible: defaultVisible,\n autoDestroy: destroyTooltipOnHide,\n mouseLeaveDelay: mouseLeaveDelay,\n popupStyle: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, overlayStyle), tooltipStyles === null || tooltipStyles === void 0 ? void 0 : tooltipStyles.root),\n mouseEnterDelay: mouseEnterDelay,\n arrow: showArrow\n }, extraProps), children);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(Tooltip));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-tooltip/es/Tooltip.js?");
|
|
4756
5383
|
|
|
4757
5384
|
/***/ }),
|
|
4758
5385
|
|
|
@@ -4778,127 +5405,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4778
5405
|
|
|
4779
5406
|
/***/ }),
|
|
4780
5407
|
|
|
4781
|
-
/***/ "../../node_modules/rc-util/es/ContainerRender.js":
|
|
4782
|
-
/*!********************************************************!*\
|
|
4783
|
-
!*** ../../node_modules/rc-util/es/ContainerRender.js ***!
|
|
4784
|
-
\********************************************************/
|
|
4785
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4786
|
-
|
|
4787
|
-
"use strict";
|
|
4788
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ContainerRender)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar ContainerRender = /*#__PURE__*/function (_React$Component) {\n _inherits(ContainerRender, _React$Component);\n\n var _super = _createSuper(ContainerRender);\n\n function ContainerRender() {\n var _this;\n\n _classCallCheck(this, ContainerRender);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _this.removeContainer = function () {\n if (_this.container) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unmountComponentAtNode(_this.container);\n\n _this.container.parentNode.removeChild(_this.container);\n\n _this.container = null;\n }\n };\n\n _this.renderComponent = function (props, ready) {\n var _this$props = _this.props,\n visible = _this$props.visible,\n getComponent = _this$props.getComponent,\n forceRender = _this$props.forceRender,\n getContainer = _this$props.getContainer,\n parent = _this$props.parent;\n\n if (visible || parent._component || forceRender) {\n if (!_this.container) {\n _this.container = getContainer();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {\n if (ready) {\n ready.call(this);\n }\n });\n }\n };\n\n return _this;\n }\n\n _createClass(ContainerRender, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.autoMount) {\n this.renderComponent();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.props.autoMount) {\n this.renderComponent();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.props.autoDestroy) {\n this.removeContainer();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children({\n renderComponent: this.renderComponent,\n removeContainer: this.removeContainer\n });\n }\n }]);\n\n return ContainerRender;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nContainerRender.propTypes = {\n autoMount: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n autoDestroy: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool),\n parent: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired\n};\nContainerRender.defaultProps = {\n autoMount: true,\n autoDestroy: true,\n forceRender: false\n};\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/ContainerRender.js?");
|
|
4789
|
-
|
|
4790
|
-
/***/ }),
|
|
4791
|
-
|
|
4792
|
-
/***/ "../../node_modules/rc-util/es/Dom/addEventListener.js":
|
|
4793
|
-
/*!*************************************************************!*\
|
|
4794
|
-
!*** ../../node_modules/rc-util/es/Dom/addEventListener.js ***!
|
|
4795
|
-
\*************************************************************/
|
|
4796
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4797
|
-
|
|
4798
|
-
"use strict";
|
|
4799
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ addEventListenerWrap)\n/* harmony export */ });\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! add-dom-event-listener */ \"../../node_modules/add-dom-event-listener/lib/index.js\");\n/* harmony import */ var add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n\n\nfunction addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates ? function run(e) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__.unstable_batchedUpdates(cb, e);\n } : cb;\n return add_dom_event_listener__WEBPACK_IMPORTED_MODULE_0___default()(target, eventType, callback, option);\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/Dom/addEventListener.js?");
|
|
4800
|
-
|
|
4801
|
-
/***/ }),
|
|
4802
|
-
|
|
4803
|
-
/***/ "../../node_modules/rc-util/es/Dom/contains.js":
|
|
4804
|
-
/*!*****************************************************!*\
|
|
4805
|
-
!*** ../../node_modules/rc-util/es/Dom/contains.js ***!
|
|
4806
|
-
\*****************************************************/
|
|
4807
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4808
|
-
|
|
4809
|
-
"use strict";
|
|
4810
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ contains)\n/* harmony export */ });\nfunction contains(root, n) {\n var node = n;\n\n while (node) {\n if (node === root) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/Dom/contains.js?");
|
|
4811
|
-
|
|
4812
|
-
/***/ }),
|
|
4813
|
-
|
|
4814
|
-
/***/ "../../node_modules/rc-util/es/KeyCode.js":
|
|
4815
|
-
/*!************************************************!*\
|
|
4816
|
-
!*** ../../node_modules/rc-util/es/KeyCode.js ***!
|
|
4817
|
-
\************************************************/
|
|
4818
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4819
|
-
|
|
4820
|
-
"use strict";
|
|
4821
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\nvar KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n\n /**\n * TAB\n */\n TAB: 9,\n\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n\n /**\n * ENTER\n */\n ENTER: 13,\n\n /**\n * SHIFT\n */\n SHIFT: 16,\n\n /**\n * CTRL\n */\n CTRL: 17,\n\n /**\n * ALT\n */\n ALT: 18,\n\n /**\n * PAUSE\n */\n PAUSE: 19,\n\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n\n /**\n * ESC\n */\n ESC: 27,\n\n /**\n * SPACE\n */\n SPACE: 32,\n\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n\n /**\n * END\n */\n END: 35,\n\n /**\n * HOME\n */\n HOME: 36,\n\n /**\n * LEFT\n */\n LEFT: 37,\n\n /**\n * UP\n */\n UP: 38,\n\n /**\n * RIGHT\n */\n RIGHT: 39,\n\n /**\n * DOWN\n */\n DOWN: 40,\n\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n\n /**\n * INSERT\n */\n INSERT: 45,\n\n /**\n * DELETE\n */\n DELETE: 46,\n\n /**\n * ZERO\n */\n ZERO: 48,\n\n /**\n * ONE\n */\n ONE: 49,\n\n /**\n * TWO\n */\n TWO: 50,\n\n /**\n * THREE\n */\n THREE: 51,\n\n /**\n * FOUR\n */\n FOUR: 52,\n\n /**\n * FIVE\n */\n FIVE: 53,\n\n /**\n * SIX\n */\n SIX: 54,\n\n /**\n * SEVEN\n */\n SEVEN: 55,\n\n /**\n * EIGHT\n */\n EIGHT: 56,\n\n /**\n * NINE\n */\n NINE: 57,\n\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n\n /**\n * A\n */\n A: 65,\n\n /**\n * B\n */\n B: 66,\n\n /**\n * C\n */\n C: 67,\n\n /**\n * D\n */\n D: 68,\n\n /**\n * E\n */\n E: 69,\n\n /**\n * F\n */\n F: 70,\n\n /**\n * G\n */\n G: 71,\n\n /**\n * H\n */\n H: 72,\n\n /**\n * I\n */\n I: 73,\n\n /**\n * J\n */\n J: 74,\n\n /**\n * K\n */\n K: 75,\n\n /**\n * L\n */\n L: 76,\n\n /**\n * M\n */\n M: 77,\n\n /**\n * N\n */\n N: 78,\n\n /**\n * O\n */\n O: 79,\n\n /**\n * P\n */\n P: 80,\n\n /**\n * Q\n */\n Q: 81,\n\n /**\n * R\n */\n R: 82,\n\n /**\n * S\n */\n S: 83,\n\n /**\n * T\n */\n T: 84,\n\n /**\n * U\n */\n U: 85,\n\n /**\n * V\n */\n V: 86,\n\n /**\n * W\n */\n W: 87,\n\n /**\n * X\n */\n X: 88,\n\n /**\n * Y\n */\n Y: 89,\n\n /**\n * Z\n */\n Z: 90,\n\n /**\n * META\n */\n META: 91,\n\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n\n /**\n * F1\n */\n F1: 112,\n\n /**\n * F2\n */\n F2: 113,\n\n /**\n * F3\n */\n F3: 114,\n\n /**\n * F4\n */\n F4: 115,\n\n /**\n * F5\n */\n F5: 116,\n\n /**\n * F6\n */\n F6: 117,\n\n /**\n * F7\n */\n F7: 118,\n\n /**\n * F8\n */\n F8: 119,\n\n /**\n * F9\n */\n F9: 120,\n\n /**\n * F10\n */\n F10: 121,\n\n /**\n * F11\n */\n F11: 122,\n\n /**\n * F12\n */\n F12: 123,\n\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n\n /**\n * DASH\n */\n DASH: 189,\n\n /**\n * EQUALS\n */\n EQUALS: 187,\n\n /**\n * COMMA\n */\n COMMA: 188,\n\n /**\n * PERIOD\n */\n PERIOD: 190,\n\n /**\n * SLASH\n */\n SLASH: 191,\n\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n var keyCode = e.keyCode;\n\n if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n } // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n\n\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n\n default:\n return true;\n }\n },\n\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n } // Safari sends zero key code for non-latin characters.\n\n\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n\n default:\n return false;\n }\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyCode);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/KeyCode.js?");
|
|
4822
|
-
|
|
4823
|
-
/***/ }),
|
|
4824
|
-
|
|
4825
|
-
/***/ "../../node_modules/rc-util/es/Portal.js":
|
|
4826
|
-
/*!***********************************************!*\
|
|
4827
|
-
!*** ../../node_modules/rc-util/es/Portal.js ***!
|
|
4828
|
-
\***********************************************/
|
|
4829
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4830
|
-
|
|
4831
|
-
"use strict";
|
|
4832
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Portal)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar Portal = /*#__PURE__*/function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n var _super = _createSuper(Portal);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Portal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.createContainer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var didUpdate = this.props.didUpdate;\n\n if (didUpdate) {\n didUpdate(prevProps);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeContainer();\n }\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n this._container = this.props.getContainer();\n this.forceUpdate();\n }\n }, {\n key: \"removeContainer\",\n value: function removeContainer() {\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this._container) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal(this.props.children, this._container);\n }\n\n return null;\n }\n }]);\n\n return Portal;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nPortal.propTypes = {\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node).isRequired,\n didUpdate: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func)\n};\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/Portal.js?");
|
|
4833
|
-
|
|
4834
|
-
/***/ }),
|
|
4835
|
-
|
|
4836
|
-
/***/ "../../node_modules/rc-util/es/PortalWrapper.js":
|
|
4837
|
-
/*!******************************************************!*\
|
|
4838
|
-
!*** ../../node_modules/rc-util/es/PortalWrapper.js ***!
|
|
4839
|
-
\******************************************************/
|
|
4840
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4841
|
-
|
|
4842
|
-
"use strict";
|
|
4843
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-lifecycles-compat */ \"../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n/* harmony import */ var _ContainerRender__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ContainerRender */ \"../../node_modules/rc-util/es/ContainerRender.js\");\n/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Portal */ \"../../node_modules/rc-util/es/Portal.js\");\n/* harmony import */ var _switchScrollingEffect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./switchScrollingEffect */ \"../../node_modules/rc-util/es/switchScrollingEffect.js\");\n/* harmony import */ var _setStyle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./setStyle */ \"../../node_modules/rc-util/es/setStyle.js\");\nfunction 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; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _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; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/* eslint-disable no-underscore-dangle,react/require-default-props */\n\n\n\n\n\n\n\n\nvar openCount = 0;\nvar windowIsUndefined = !(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar IS_REACT_16 = ( true); // https://github.com/ant-design/ant-design/issues/19340\n// https://github.com/ant-design/ant-design/issues/19332\n\nvar cacheOverflow = {};\n\nvar PortalWrapper = /*#__PURE__*/function (_React$Component) {\n _inherits(PortalWrapper, _React$Component);\n\n var _super = _createSuper(PortalWrapper);\n\n function PortalWrapper(props) {\n var _this;\n\n _classCallCheck(this, PortalWrapper);\n\n _this = _super.call(this, props);\n\n _this.getParent = function () {\n var getContainer = _this.props.getContainer;\n\n if (getContainer) {\n if (typeof getContainer === 'string') {\n return document.querySelectorAll(getContainer)[0];\n }\n\n if (typeof getContainer === 'function') {\n return getContainer();\n }\n\n if (_typeof(getContainer) === 'object' && getContainer instanceof window.HTMLElement) {\n return getContainer;\n }\n }\n\n return document.body;\n };\n\n _this.getContainer = function () {\n if (windowIsUndefined) {\n return null;\n }\n\n if (!_this.container) {\n _this.container = document.createElement('div');\n\n var parent = _this.getParent();\n\n if (parent) {\n parent.appendChild(_this.container);\n }\n }\n\n _this.setWrapperClassName();\n\n return _this.container;\n };\n\n _this.setWrapperClassName = function () {\n var wrapperClassName = _this.props.wrapperClassName;\n\n if (_this.container && wrapperClassName && wrapperClassName !== _this.container.className) {\n _this.container.className = wrapperClassName;\n }\n };\n\n _this.savePortal = function (c) {\n // Warning: don't rename _component\n // https://github.com/react-component/util/pull/65#discussion_r352407916\n _this._component = c;\n };\n\n _this.removeCurrentContainer = function (visible) {\n _this.container = null;\n _this._component = null;\n\n if (!IS_REACT_16) {\n if (visible) {\n _this.renderComponent({\n afterClose: _this.removeContainer,\n onClose: function onClose() {},\n visible: false\n });\n } else {\n _this.removeContainer();\n }\n }\n };\n\n _this.switchScrollingEffect = function () {\n if (openCount === 1 && !Object.keys(cacheOverflow).length) {\n (0,_switchScrollingEffect__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(); // Must be set after switchScrollingEffect\n\n cacheOverflow = (0,_setStyle__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n overflow: 'hidden',\n overflowX: 'hidden',\n overflowY: 'hidden'\n });\n } else if (!openCount) {\n (0,_setStyle__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(cacheOverflow);\n cacheOverflow = {};\n (0,_switchScrollingEffect__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(true);\n }\n };\n\n var _visible = props.visible;\n openCount = _visible ? openCount + 1 : openCount;\n _this.state = {\n _self: _assertThisInitialized(_this)\n };\n return _this;\n }\n\n _createClass(PortalWrapper, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.setWrapperClassName();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var visible = this.props.visible; // 离开时不会 render, 导到离开时数值不变,改用 func 。。\n\n openCount = visible && openCount ? openCount - 1 : openCount;\n this.removeCurrentContainer(visible);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n children = _this$props.children,\n forceRender = _this$props.forceRender,\n visible = _this$props.visible;\n var portal = null;\n var childProps = {\n getOpenCount: function getOpenCount() {\n return openCount;\n },\n getContainer: this.getContainer,\n switchScrollingEffect: this.switchScrollingEffect\n }; // suppport react15\n\n if (!IS_REACT_16) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ContainerRender__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n parent: this,\n visible: visible,\n autoDestroy: false,\n getComponent: function getComponent() {\n var extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return children(_objectSpread(_objectSpread(_objectSpread({}, extra), childProps), {}, {\n ref: _this2.savePortal\n }));\n },\n getContainer: this.getContainer,\n forceRender: forceRender\n }, function (_ref) {\n var renderComponent = _ref.renderComponent,\n removeContainer = _ref.removeContainer;\n _this2.renderComponent = renderComponent;\n _this2.removeContainer = removeContainer;\n return null;\n });\n }\n\n if (forceRender || visible || this._component) {\n portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Portal__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n getContainer: this.getContainer,\n ref: this.savePortal\n }, children(childProps));\n }\n\n return portal;\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(props, _ref2) {\n var prevProps = _ref2.prevProps,\n _self = _ref2._self;\n var visible = props.visible,\n getContainer = props.getContainer;\n\n if (prevProps) {\n var prevVisible = prevProps.visible,\n prevGetContainer = prevProps.getContainer;\n\n if (visible !== prevVisible) {\n openCount = visible && !prevVisible ? openCount + 1 : openCount - 1;\n }\n\n var getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function';\n\n if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) {\n _self.removeCurrentContainer(false);\n }\n }\n\n return {\n prevProps: props\n };\n }\n }]);\n\n return PortalWrapper;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nPortalWrapper.propTypes = {\n wrapperClassName: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().string),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool),\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().any),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func),\n visible: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool)\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_2__.polyfill)(PortalWrapper));\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/PortalWrapper.js?");
|
|
4844
|
-
|
|
4845
|
-
/***/ }),
|
|
4846
|
-
|
|
4847
|
-
/***/ "../../node_modules/rc-util/es/createChainedFunction.js":
|
|
4848
|
-
/*!**************************************************************!*\
|
|
4849
|
-
!*** ../../node_modules/rc-util/es/createChainedFunction.js ***!
|
|
4850
|
-
\**************************************************************/
|
|
4851
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4852
|
-
|
|
4853
|
-
"use strict";
|
|
4854
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createChainedFunction)\n/* harmony export */ });\n/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n var args = [].slice.call(arguments, 0);\n\n if (args.length === 1) {\n return args[0];\n }\n\n return function chainedFunction() {\n for (var i = 0; i < args.length; i++) {\n if (args[i] && args[i].apply) {\n args[i].apply(this, arguments);\n }\n }\n };\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/createChainedFunction.js?");
|
|
4855
|
-
|
|
4856
|
-
/***/ }),
|
|
4857
|
-
|
|
4858
|
-
/***/ "../../node_modules/rc-util/es/getScrollBarSize.js":
|
|
4859
|
-
/*!*********************************************************!*\
|
|
4860
|
-
!*** ../../node_modules/rc-util/es/getScrollBarSize.js ***!
|
|
4861
|
-
\*********************************************************/
|
|
4862
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4863
|
-
|
|
4864
|
-
"use strict";
|
|
4865
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getScrollBarSize)\n/* harmony export */ });\nvar cached;\nfunction getScrollBarSize(fresh) {\n if (typeof document === 'undefined') {\n return 0;\n }\n\n if (fresh || cached === undefined) {\n var inner = document.createElement('div');\n inner.style.width = '100%';\n inner.style.height = '200px';\n var outer = document.createElement('div');\n var outerStyle = outer.style;\n outerStyle.position = 'absolute';\n outerStyle.top = 0;\n outerStyle.left = 0;\n outerStyle.pointerEvents = 'none';\n outerStyle.visibility = 'hidden';\n outerStyle.width = '200px';\n outerStyle.height = '150px';\n outerStyle.overflow = 'hidden';\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var widthContained = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var widthScroll = inner.offsetWidth;\n\n if (widthContained === widthScroll) {\n widthScroll = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n cached = widthContained - widthScroll;\n }\n\n return cached;\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/getScrollBarSize.js?");
|
|
4866
|
-
|
|
4867
|
-
/***/ }),
|
|
4868
|
-
|
|
4869
|
-
/***/ "../../node_modules/rc-util/es/setStyle.js":
|
|
4870
|
-
/*!*************************************************!*\
|
|
4871
|
-
!*** ../../node_modules/rc-util/es/setStyle.js ***!
|
|
4872
|
-
\*************************************************/
|
|
4873
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4874
|
-
|
|
4875
|
-
"use strict";
|
|
4876
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/**\n * Easy to set element style, return previous style\n * IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)\n * https://github.com/ant-design/ant-design/issues/19393\n *\n */\nfunction setStyle(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$element = options.element,\n element = _options$element === void 0 ? document.body : _options$element;\n var oldStyle = {};\n var styleKeys = Object.keys(style); // IE browser compatible\n\n styleKeys.forEach(function (key) {\n oldStyle[key] = element.style[key];\n });\n styleKeys.forEach(function (key) {\n element.style[key] = style[key];\n });\n return oldStyle;\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setStyle);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/setStyle.js?");
|
|
4877
|
-
|
|
4878
|
-
/***/ }),
|
|
4879
|
-
|
|
4880
|
-
/***/ "../../node_modules/rc-util/es/switchScrollingEffect.js":
|
|
4881
|
-
/*!**************************************************************!*\
|
|
4882
|
-
!*** ../../node_modules/rc-util/es/switchScrollingEffect.js ***!
|
|
4883
|
-
\**************************************************************/
|
|
4884
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4885
|
-
|
|
4886
|
-
"use strict";
|
|
4887
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _getScrollBarSize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getScrollBarSize */ \"../../node_modules/rc-util/es/getScrollBarSize.js\");\n/* harmony import */ var _setStyle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setStyle */ \"../../node_modules/rc-util/es/setStyle.js\");\n\n\n\nfunction isBodyOverflowing() {\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;\n}\n\nvar cacheStyle = {};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (close) {\n if (!isBodyOverflowing() && !close) {\n return;\n } // https://github.com/ant-design/ant-design/issues/19729\n\n\n var scrollingEffectClassName = 'ant-scrolling-effect';\n var scrollingEffectClassNameReg = new RegExp(\"\".concat(scrollingEffectClassName), 'g');\n var bodyClassName = document.body.className;\n\n if (close) {\n if (!scrollingEffectClassNameReg.test(bodyClassName)) return;\n (0,_setStyle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(cacheStyle);\n cacheStyle = {};\n document.body.className = bodyClassName.replace(scrollingEffectClassNameReg, '').trim();\n return;\n }\n\n var scrollBarSize = (0,_getScrollBarSize__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\n if (scrollBarSize) {\n cacheStyle = (0,_setStyle__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n position: 'relative',\n width: \"calc(100% - \".concat(scrollBarSize, \"px)\")\n });\n\n if (!scrollingEffectClassNameReg.test(bodyClassName)) {\n var addClassName = \"\".concat(bodyClassName, \" \").concat(scrollingEffectClassName);\n document.body.className = addClassName.trim();\n }\n }\n});\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/switchScrollingEffect.js?");
|
|
4888
|
-
|
|
4889
|
-
/***/ }),
|
|
4890
|
-
|
|
4891
|
-
/***/ "../../node_modules/rc-util/es/unsafeLifecyclesPolyfill.js":
|
|
4892
|
-
/*!*****************************************************************!*\
|
|
4893
|
-
!*** ../../node_modules/rc-util/es/unsafeLifecyclesPolyfill.js ***!
|
|
4894
|
-
\*****************************************************************/
|
|
4895
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4896
|
-
|
|
4897
|
-
"use strict";
|
|
4898
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n } // only handle componentWillReceiveProps\n\n\n if (typeof prototype.componentWillReceiveProps !== 'function') {\n return Component;\n } // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps\n // https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler\n\n\n if (!(react__WEBPACK_IMPORTED_MODULE_0___default().Profiler)) {\n return Component;\n } // Here polyfill get started\n\n\n prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;\n delete prototype.componentWillReceiveProps;\n return Component;\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unsafeLifecyclesPolyfill);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/es/unsafeLifecyclesPolyfill.js?");
|
|
4899
|
-
|
|
4900
|
-
/***/ }),
|
|
4901
|
-
|
|
4902
5408
|
/***/ "../../node_modules/rc-util/lib/Dom/addEventListener.js":
|
|
4903
5409
|
/*!**************************************************************!*\
|
|
4904
5410
|
!*** ../../node_modules/rc-util/lib/Dom/addEventListener.js ***!
|
|
@@ -4906,7 +5412,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4906
5412
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4907
5413
|
|
|
4908
5414
|
"use strict";
|
|
4909
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = addEventListenerWrap;\
|
|
5415
|
+
eval("\n\nvar _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"../../node_modules/@babel/runtime/helpers/interopRequireDefault.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = addEventListenerWrap;\nvar _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\"));\nfunction addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = _reactDom.default.unstable_batchedUpdates ? function run(e) {\n _reactDom.default.unstable_batchedUpdates(cb, e);\n } : cb;\n if (target !== null && target !== void 0 && target.addEventListener) {\n target.addEventListener(eventType, callback, option);\n }\n return {\n remove: function remove() {\n if (target !== null && target !== void 0 && target.removeEventListener) {\n target.removeEventListener(eventType, callback, option);\n }\n }\n };\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/rc-util/lib/Dom/addEventListener.js?");
|
|
4910
5416
|
|
|
4911
5417
|
/***/ }),
|
|
4912
5418
|
|
|
@@ -4950,7 +5456,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4950
5456
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4951
5457
|
|
|
4952
5458
|
"use strict";
|
|
4953
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/Portal */ \"../../node_modules/rc-util/es/Portal.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"../../node_modules/react-ctxmenu-trigger/es/utils.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/react-ctxmenu-trigger/es/Popup.js\");\nvar _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar contextTypes = {\n rcTrigger: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({\n onPopupMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func)\n })\n};\n\nvar CtxMenuTrigger = function (_React$Component) {\n _inherits(CtxMenuTrigger, _React$Component);\n\n // todo: slim props\n function CtxMenuTrigger(props) {\n _classCallCheck(this, CtxMenuTrigger);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n return _this;\n }\n\n CtxMenuTrigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n CtxMenuTrigger.prototype.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.mouseDownTimeout);\n };\n\n CtxMenuTrigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n CtxMenuTrigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n CtxMenuTrigger.prototype.render = function render() {\n var popupVisible = this.state.popupVisible;\n var forceRender = this.props.forceRender;\n\n // prevent unmounting after it's rendered\n\n if (popupVisible || this._component || forceRender) {\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n {\n getContainer: this.getContainer\n },\n this.getComponent()\n );\n }\n\n return null;\n };\n\n return CtxMenuTrigger;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nCtxMenuTrigger.propTypes = {\n getPopupClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n popup: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func)]).isRequired,\n popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n builtinPlacements: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n popupTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)]),\n popupAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n zIndex: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n getDocument: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n mask: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n onPopupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n popupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n popupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n defaultPopupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n maskTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)]),\n maskAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool), // Maybe we can support user pass position in the future\n point: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)\n};\nCtxMenuTrigger.contextTypes = contextTypes;\nCtxMenuTrigger.childContextTypes = contextTypes;\nCtxMenuTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupAlign: noop,\n popupClassName: '',\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this2.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this2.hasPopupMouseDown = true;\n\n clearTimeout(_this2.mouseDownTimeout);\n _this2.mouseDownTimeout = setTimeout(function () {\n _this2.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.getRootDomNode = function () {\n return (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode)(_this2);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props = _this2.props,\n popupPlacement = _props.popupPlacement,\n builtinPlacements = _props.builtinPlacements,\n prefixCls = _props.prefixCls,\n alignPoint = _props.alignPoint,\n getPopupClassNameFromAlign = _props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0,_utils__WEBPACK_IMPORTED_MODULE_3__.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props2 = _this2.props,\n prefixCls = _props2.prefixCls,\n destroyPopupOnHide = _props2.destroyPopupOnHide,\n popupClassName = _props2.popupClassName,\n onPopupAlign = _props2.onPopupAlign,\n popupAnimation = _props2.popupAnimation,\n popupTransitionName = _props2.popupTransitionName,\n popupStyle = _props2.popupStyle,\n mask = _props2.mask,\n maskAnimation = _props2.maskAnimation,\n maskTransitionName = _props2.maskTransitionName,\n zIndex = _props2.zIndex,\n popup = _props2.popup,\n stretch = _props2.stretch,\n alignPoint = _props2.alignPoint,\n point = _props2.point;\n var popupVisible = _this2.state.popupVisible;\n\n\n var align = _this2.getPopupAlign();\n\n var mouseProps = {};\n mouseProps.onMouseDown = _this2.onPopupMouseDown;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n _Popup__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n _extends({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: ['contextMenu'],\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this2.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this2.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this2.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this2.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer((0,react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode)(_this2)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.savePopup = function (node) {\n _this2._component = node;\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CtxMenuTrigger);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/react-ctxmenu-trigger/es/index.js?");
|
|
5459
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/Portal */ \"../../node_modules/react-ctxmenu-trigger/node_modules/rc-util/es/Portal.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"../../node_modules/react-ctxmenu-trigger/es/utils.js\");\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Popup */ \"../../node_modules/react-ctxmenu-trigger/es/Popup.js\");\nvar _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n\n\n\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar contextTypes = {\n rcTrigger: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({\n onPopupMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func)\n })\n};\n\nvar CtxMenuTrigger = function (_React$Component) {\n _inherits(CtxMenuTrigger, _React$Component);\n\n // todo: slim props\n function CtxMenuTrigger(props) {\n _classCallCheck(this, CtxMenuTrigger);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n return _this;\n }\n\n CtxMenuTrigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n CtxMenuTrigger.prototype.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.mouseDownTimeout);\n };\n\n CtxMenuTrigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n CtxMenuTrigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n CtxMenuTrigger.prototype.render = function render() {\n var popupVisible = this.state.popupVisible;\n var forceRender = this.props.forceRender;\n\n // prevent unmounting after it's rendered\n\n if (popupVisible || this._component || forceRender) {\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n rc_util_es_Portal__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n {\n getContainer: this.getContainer\n },\n this.getComponent()\n );\n }\n\n return null;\n };\n\n return CtxMenuTrigger;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nCtxMenuTrigger.propTypes = {\n getPopupClassNameFromAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n popup: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func)]).isRequired,\n popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n prefixCls: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n builtinPlacements: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n popupTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)]),\n popupAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().any),\n zIndex: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),\n getPopupContainer: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n getDocument: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n forceRender: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n destroyPopupOnHide: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n mask: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n onPopupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func),\n popupAlign: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),\n popupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n defaultPopupVisible: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),\n maskTransitionName: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)]),\n maskAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n stretch: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),\n alignPoint: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool), // Maybe we can support user pass position in the future\n point: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)\n};\nCtxMenuTrigger.contextTypes = contextTypes;\nCtxMenuTrigger.childContextTypes = contextTypes;\nCtxMenuTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupAlign: noop,\n popupClassName: '',\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this2.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this2.hasPopupMouseDown = true;\n\n clearTimeout(_this2.mouseDownTimeout);\n _this2.mouseDownTimeout = setTimeout(function () {\n _this2.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.getRootDomNode = function () {\n return (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode)(_this2);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props = _this2.props,\n popupPlacement = _props.popupPlacement,\n builtinPlacements = _props.builtinPlacements,\n prefixCls = _props.prefixCls,\n alignPoint = _props.alignPoint,\n getPopupClassNameFromAlign = _props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0,_utils__WEBPACK_IMPORTED_MODULE_3__.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props2 = _this2.props,\n prefixCls = _props2.prefixCls,\n destroyPopupOnHide = _props2.destroyPopupOnHide,\n popupClassName = _props2.popupClassName,\n onPopupAlign = _props2.onPopupAlign,\n popupAnimation = _props2.popupAnimation,\n popupTransitionName = _props2.popupTransitionName,\n popupStyle = _props2.popupStyle,\n mask = _props2.mask,\n maskAnimation = _props2.maskAnimation,\n maskTransitionName = _props2.maskTransitionName,\n zIndex = _props2.zIndex,\n popup = _props2.popup,\n stretch = _props2.stretch,\n alignPoint = _props2.alignPoint,\n point = _props2.point;\n var popupVisible = _this2.state.popupVisible;\n\n\n var align = _this2.getPopupAlign();\n\n var mouseProps = {};\n mouseProps.onMouseDown = _this2.onPopupMouseDown;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\n _Popup__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n _extends({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: ['contextMenu'],\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this2.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this2.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this2.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this2.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer((0,react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode)(_this2)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.savePopup = function (node) {\n _this2._component = node;\n };\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CtxMenuTrigger);\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/react-ctxmenu-trigger/es/index.js?");
|
|
4954
5460
|
|
|
4955
5461
|
/***/ }),
|
|
4956
5462
|
|
|
@@ -4965,6 +5471,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
4965
5471
|
|
|
4966
5472
|
/***/ }),
|
|
4967
5473
|
|
|
5474
|
+
/***/ "../../node_modules/react-ctxmenu-trigger/node_modules/rc-util/es/Portal.js":
|
|
5475
|
+
/*!**********************************************************************************!*\
|
|
5476
|
+
!*** ../../node_modules/react-ctxmenu-trigger/node_modules/rc-util/es/Portal.js ***!
|
|
5477
|
+
\**********************************************************************************/
|
|
5478
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5479
|
+
|
|
5480
|
+
"use strict";
|
|
5481
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Portal)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"../../node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"../../node_modules/react-dom/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; 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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar Portal = /*#__PURE__*/function (_React$Component) {\n _inherits(Portal, _React$Component);\n\n var _super = _createSuper(Portal);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Portal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.createContainer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var didUpdate = this.props.didUpdate;\n\n if (didUpdate) {\n didUpdate(prevProps);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeContainer();\n }\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n this._container = this.props.getContainer();\n this.forceUpdate();\n }\n }, {\n key: \"removeContainer\",\n value: function removeContainer() {\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this._container) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal(this.props.children, this._container);\n }\n\n return null;\n }\n }]);\n\n return Portal;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));\n\nPortal.propTypes = {\n getContainer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node).isRequired,\n didUpdate: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func)\n};\n\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/react-ctxmenu-trigger/node_modules/rc-util/es/Portal.js?");
|
|
5482
|
+
|
|
5483
|
+
/***/ }),
|
|
5484
|
+
|
|
4968
5485
|
/***/ "../../node_modules/react-dom/cjs/react-dom.development.js":
|
|
4969
5486
|
/*!*****************************************************************!*\
|
|
4970
5487
|
!*** ../../node_modules/react-dom/cjs/react-dom.development.js ***!
|
|
@@ -5484,7 +6001,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
|
|
|
5484
6001
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
5485
6002
|
|
|
5486
6003
|
"use strict";
|
|
5487
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.destroyFns = void 0;\nconst tslib_1 = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.mjs\");\nconst CloseOutlined_1 = tslib_1.__importDefault(__webpack_require__(/*! @ant-design/icons/CloseOutlined */ \"../../node_modules/@ant-design/icons/CloseOutlined.js\"));\nconst classnames_1 = tslib_1.__importDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nconst prop_types_1 = tslib_1.__importDefault(__webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\"));\nconst rc_dialog_1 = tslib_1.__importDefault(__webpack_require__(/*! rc-dialog */ \"../../node_modules/rc-dialog/es/
|
|
6004
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.destroyFns = void 0;\nconst tslib_1 = __webpack_require__(/*! tslib */ \"../../node_modules/tslib/tslib.es6.mjs\");\nconst CloseOutlined_1 = tslib_1.__importDefault(__webpack_require__(/*! @ant-design/icons/CloseOutlined */ \"../../node_modules/@ant-design/icons/CloseOutlined.js\"));\nconst classnames_1 = tslib_1.__importDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nconst prop_types_1 = tslib_1.__importDefault(__webpack_require__(/*! prop-types */ \"../../node_modules/prop-types/index.js\"));\nconst rc_dialog_1 = tslib_1.__importDefault(__webpack_require__(/*! rc-dialog */ \"../../node_modules/rc-dialog/es/index.js\"));\nconst addEventListener_1 = tslib_1.__importDefault(__webpack_require__(/*! rc-util/lib/Dom/addEventListener */ \"../../node_modules/rc-util/lib/Dom/addEventListener.js\"));\nconst react_1 = tslib_1.__importDefault(__webpack_require__(/*! react */ \"../../node_modules/react/index.js\"));\nconst button_1 = __webpack_require__(/*! ../button */ \"./src/button/index.tsx\");\nconst locale_1 = __webpack_require__(/*! ./locale */ \"./src/modal/locale.ts\");\nlet mousePosition;\nexports.destroyFns = [];\n// ref: https://github.com/ant-design/ant-design/issues/15795\nconst getClickPosition = (e) => {\n mousePosition = {\n x: e.pageX,\n y: e.pageY,\n };\n // 100ms 内发生过点击事件,则从点击位置动画展示\n // 否则直接 zoom 展示\n // 这样可以兼容非点击方式展开\n setTimeout(() => (mousePosition = null), 100);\n};\n// 只有点击事件支持从鼠标位置动画展开\nif (typeof window !== 'undefined' && window.document && window.document.documentElement) {\n (0, addEventListener_1.default)(document.documentElement, 'click', getClickPosition);\n}\nclass Modal extends react_1.default.Component {\n constructor() {\n super(...arguments);\n this.handleCancel = (e) => {\n const { onCancel } = this.props;\n if (onCancel) {\n onCancel(e);\n }\n };\n this.handleOk = (e) => {\n const { onOk } = this.props;\n if (onOk) {\n onOk(e);\n }\n };\n this.renderFooter = (locale) => {\n const { okText, okType, cancelText, confirmLoading } = this.props;\n return (react_1.default.createElement(\"div\", null,\n react_1.default.createElement(button_1.Button, Object.assign({ onClick: this.handleCancel }, this.props.cancelButtonProps), cancelText || locale.cancelText),\n react_1.default.createElement(button_1.Button, Object.assign({ type: okType, loading: confirmLoading, onClick: this.handleOk }, this.props.okButtonProps), okText || locale.okText)));\n };\n this.renderModal = () => {\n const _a = this.props, { prefixCls: customizePrefixCls, footer, visible, wrapClassName, centered, getContainer, closeIcon, closable = true } = _a, restProps = tslib_1.__rest(_a, [\"prefixCls\", \"footer\", \"visible\", \"wrapClassName\", \"centered\", \"getContainer\", \"closeIcon\", \"closable\"]);\n const prefixCls = customizePrefixCls || 'kt-modal';\n const defaultFooter = this.renderFooter((0, locale_1.getConfirmLocale)());\n const closeIconToRender = (react_1.default.createElement(\"span\", { className: `${prefixCls}-close-x` }, closeIcon || react_1.default.createElement(CloseOutlined_1.default, { className: `${prefixCls}-close-icon` })));\n return (react_1.default.createElement(rc_dialog_1.default, Object.assign({}, restProps, { animation: this.props.animation, getContainer: getContainer, prefixCls: prefixCls, wrapClassName: (0, classnames_1.default)({ [`${prefixCls}-centered`]: !!centered }, wrapClassName), footer: footer === undefined ? defaultFooter : footer, visible: visible, mousePosition: mousePosition, onClose: this.handleCancel, closeIcon: closeIconToRender })));\n };\n }\n render() {\n return this.renderModal();\n }\n}\nModal.defaultProps = {\n width: 520,\n confirmLoading: false,\n visible: false,\n okType: 'primary',\n};\nModal.propTypes = {\n prefixCls: prop_types_1.default.string,\n onOk: prop_types_1.default.func,\n onCancel: prop_types_1.default.func,\n okText: prop_types_1.default.node,\n cancelText: prop_types_1.default.node,\n centered: prop_types_1.default.bool,\n width: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),\n confirmLoading: prop_types_1.default.bool,\n visible: prop_types_1.default.bool,\n footer: prop_types_1.default.node,\n title: prop_types_1.default.node,\n closable: prop_types_1.default.bool,\n closeIcon: prop_types_1.default.node,\n};\nexports[\"default\"] = Modal;\n\n\n//# sourceURL=webpack://@opensumi/ide-components/./src/modal/Modal.tsx?");
|
|
5488
6005
|
|
|
5489
6006
|
/***/ }),
|
|
5490
6007
|
|
|
@@ -7371,10 +7888,10 @@ eval("/* provided dependency */ var process = __webpack_require__(/*! ../../node
|
|
|
7371
7888
|
/*!*******************************!*\
|
|
7372
7889
|
!*** ../utils/lib/process.js ***!
|
|
7373
7890
|
\*******************************/
|
|
7374
|
-
/***/ ((
|
|
7891
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
7375
7892
|
|
|
7376
7893
|
"use strict";
|
|
7377
|
-
eval("/* provided dependency */ var process = __webpack_require__(/*! ../../node_modules/process/browser.js */ \"../../node_modules/process/browser.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.nextTick = exports.platform = exports.env = exports.cwd = void 0;\nconst platform_1 = __webpack_require__(/*! ./platform */ \"../utils/lib/platform.js\");\nconst _safeProcess = {\n cwd() {\n return '/';\n },\n env: Object.create(null),\n get platform() {\n return platform_1.isWindows ? 'win32' : platform_1.isMacintosh ? 'darwin' : 'linux';\n },\n nextTick(callback) {\n return (0, platform_1.setImmediate)(callback);\n },\n};\nlet safeProcess;\nif (typeof process === 'undefined') {\n safeProcess = _safeProcess;\n}\nelse {\n if (typeof process.cwd === 'undefined') {\n safeProcess = _safeProcess;\n }\n else {\n safeProcess = process;\n }\n}\nexports.cwd = safeProcess.cwd;\nexports.env = safeProcess.env;\nexports.platform = safeProcess.platform;\nexports.nextTick = safeProcess.nextTick;\n//# sourceMappingURL=process.js.map\n\n//# sourceURL=webpack://@opensumi/ide-components/../utils/lib/process.js?");
|
|
7894
|
+
eval("var __filename = \"/index.js\";\n/* module decorator */ module = __webpack_require__.nmd(module);\n/* provided dependency */ var process = __webpack_require__(/*! ../../node_modules/process/browser.js */ \"../../node_modules/process/browser.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.extFileType = exports.nextTick = exports.platform = exports.env = exports.cwd = void 0;\nconst platform_1 = __webpack_require__(/*! ./platform */ \"../utils/lib/platform.js\");\nconst _safeProcess = {\n cwd() {\n return '/';\n },\n env: Object.create(null),\n get platform() {\n return platform_1.isWindows ? 'win32' : platform_1.isMacintosh ? 'darwin' : 'linux';\n },\n nextTick(callback) {\n return (0, platform_1.setImmediate)(callback);\n },\n};\nlet safeProcess;\nif (typeof process === 'undefined') {\n safeProcess = _safeProcess;\n}\nelse {\n if (typeof process.cwd === 'undefined') {\n safeProcess = _safeProcess;\n }\n else {\n safeProcess = process;\n }\n}\nfunction detectExtFileType() {\n if ( true && module.filename) {\n if (module.filename.endsWith('.ts')) {\n return 'ts';\n }\n return 'js';\n }\n if (true) {\n if (__filename.endsWith('.ts')) {\n return 'ts';\n }\n return 'js';\n }\n return 'js';\n}\nexports.cwd = safeProcess.cwd;\nexports.env = safeProcess.env;\nexports.platform = safeProcess.platform;\nexports.nextTick = safeProcess.nextTick;\nexports.extFileType = detectExtFileType();\n//# sourceMappingURL=process.js.map\n\n//# sourceURL=webpack://@opensumi/ide-components/../utils/lib/process.js?");
|
|
7378
7895
|
|
|
7379
7896
|
/***/ }),
|
|
7380
7897
|
|
|
@@ -7901,6 +8418,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
7901
8418
|
|
|
7902
8419
|
/***/ }),
|
|
7903
8420
|
|
|
8421
|
+
/***/ "../../node_modules/@babel/runtime/helpers/esm/toArray.js":
|
|
8422
|
+
/*!****************************************************************!*\
|
|
8423
|
+
!*** ../../node_modules/@babel/runtime/helpers/esm/toArray.js ***!
|
|
8424
|
+
\****************************************************************/
|
|
8425
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8426
|
+
|
|
8427
|
+
"use strict";
|
|
8428
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _toArray)\n/* harmony export */ });\n/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ \"../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ \"../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ \"../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\n\nfunction _toArray(arr) {\n return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack://@opensumi/ide-components/../../node_modules/@babel/runtime/helpers/esm/toArray.js?");
|
|
8429
|
+
|
|
8430
|
+
/***/ }),
|
|
8431
|
+
|
|
7904
8432
|
/***/ "../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
|
|
7905
8433
|
/*!**************************************************************************!*\
|
|
7906
8434
|
!*** ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
|