feat: 我的页面
This commit is contained in:
523
dist/vendors.js
vendored
523
dist/vendors.js
vendored
@@ -471,6 +471,262 @@ function Info(props) {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/tabbar-item/index.js":
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/tabbar-item/index.js ***!
|
||||
\*************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export TabbarItem */
|
||||
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var _wxs_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wxs/utils */ "./node_modules/@antmjs/vantui/es/wxs/utils.js");
|
||||
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ "./node_modules/@antmjs/vantui/es/icon/index.js");
|
||||
/* harmony import */ var _info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../info */ "./node_modules/@antmjs/vantui/es/info/index.js");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
|
||||
|
||||
|
||||
var _excluded = ["icon", "name", "iconPrefix", "dot", "info", "renderIconActive", "renderIcon", "index", "active", "activeColor", "inactiveColor", "onChange", "children", "style", "className", "onClick"];
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function TabbarItem(props) {
|
||||
var icon = props.icon,
|
||||
name = props.name,
|
||||
_props$iconPrefix = props.iconPrefix,
|
||||
iconPrefix = _props$iconPrefix === void 0 ? 'van-icon' : _props$iconPrefix,
|
||||
dot = props.dot,
|
||||
info = props.info,
|
||||
renderIconActive = props.renderIconActive,
|
||||
renderIcon = props.renderIcon,
|
||||
index = props.index,
|
||||
active = props.active,
|
||||
activeColor = props.activeColor,
|
||||
inactiveColor = props.inactiveColor,
|
||||
onChange = props.onChange,
|
||||
children = props.children,
|
||||
style = props.style,
|
||||
className = props.className,
|
||||
onClick = props.onClick,
|
||||
others = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__["default"])(props, _excluded);
|
||||
|
||||
var _click = function _click() {
|
||||
if (onChange) {
|
||||
var _active = name !== null && name !== void 0 ? name : index;
|
||||
|
||||
if (_active !== active) {
|
||||
onChange(_active);
|
||||
}
|
||||
}
|
||||
|
||||
onClick === null || onClick === void 0 ? void 0 : onClick(name !== null && name !== void 0 ? name : index);
|
||||
};
|
||||
|
||||
return onChange ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__.View, _objectSpread(_objectSpread({
|
||||
className: _wxs_utils__WEBPACK_IMPORTED_MODULE_1__.bem('tabbar-item', {
|
||||
active: active === (name !== null && name !== void 0 ? name : index)
|
||||
}) + ' custom-class' + " ".concat(className || ''),
|
||||
style: _wxs_utils__WEBPACK_IMPORTED_MODULE_1__.style([{
|
||||
color: active === (name !== null && name !== void 0 ? name : index) ? activeColor : inactiveColor
|
||||
}, style])
|
||||
}, others), {}, {
|
||||
onClick: _click,
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__.View, {
|
||||
className: "van-tabbar-item__icon",
|
||||
children: [icon ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icon__WEBPACK_IMPORTED_MODULE_2__.Icon, {
|
||||
size: 38,
|
||||
name: icon,
|
||||
classPrefix: iconPrefix,
|
||||
className: "van-tabbar-item__icon__inner"
|
||||
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {
|
||||
children: active === (name !== null && name !== void 0 ? name : index) ? renderIconActive : renderIcon
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_info__WEBPACK_IMPORTED_MODULE_3__.Info, {
|
||||
dot: dot,
|
||||
info: info,
|
||||
className: "van-tabbar-item__info"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__.View, {
|
||||
className: "van-tabbar-item__text",
|
||||
children: children
|
||||
})]
|
||||
})) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, {});
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (TabbarItem);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/tabbar/index.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/tabbar/index.js ***!
|
||||
\********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export Tabbar */
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var rc_util_lib_Children_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/lib/Children/toArray */ "./node_modules/rc-util/lib/Children/toArray.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var _wxs_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../wxs/utils */ "./node_modules/@antmjs/vantui/es/wxs/utils.js");
|
||||
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/utils */ "./node_modules/@antmjs/vantui/es/common/utils.js");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);
|
||||
|
||||
|
||||
|
||||
var _excluded = ["active", "activeColor", "inactiveColor", "border", "fixed", "safeAreaInsetBottom", "zIndex", "placeholder", "onChange", "style", "className", "children"];
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function parseTabList(children) {
|
||||
return (0,rc_util_lib_Children_toArray__WEBPACK_IMPORTED_MODULE_3__["default"])(children).map(function (node) {
|
||||
if ( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.isValidElement)(node)) {
|
||||
var key = node.key !== undefined ? String(node.key) : undefined;
|
||||
return _objectSpread(_objectSpread({
|
||||
key: key
|
||||
}, node.props), {}, {
|
||||
node: node
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(function (tab) {
|
||||
return tab;
|
||||
});
|
||||
}
|
||||
|
||||
function Tabbar(props) {
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)({
|
||||
height: 50,
|
||||
current: 0
|
||||
}),
|
||||
_useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__["default"])(_useState, 2),
|
||||
state = _useState2[0],
|
||||
setState = _useState2[1];
|
||||
|
||||
var height = state.height,
|
||||
current = state.current;
|
||||
|
||||
var active = props.active,
|
||||
activeColor = props.activeColor,
|
||||
inactiveColor = props.inactiveColor,
|
||||
_props$border = props.border,
|
||||
border = _props$border === void 0 ? true : _props$border,
|
||||
_props$fixed = props.fixed,
|
||||
fixed = _props$fixed === void 0 ? true : _props$fixed,
|
||||
_props$safeAreaInsetB = props.safeAreaInsetBottom,
|
||||
safeAreaInsetBottom = _props$safeAreaInsetB === void 0 ? true : _props$safeAreaInsetB,
|
||||
zIndex = props.zIndex,
|
||||
placeholder = props.placeholder,
|
||||
onChange = props.onChange,
|
||||
style = props.style,
|
||||
className = props.className,
|
||||
children = props.children,
|
||||
others = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_8__["default"])(props, _excluded);
|
||||
|
||||
var _change = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (data) {
|
||||
setState(function (pre) {
|
||||
return _objectSpread(_objectSpread({}, pre), {}, {
|
||||
current: data
|
||||
});
|
||||
});
|
||||
onChange === null || onChange === void 0 ? void 0 : onChange({
|
||||
detail: data
|
||||
});
|
||||
}, [onChange]);
|
||||
|
||||
var newChildren = (0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
|
||||
var tabs = parseTabList(children);
|
||||
return tabs.map(function (tab, index) {
|
||||
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tab.node, {
|
||||
key: index,
|
||||
index: index,
|
||||
active: current,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
onChange: _change
|
||||
});
|
||||
});
|
||||
}, [children, current, activeColor, inactiveColor, _change]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
||||
setState(function (pre) {
|
||||
return _objectSpread(_objectSpread({}, pre), {}, {
|
||||
current: active
|
||||
});
|
||||
});
|
||||
}, [active]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
||||
if (!fixed || !placeholder) {
|
||||
return;
|
||||
}
|
||||
|
||||
(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_1__.nextTick)(function () {
|
||||
(0,_common_utils__WEBPACK_IMPORTED_MODULE_5__.getRect)(null, '.van-tabbar').then(function (res) {
|
||||
setState(function (pre) {
|
||||
return _objectSpread(_objectSpread({}, pre), {}, {
|
||||
height: res.height
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}, [fixed, placeholder]); // useEffect(
|
||||
// function () {
|
||||
// if (!Array.isArray(children) || !children.length) {
|
||||
// return
|
||||
// }
|
||||
// children.forEach((child) => child.updateFromParent())
|
||||
// },
|
||||
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// [active, activeColor, inactiveColor],
|
||||
// )
|
||||
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, _objectSpread(_objectSpread({
|
||||
className: (border ? 'van-hairline--top-bottom' : '') + ' ' + _wxs_utils__WEBPACK_IMPORTED_MODULE_4__.bem('tabbar', {
|
||||
fixed: fixed,
|
||||
safe: safeAreaInsetBottom
|
||||
}) + ' custom-class' + " ".concat(className || ''),
|
||||
style: _wxs_utils__WEBPACK_IMPORTED_MODULE_4__.style([zIndex ? 'zIndex: ' + zIndex : '', style])
|
||||
}, others), {}, {
|
||||
children: newChildren
|
||||
})), fixed && placeholder && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
style: 'height: ' + height + 'px;'
|
||||
})]
|
||||
});
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Tabbar);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/wxs/add-unit.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/wxs/add-unit.js ***!
|
||||
@@ -894,6 +1150,273 @@ module.exports.polyfill = function(object) {
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/rc-util/lib/Children/toArray.js":
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/rc-util/lib/Children/toArray.js ***!
|
||||
\******************************************************/
|
||||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
var __webpack_unused_export__;
|
||||
|
||||
|
||||
var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"]);
|
||||
|
||||
__webpack_unused_export__ = ({
|
||||
value: true
|
||||
});
|
||||
exports["default"] = toArray;
|
||||
|
||||
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "webpack/container/remote/react"));
|
||||
|
||||
var _reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
|
||||
|
||||
function toArray(children) {
|
||||
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var ret = [];
|
||||
|
||||
_react.default.Children.forEach(children, function (child) {
|
||||
if ((child === undefined || child === null) && !option.keepEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Array.isArray(child)) {
|
||||
ret = ret.concat(toArray(child));
|
||||
} else if ((0, _reactIs.isFragment)(child) && child.props) {
|
||||
ret = ret.concat(toArray(child.props.children, option));
|
||||
} else {
|
||||
ret.push(child);
|
||||
}
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/react-is/cjs/react-is.development.js":
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
||||
\***********************************************************/
|
||||
/***/ (function(__unused_webpack_module, exports) {
|
||||
|
||||
"use strict";
|
||||
/** @license React v16.13.1
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (true) {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||||
// nor polyfill, then a plain number is used for performance.
|
||||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
||||
// (unstable) APIs that have been removed. Can we remove the symbols?
|
||||
|
||||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||||
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
||||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||||
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
||||
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
||||
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
||||
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
||||
|
||||
function isValidElementType(type) {
|
||||
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
||||
}
|
||||
|
||||
function typeOf(object) {
|
||||
if (typeof object === 'object' && object !== null) {
|
||||
var $$typeof = object.$$typeof;
|
||||
|
||||
switch ($$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
var type = object.type;
|
||||
|
||||
switch (type) {
|
||||
case REACT_ASYNC_MODE_TYPE:
|
||||
case REACT_CONCURRENT_MODE_TYPE:
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
case REACT_PROFILER_TYPE:
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return type;
|
||||
|
||||
default:
|
||||
var $$typeofType = type && type.$$typeof;
|
||||
|
||||
switch ($$typeofType) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case REACT_PORTAL_TYPE:
|
||||
return $$typeof;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
} // AsyncMode is deprecated along with isAsyncMode
|
||||
|
||||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var Element = REACT_ELEMENT_TYPE;
|
||||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
var Fragment = REACT_FRAGMENT_TYPE;
|
||||
var Lazy = REACT_LAZY_TYPE;
|
||||
var Memo = REACT_MEMO_TYPE;
|
||||
var Portal = REACT_PORTAL_TYPE;
|
||||
var Profiler = REACT_PROFILER_TYPE;
|
||||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
var Suspense = REACT_SUSPENSE_TYPE;
|
||||
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
||||
|
||||
function isAsyncMode(object) {
|
||||
{
|
||||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||||
|
||||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||||
}
|
||||
}
|
||||
|
||||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||||
}
|
||||
function isConcurrentMode(object) {
|
||||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||||
}
|
||||
function isContextConsumer(object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
}
|
||||
function isContextProvider(object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
}
|
||||
function isElement(object) {
|
||||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
function isForwardRef(object) {
|
||||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||||
}
|
||||
function isFragment(object) {
|
||||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||||
}
|
||||
function isLazy(object) {
|
||||
return typeOf(object) === REACT_LAZY_TYPE;
|
||||
}
|
||||
function isMemo(object) {
|
||||
return typeOf(object) === REACT_MEMO_TYPE;
|
||||
}
|
||||
function isPortal(object) {
|
||||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||||
}
|
||||
function isProfiler(object) {
|
||||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||||
}
|
||||
function isStrictMode(object) {
|
||||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||||
}
|
||||
function isSuspense(object) {
|
||||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||||
}
|
||||
|
||||
exports.AsyncMode = AsyncMode;
|
||||
exports.ConcurrentMode = ConcurrentMode;
|
||||
exports.ContextConsumer = ContextConsumer;
|
||||
exports.ContextProvider = ContextProvider;
|
||||
exports.Element = Element;
|
||||
exports.ForwardRef = ForwardRef;
|
||||
exports.Fragment = Fragment;
|
||||
exports.Lazy = Lazy;
|
||||
exports.Memo = Memo;
|
||||
exports.Portal = Portal;
|
||||
exports.Profiler = Profiler;
|
||||
exports.StrictMode = StrictMode;
|
||||
exports.Suspense = Suspense;
|
||||
exports.isAsyncMode = isAsyncMode;
|
||||
exports.isConcurrentMode = isConcurrentMode;
|
||||
exports.isContextConsumer = isContextConsumer;
|
||||
exports.isContextProvider = isContextProvider;
|
||||
exports.isElement = isElement;
|
||||
exports.isForwardRef = isForwardRef;
|
||||
exports.isFragment = isFragment;
|
||||
exports.isLazy = isLazy;
|
||||
exports.isMemo = isMemo;
|
||||
exports.isPortal = isPortal;
|
||||
exports.isProfiler = isProfiler;
|
||||
exports.isStrictMode = isStrictMode;
|
||||
exports.isSuspense = isSuspense;
|
||||
exports.isValidElementType = isValidElementType;
|
||||
exports.typeOf = typeOf;
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/react-is/index.js":
|
||||
/*!****************************************!*\
|
||||
!*** ./node_modules/react-is/index.js ***!
|
||||
\****************************************/
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
if (false) {} else {
|
||||
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
||||
\**********************************************************************/
|
||||
/***/ (function(module) {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
||||
|
||||
Reference in New Issue
Block a user