UNPKG

@aplus-frontend/antdv

Version:

Vue basic component library maintained based on ant-design-vue

1,611 lines (1,536 loc) 5.95 MB
/*! * * @aplus-frontend/antdv v1.1.5 * * Copyright 2017-present, Ant Design Vue. * All rights reserved. * */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("vue"), require("dayjs"), require("dayjs_plugin_advancedFormat"), require("dayjs_plugin_customParseFormat"), require("dayjs_plugin_localeData"), require("dayjs_plugin_quarterOfYear"), require("dayjs_plugin_weekOfYear"), require("dayjs_plugin_weekYear"), require("dayjs_plugin_weekday")); else if(typeof define === 'function' && define.amd) define(["vue", "dayjs", "dayjs_plugin_advancedFormat", "dayjs_plugin_customParseFormat", "dayjs_plugin_localeData", "dayjs_plugin_quarterOfYear", "dayjs_plugin_weekOfYear", "dayjs_plugin_weekYear", "dayjs_plugin_weekday"], factory); else if(typeof exports === 'object') exports["antd"] = factory(require("vue"), require("dayjs"), require("dayjs_plugin_advancedFormat"), require("dayjs_plugin_customParseFormat"), require("dayjs_plugin_localeData"), require("dayjs_plugin_quarterOfYear"), require("dayjs_plugin_weekOfYear"), require("dayjs_plugin_weekYear"), require("dayjs_plugin_weekday")); else root["antd"] = factory(root["Vue"], root["dayjs"], root["dayjs_plugin_advancedFormat"], root["dayjs_plugin_customParseFormat"], root["dayjs_plugin_localeData"], root["dayjs_plugin_quarterOfYear"], root["dayjs_plugin_weekOfYear"], root["dayjs_plugin_weekYear"], root["dayjs_plugin_weekday"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_vue__, __WEBPACK_EXTERNAL_MODULE_dayjs__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_advancedFormat__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_customParseFormat__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_localeData__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_quarterOfYear__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_weekOfYear__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_weekYear__, __WEBPACK_EXTERNAL_MODULE_dayjs_plugin_weekday__) { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./components sync recursive ^\\.\\/locale\\/.+_.+\\.tsx?$": /*!****************************************************!*\ !*** ./components/ sync ^\.\/locale\/.+_.+\.tsx?$ ***! \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var map = { "./locale/ar_EG.ts": "./components/locale/ar_EG.ts", "./locale/az_AZ.ts": "./components/locale/az_AZ.ts", "./locale/bg_BG.ts": "./components/locale/bg_BG.ts", "./locale/bn_BD.ts": "./components/locale/bn_BD.ts", "./locale/by_BY.ts": "./components/locale/by_BY.ts", "./locale/ca_ES.ts": "./components/locale/ca_ES.ts", "./locale/cs_CZ.ts": "./components/locale/cs_CZ.ts", "./locale/da_DK.ts": "./components/locale/da_DK.ts", "./locale/de_DE.ts": "./components/locale/de_DE.ts", "./locale/el_GR.ts": "./components/locale/el_GR.ts", "./locale/en_GB.ts": "./components/locale/en_GB.ts", "./locale/en_US.ts": "./components/locale/en_US.ts", "./locale/es_ES.ts": "./components/locale/es_ES.ts", "./locale/et_EE.ts": "./components/locale/et_EE.ts", "./locale/fa_IR.ts": "./components/locale/fa_IR.ts", "./locale/fi_FI.ts": "./components/locale/fi_FI.ts", "./locale/fr_BE.ts": "./components/locale/fr_BE.ts", "./locale/fr_CA.ts": "./components/locale/fr_CA.ts", "./locale/fr_FR.ts": "./components/locale/fr_FR.ts", "./locale/ga_IE.ts": "./components/locale/ga_IE.ts", "./locale/gl_ES.ts": "./components/locale/gl_ES.ts", "./locale/he_IL.ts": "./components/locale/he_IL.ts", "./locale/hi_IN.ts": "./components/locale/hi_IN.ts", "./locale/hr_HR.ts": "./components/locale/hr_HR.ts", "./locale/hu_HU.ts": "./components/locale/hu_HU.ts", "./locale/hy_AM.ts": "./components/locale/hy_AM.ts", "./locale/id_ID.ts": "./components/locale/id_ID.ts", "./locale/is_IS.ts": "./components/locale/is_IS.ts", "./locale/it_IT.ts": "./components/locale/it_IT.ts", "./locale/ja_JP.ts": "./components/locale/ja_JP.ts", "./locale/ka_GE.ts": "./components/locale/ka_GE.ts", "./locale/kk_KZ.ts": "./components/locale/kk_KZ.ts", "./locale/km_KH.ts": "./components/locale/km_KH.ts", "./locale/kmr_IQ.ts": "./components/locale/kmr_IQ.ts", "./locale/kn_IN.ts": "./components/locale/kn_IN.ts", "./locale/ko_KR.ts": "./components/locale/ko_KR.ts", "./locale/ku_IQ.ts": "./components/locale/ku_IQ.ts", "./locale/lt_LT.ts": "./components/locale/lt_LT.ts", "./locale/lv_LV.ts": "./components/locale/lv_LV.ts", "./locale/mk_MK.ts": "./components/locale/mk_MK.ts", "./locale/ml_IN.ts": "./components/locale/ml_IN.ts", "./locale/mn_MN.ts": "./components/locale/mn_MN.ts", "./locale/ms_MY.ts": "./components/locale/ms_MY.ts", "./locale/nb_NO.ts": "./components/locale/nb_NO.ts", "./locale/ne_NP.ts": "./components/locale/ne_NP.ts", "./locale/nl_BE.ts": "./components/locale/nl_BE.ts", "./locale/nl_NL.ts": "./components/locale/nl_NL.ts", "./locale/pl_PL.ts": "./components/locale/pl_PL.ts", "./locale/pt_BR.ts": "./components/locale/pt_BR.ts", "./locale/pt_PT.ts": "./components/locale/pt_PT.ts", "./locale/ro_RO.ts": "./components/locale/ro_RO.ts", "./locale/ru_RU.ts": "./components/locale/ru_RU.ts", "./locale/sk_SK.ts": "./components/locale/sk_SK.ts", "./locale/sl_SI.ts": "./components/locale/sl_SI.ts", "./locale/sr_RS.ts": "./components/locale/sr_RS.ts", "./locale/sv_SE.ts": "./components/locale/sv_SE.ts", "./locale/ta_IN.ts": "./components/locale/ta_IN.ts", "./locale/th_TH.ts": "./components/locale/th_TH.ts", "./locale/tr_TR.ts": "./components/locale/tr_TR.ts", "./locale/uk_UA.ts": "./components/locale/uk_UA.ts", "./locale/ur_PK.ts": "./components/locale/ur_PK.ts", "./locale/vi_VN.ts": "./components/locale/vi_VN.ts", "./locale/zh_CN.ts": "./components/locale/zh_CN.ts", "./locale/zh_HK.ts": "./components/locale/zh_HK.ts", "./locale/zh_TW.ts": "./components/locale/zh_TW.ts" }; function webpackContext(req) { var id = webpackContextResolve(req); return __webpack_require__(id); } function webpackContextResolve(req) { if(!__webpack_require__.o(map, req)) { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; } return map[req]; } webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = "./components sync recursive ^\\.\\/locale\\/.+_.+\\.tsx?$"; /***/ }), /***/ "./components/_util/ActionButton.tsx": /*!*******************************************!*\ !*** ./components/_util/ActionButton.tsx ***! \*******************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../button */ "./components/button/index.ts"); /* harmony import */ var _button_buttonTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../button/buttonTypes */ "./components/button/buttonTypes.ts"); /* harmony import */ var _hooks_useDestroyed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useDestroyed */ "./components/_util/hooks/useDestroyed.ts"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./type */ "./components/_util/type.ts"); /* harmony import */ var _props_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./props-util */ "./components/_util/props-util/index.ts"); const actionButtonProps = { type: { type: String }, actionFn: Function, close: Function, autofocus: Boolean, prefixCls: String, buttonProps: (0,_type__WEBPACK_IMPORTED_MODULE_2__.objectType)(), emitEvent: Boolean, quitOnNullishReturnValue: Boolean }; function isThenable(thing) { return !!(thing && thing.then); } /* harmony default export */ __webpack_exports__["default"] = ((0,vue__WEBPACK_IMPORTED_MODULE_1__.defineComponent)({ compatConfig: { MODE: 3 }, name: 'ActionButton', props: actionButtonProps, setup(props, _ref) { let { slots } = _ref; const clickedRef = (0,vue__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(false); const buttonRef = (0,vue__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(); const loading = (0,vue__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(false); let timeoutId; const isDestroyed = (0,_hooks_useDestroyed__WEBPACK_IMPORTED_MODULE_3__["default"])(); (0,vue__WEBPACK_IMPORTED_MODULE_1__.onMounted)(() => { if (props.autofocus) { timeoutId = setTimeout(() => { var _a, _b; return (_b = (_a = (0,_props_util__WEBPACK_IMPORTED_MODULE_4__.findDOMNode)(buttonRef.value)) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a); }); } }); (0,vue__WEBPACK_IMPORTED_MODULE_1__.onBeforeUnmount)(() => { clearTimeout(timeoutId); }); const onInternalClose = function () { var _a; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props, ...args); }; const handlePromiseOnOk = returnValueOfOnOk => { if (!isThenable(returnValueOfOnOk)) { return; } loading.value = true; returnValueOfOnOk.then(function () { if (!isDestroyed.value) { loading.value = false; } onInternalClose(...arguments); clickedRef.value = false; }, e => { // See: https://github.com/ant-design/ant-design/issues/6183 if (!isDestroyed.value) { loading.value = false; } clickedRef.value = false; return Promise.reject(e); }); }; const onClick = e => { const { actionFn } = props; if (clickedRef.value) { return; } clickedRef.value = true; if (!actionFn) { onInternalClose(); return; } let returnValueOfOnOk; if (props.emitEvent) { returnValueOfOnOk = actionFn(e); if (props.quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) { clickedRef.value = false; onInternalClose(e); return; } } else if (actionFn.length) { returnValueOfOnOk = actionFn(props.close); // https://github.com/ant-design/ant-design/issues/23358 clickedRef.value = false; } else { returnValueOfOnOk = actionFn(); if (!returnValueOfOnOk) { onInternalClose(); return; } } handlePromiseOnOk(returnValueOfOnOk); }; return () => { const { type, prefixCls, buttonProps } = props; return (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_button__WEBPACK_IMPORTED_MODULE_5__["default"], (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, (0,_button_buttonTypes__WEBPACK_IMPORTED_MODULE_6__.convertLegacyProps)(type)), {}, { "onClick": onClick, "loading": loading.value, "prefixCls": prefixCls }, buttonProps), {}, { "ref": buttonRef }), slots); }; } })); /***/ }), /***/ "./components/_util/BaseInput.tsx": /*!****************************************!*\ !*** ./components/_util/BaseInput.tsx ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _vue_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-types */ "./components/_util/vue-types/index.ts"); /* harmony import */ var _BaseInputInner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BaseInputInner */ "./components/_util/BaseInputInner.tsx"); /* harmony import */ var _vc_util_Dom_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../vc-util/Dom/css */ "./components/vc-util/Dom/css.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; const BaseInput = (0,vue__WEBPACK_IMPORTED_MODULE_1__.defineComponent)({ compatConfig: { MODE: 3 }, inheritAttrs: false, props: { disabled: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].looseBool, type: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, value: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].any, lazy: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].bool.def(true), tag: { type: String, default: 'input' }, size: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, style: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].oneOfType([String, Object]), class: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string }, emits: ['change', 'input', 'blur', 'keydown', 'focus', 'compositionstart', 'compositionend', 'keyup', 'paste', 'mousedown'], setup(props, _ref) { let { emit, attrs, expose } = _ref; const inputRef = (0,vue__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); const renderValue = (0,vue__WEBPACK_IMPORTED_MODULE_1__.ref)(); const isComposing = (0,vue__WEBPACK_IMPORTED_MODULE_1__.ref)(false); (0,vue__WEBPACK_IMPORTED_MODULE_1__.watch)([() => props.value, isComposing], () => { if (isComposing.value) return; renderValue.value = props.value; }, { immediate: true }); const handleChange = e => { emit('change', e); }; const onCompositionstart = e => { isComposing.value = true; e.target.composing = true; emit('compositionstart', e); }; const onCompositionend = e => { isComposing.value = false; e.target.composing = false; emit('compositionend', e); const event = document.createEvent('HTMLEvents'); event.initEvent('input', true, true); e.target.dispatchEvent(event); handleChange(e); }; const handleInput = e => { if (isComposing.value && props.lazy) { renderValue.value = e.target.value; return; } emit('input', e); }; const handleBlur = e => { emit('blur', e); }; const handleFocus = e => { emit('focus', e); }; const focus = () => { if (inputRef.value) { inputRef.value.focus(); } }; const blur = () => { if (inputRef.value) { inputRef.value.blur(); } }; const handleKeyDown = e => { emit('keydown', e); }; const handleKeyUp = e => { emit('keyup', e); }; const setSelectionRange = (start, end, direction) => { var _a; (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end, direction); }; const select = () => { var _a; (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.select(); }; const rootInputForceUpdate = () => { var _a; (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.rootInputForceUpdate(); }; expose({ focus, blur, input: (0,vue__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.input; }), setSelectionRange, select, rootInputForceUpdate, getSelectionStart: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionStart(); }, getSelectionEnd: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionEnd(); }, getScrollTop: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getScrollTop(); } }); const handleMousedown = e => { emit('mousedown', e); }; const handlePaste = e => { emit('paste', e); }; const styleString = (0,vue__WEBPACK_IMPORTED_MODULE_1__.computed)(() => { return props.style && typeof props.style !== 'string' ? (0,_vc_util_Dom_css__WEBPACK_IMPORTED_MODULE_3__.styleObjectToString)(props.style) : props.style; }); return () => { const { style, lazy } = props, restProps = __rest(props, ["style", "lazy"]); return (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_BaseInputInner__WEBPACK_IMPORTED_MODULE_4__["default"], (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, restProps), attrs), {}, { "style": styleString.value, "onInput": handleInput, "onChange": handleChange, "onBlur": handleBlur, "onFocus": handleFocus, "ref": inputRef, "value": renderValue.value, "onCompositionstart": onCompositionstart, "onCompositionend": onCompositionend, "onKeyup": handleKeyUp, "onKeydown": handleKeyDown, "onPaste": handlePaste, "onMousedown": handleMousedown }), null); }; } }); /* harmony default export */ __webpack_exports__["default"] = (BaseInput); /***/ }), /***/ "./components/_util/BaseInputInner.tsx": /*!*********************************************!*\ !*** ./components/_util/BaseInputInner.tsx ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _vue_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-types */ "./components/_util/vue-types/index.ts"); var __rest = undefined && undefined.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; const BaseInputInner = (0,vue__WEBPACK_IMPORTED_MODULE_1__.defineComponent)({ compatConfig: { MODE: 3 }, // inheritAttrs: false, props: { disabled: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].looseBool, type: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, value: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].any, tag: { type: String, default: 'input' }, size: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, onChange: Function, onInput: Function, onBlur: Function, onFocus: Function, onKeydown: Function, onCompositionstart: Function, onCompositionend: Function, onKeyup: Function, onPaste: Function, onMousedown: Function }, emits: ['change', 'input', 'blur', 'keydown', 'focus', 'compositionstart', 'compositionend', 'keyup', 'paste', 'mousedown'], setup(props, _ref) { let { expose } = _ref; const inputRef = (0,vue__WEBPACK_IMPORTED_MODULE_1__.shallowRef)(null); const ins = (0,vue__WEBPACK_IMPORTED_MODULE_1__.getCurrentInstance)(); const focus = () => { if (inputRef.value) { inputRef.value.focus(); } }; const blur = () => { if (inputRef.value) { inputRef.value.blur(); } }; const setSelectionRange = (start, end, direction) => { var _a; (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end, direction); }; const select = () => { var _a; (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.select(); }; const rootInputForceUpdate = () => { ins.proxy.$forceUpdate(); }; expose({ focus, blur, input: inputRef, setSelectionRange, select, rootInputForceUpdate, getSelectionStart: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.selectionStart; }, getSelectionEnd: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.selectionEnd; }, getScrollTop: () => { var _a; return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.scrollTop; } }); return () => { const { tag: Tag, value } = props, restProps = __rest(props, ["tag", "value"]); return (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(Tag, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, restProps), {}, { "ref": inputRef, "value": value }), null); }; } }); /* harmony default export */ __webpack_exports__["default"] = (BaseInputInner); /***/ }), /***/ "./components/_util/BaseMixin.ts": /*!***************************************!*\ !*** ./components/_util/BaseMixin.ts ***! \***************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _props_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./props-util */ "./components/_util/props-util/index.ts"); /* harmony default export */ __webpack_exports__["default"] = ({ methods: { setState() { let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; let callback = arguments.length > 1 ? arguments[1] : undefined; let newState = typeof state === 'function' ? state(this.$data, this.$props) : state; if (this.getDerivedStateFromProps) { const s = this.getDerivedStateFromProps((0,_props_util__WEBPACK_IMPORTED_MODULE_2__.getOptionProps)(this), (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.$data), newState)); if (s === null) { return; } else { newState = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, newState), s || {}); } } (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])(this.$data, newState); if (this._.isMounted) { this.$forceUpdate(); } (0,vue__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { callback && callback(); }); }, __emit() { // 直接调用事件,底层组件不需要vueTool记录events // eslint-disable-next-line prefer-rest-params const args = [].slice.call(arguments, 0); let eventName = args[0]; eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`; const event = this.$props[eventName] || this.$attrs[eventName]; if (args.length && event) { if (Array.isArray(event)) { for (let i = 0, l = event.length; i < l; i++) { event[i](...args.slice(1)); } } else { event(...args.slice(1)); } } } } }); /***/ }), /***/ "./components/_util/KeyCode.ts": /*!*************************************!*\ !*** ./components/_util/KeyCode.ts ***! \*************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { "use strict"; /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ const KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, /** * PAGE_DOWN */ PAGE_DOWN: 34, /** * END */ END: 35, /** * HOME */ HOME: 36, /** * LEFT */ LEFT: 37, /** * UP */ UP: 38, /** * RIGHT */ RIGHT: 39, /** * DOWN */ DOWN: 40, /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, /** * DELETE */ DELETE: 46, /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, /** * DASH */ DASH: 189, /** * EQUALS */ EQUALS: 187, /** * COMMA */ COMMA: 188, /** * PERIOD */ PERIOD: 190, /** * SLASH */ SLASH: 191, /** * APOSTROPHE */ APOSTROPHE: 192, /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, /** * BACKSLASH */ BACKSLASH: 220, /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, /** * WIN_IME */ WIN_IME: 229, // ======================== Function ======================== /** * whether text and modified key is entered at the same time. */ isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) { const { keyCode } = e; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }, /** * whether character is entered. */ isCharacterKey: function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } } }; /* harmony default export */ __webpack_exports__["default"] = (KeyCode); /***/ }), /***/ "./components/_util/Portal.tsx": /*!*************************************!*\ !*** ./components/_util/Portal.tsx ***! \*************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _vue_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vue-types */ "./components/_util/vue-types/index.ts"); /* harmony import */ var _vc_trigger_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vc-trigger/context */ "./components/vc-trigger/context.ts"); /* harmony default export */ __webpack_exports__["default"] = ((0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ compatConfig: { MODE: 3 }, name: 'Portal', inheritAttrs: false, props: { getContainer: _vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func.isRequired, didUpdate: Function }, setup(props, _ref) { let { slots } = _ref; let isSSR = true; // getContainer 不会改变,不用响应式 let container; const { shouldRender } = (0,_vc_trigger_context__WEBPACK_IMPORTED_MODULE_2__.useInjectPortal)(); function setContainer() { if (shouldRender.value) { container = props.getContainer(); } } (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(() => { isSSR = false; // drawer setContainer(); }); (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { if (container) return; // https://github.com/vueComponent/ant-design-vue/issues/6937 setContainer(); }); const stopWatch = (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(shouldRender, () => { if (shouldRender.value && !container) { container = props.getContainer(); } if (container) { stopWatch(); } }); (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => { (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { var _a; if (shouldRender.value) { (_a = props.didUpdate) === null || _a === void 0 ? void 0 : _a.call(props, props); } }); }); // onBeforeUnmount(() => { // if (container && container.parentNode) { // container.parentNode.removeChild(container); // } // }); return () => { var _a; if (!shouldRender.value) return null; if (isSSR) { return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots); } return container ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vue__WEBPACK_IMPORTED_MODULE_0__.Teleport, { "to": container }, slots) : null; }; } })); /***/ }), /***/ "./components/_util/PortalWrapper.tsx": /*!********************************************!*\ !*** ./components/_util/PortalWrapper.tsx ***! \********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getOpenCount */ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _vue_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-types */ "./components/_util/vue-types/index.ts"); /* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Portal */ "./components/_util/Portal.tsx"); /* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canUseDom */ "./components/_util/canUseDom.ts"); /* harmony import */ var _raf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./raf */ "./components/_util/raf.ts"); /* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./type */ "./components/_util/type.ts"); /* harmony import */ var _hooks_useScrollLocker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useScrollLocker */ "./components/_util/hooks/useScrollLocker.ts"); let openCount = 0; const supportDom = (0,_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])(); /** @private Test usage only */ function getOpenCount() { return false ? 0 : 0; } const getParent = getContainer => { if (!supportDom) { return null; } if (getContainer) { if (typeof getContainer === 'string') { return document.querySelectorAll(getContainer)[0]; } if (typeof getContainer === 'function') { return getContainer(); } if (typeof getContainer === 'object' && getContainer instanceof window.HTMLElement) { return getContainer; } } return document.body; }; /* harmony default export */ __webpack_exports__["default"] = ((0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({ compatConfig: { MODE: 3 }, name: 'PortalWrapper', inheritAttrs: false, props: { wrapperClassName: String, forceRender: { type: Boolean, default: undefined }, getContainer: _vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].any, visible: { type: Boolean, default: undefined }, autoLock: (0,_type__WEBPACK_IMPORTED_MODULE_3__.booleanType)(), didUpdate: Function }, setup(props, _ref) { let { slots } = _ref; const container = (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(); const componentRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(); const rafId = (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(); const triggerUpdate = (0,vue__WEBPACK_IMPORTED_MODULE_0__.shallowRef)(1); const defaultContainer = (0,_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])() && document.createElement('div'); const removeCurrentContainer = () => { var _a, _b; // Portal will remove from `parentNode`. // Let's handle this again to avoid refactor issue. if (container.value === defaultContainer) { (_b = (_a = container.value) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(container.value); } container.value = null; }; let parent = null; const attachToParent = function () { let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; if (force || container.value && !container.value.parentNode) { parent = getParent(props.getContainer); if (parent) { parent.appendChild(container.value); return true; } return false; } return true; }; const getContainer = () => { if (!supportDom) { return null; } if (!container.value) { container.value = defaultContainer; attachToParent(true); } setWrapperClassName(); return container.value; }; const setWrapperClassName = () => { const { wrapperClassName } = props; if (container.value && wrapperClassName && wrapperClassName !== container.value.className) { container.value.className = wrapperClassName; } }; (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => { setWrapperClassName(); attachToParent(); }); (0,_hooks_useScrollLocker__WEBPACK_IMPORTED_MODULE_4__["default"])((0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => { return props.autoLock && props.visible && (0,_canUseDom__WEBPACK_IMPORTED_MODULE_1__["default"])() && (container.value === document.body || container.value === defaultContainer); })); (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => { let init = false; (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)([() => props.visible, () => props.getContainer], (_ref2, _ref3) => { let [visible, getContainer] = _ref2; let [prevVisible, prevGetContainer] = _ref3; // Update count if (supportDom) { parent = getParent(props.getContainer); if (parent === document.body) { if (visible && !prevVisible) { openCount += 1; } else if (init) { openCount -= 1; } } } if (init) { // Clean up container if needed const getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function'; if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) { removeCurrentContainer(); } } init = true; }, { immediate: true, flush: 'post' }); (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { if (!attachToParent()) { rafId.value = (0,_raf__WEBPACK_IMPORTED_MODULE_5__["default"])(() => { triggerUpdate.value += 1; }); } }); }); (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(() => { const { visible } = props; if (supportDom && parent === document.body) { // 离开时不会 render, 导到离开时数值不变,改用 func 。。 openCount = visible && openCount ? openCount - 1 : openCount; } removeCurrentContainer(); _raf__WEBPACK_IMPORTED_MODULE_5__["default"].cancel(rafId.value); }); return () => { const { forceRender, visible } = props; let portal = null; const childProps = { getOpenCount: () => openCount, getContainer }; if (triggerUpdate.value && (forceRender || visible || componentRef.value)) { portal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_Portal__WEBPACK_IMPORTED_MODULE_6__["default"], { "getContainer": getContainer, "ref": componentRef, "didUpdate": props.didUpdate }, { default: () => { var _a; return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots, childProps); } }); } return portal; }; } })); /***/ }), /***/ "./components/_util/canUseDom.ts": /*!***************************************!*\ !*** ./components/_util/canUseDom.ts ***! \***************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { "use strict"; function canUseDom() { return !!(typeof window !== 'undefined' && window.document && window.document.createElement); } /* harmony default export */ __webpack_exports__["default"] = (canUseDom); /***/ }), /***/ "./components/_util/classNames.ts": /*!****************************************!*\ !*** ./components/_util/classNames.ts ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./components/_util/util.ts"); function classNames() { const classes = []; for (let i = 0; i < arguments.length; i++) { const value = i < 0 || arguments.length <= i ? undefined : arguments[i]; if (!value) continue; if ((0,_util__WEBPACK_IMPORTED_MODULE_0__.isString)(value)) { classes.push(value); } else if ((0,_util__WEBPACK_IMPORTED_MODULE_0__.isArray)(value)) { for (let i = 0; i < value.length; i++) { const inner = classNames(value[i]); if (inner) { classes.push(inner); } } } else if ((0,_util__WEBPACK_IMPORTED_MODULE_0__.isObject)(value)) { for (const name in value) { if (value[name]) { classes.push(name); } } } } return classes.join(' '); } /* harmony default export */ __webpack_exports__["default"] = (classNames); /***/ }), /***/ "./components/_util/collapseMotion.tsx": /*!*********************************************!*\ !*** ./components/_util/collapseMotion.tsx ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _vc_util_Dom_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vc-util/Dom/class */ "./components/vc-util/Dom/class.js"); const collapseMotion = function () { let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant-motion-collapse'; let appear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return { name, appear, css: true, onBeforeEnter: node => { node.style.height = '0px'; node.style.opacity = '0'; (0,_vc_util_Dom_class__WEBPACK_IMPORTED_MODULE_1__.addClass)(node, name); }, onEnter: node => { (0,vue__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { node.style.height = `${node.scrollHeight}px`; node.style.opacity = '1'; }); }, onAfterEnter: node => { if (node) { (0,_vc_util_Dom_class__WEBPACK_IMPORTED_MODULE_1__.removeClass)(node, name); node.style.height = null; node.style.opacity = null; } }, onBeforeLeave: node => { (0,_vc_util_Dom_class__WEBPACK_IMPORTED_MODULE_1__.addClass)(node, name); node.style.height = `${node.offsetHeight}px`; node.style.opacity = null; }, onLeave: node => { setTimeout(() => { node.style.height = '0px'; node.style.opacity = '0'; }); }, onAfterLeave: node => { if (node) { (0,_vc_util_Dom_class__WEBPACK_IMPORTED_MODULE_1__.removeClass)(node, name); if (node.style) { node.style.height = null; node.style.opacity = null; } } } }; }; /* harmony default export */ __webpack_exports__["default"] = (collapseMotion); /***/ }), /***/ "./components/_util/colors.ts": /*!************************************!*\ !*** ./components/_util/colors.ts ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ isPresetColor: function() { return /* binding */ isPresetColor; }, /* harmony export */ isPresetStatusColor: function() { return /* binding */ isPresetStatusColor; } /* harmony export */ }); /* unused harmony export PresetStatusColorTypes */ /* harmony import */ var _theme_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../theme/interface */ "./components/theme/interface/presetColors.ts"); const inverseColors = _theme_interface__WEBPACK_IMPORTED_MODULE_0__.PresetColors.map(color => `${color}-inverse`); const PresetStatusColorTypes = ['success', 'processing', 'error', 'default', 'warning']; /** * determine if the color keyword belongs to the `Ant Design` {@link PresetColors}. * @param color color to be judged * @param includeInverse whether to include reversed colors */ function isPresetColor(color) { let includeInverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (includeInverse) { return [...inverseColors, ..._theme_interface__WEBPACK_IMPORTED_MODULE_0__.PresetColors].includes(color); } return _theme_interface__WEBPACK_IMPORTED_MODULE_0__.PresetColors.includes(color); } function isPresetStatusColor(color) { return PresetStatusColorTypes.includes(color); } /***/ }), /***/ "./components/_util/copy-to-clipboard/index.ts": /*!*****************************************************!*\ !*** ./components/_util/copy-to-clipboard/index.ts ***! \*****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _toggle_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toggle-selection */ "./components/_util/copy-to-clipboard/toggle-selection.ts"); const clipboardToIE11Formatting = { 'text/plain': 'Text', 'text/html': 'Url', default: 'Text' }; const defaultMessage = 'Copy to clipboard: #{key}, Enter'; function format(message) { const copyKey = (/mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl') + '+C'; return message.replace(/#{\s*key\s*}/g, copyKey); } function copy(text, options) { let message, reselectPrevious, range, selection, mark, success = false; if (!options) { options = {}; } const debug = options.debug || false; try { reselectPrevious = (0,_toggle_selection__WEBPACK_IMPORTED_MODULE_0__["default"])(); range = document.createRange(); selection = document.getSelection(); mark = document.createElement('span'); mark.textContent = text; // reset user styles for span element mark.style.all = 'unset'; // prevents scrolling to the end of the page mark.style.position = 'fixed'; mark.style.top = 0; mark.style.clip = 'rect(0, 0, 0, 0)'; // used to preserve spaces and line breaks mark.style.whiteSpace = 'pre'; // do not inherit user-select (it may be `none`) mark.style.webkitUserSelect = 'text'; mark.style.MozUserSelect = 'text'; mar