Latest updates from IceHrmPro

This commit is contained in:
Thilina Pituwala
2020-05-20 18:47:29 +02:00
parent 60c92d7935
commit 7453a58aad
18012 changed files with 2089245 additions and 10173 deletions

49
web/node_modules/rc-util/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,49 @@
# History
---
## 4.16.1 / 2019-12-09
- PortaWrapper add `switchScrollingEffect` prop.
- Add `setStyle`.
- Improve `switchScrollingEffect` when closed
## 4.15.0 / 2019-11-09
- Add `unsafeLifecyclesPolyfill`. ant-design/ant-design#9792
## 4.14.0 / 2019-10-29
- add `supportRef` check
## 4.13.0 / 2019-10-10
- add `domHooks` for test
## 4.12.0 / 2019-10-08
- add `ref` util
## 4.11.0 / 2019-08-23
- warning support `noteOnce`
## 4.8.0 / 2019-07-09
- add findDOMNode to check if a DOM first and then use native findDOMNode
## 4.7.0 / 2019-07-08
- add PortalWrapper to support body scroll control
## 4.6.0 / 2016-10-15
- addDOMEventListener support option
## 3.4.0 / 2016-08-16
- add getScrollBarSize
## 3.3.0 / 2016-07-18
- add getContainerRenderMixin

22
web/node_modules/rc-util/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014-present yiminghe
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

290
web/node_modules/rc-util/README.md generated vendored Normal file
View File

@@ -0,0 +1,290 @@
# rc-util
Common Utils For React Component.
[![NPM version][npm-image]][npm-url]
[![David dm][david-dm-image]][david-dm-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/rc-util.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-util
[travis-image]: https://img.shields.io/travis/react-component/util.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/util
[coveralls-image]: https://img.shields.io/coveralls/react-component/util.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/util?branch=master
[david-dm-image]: https://img.shields.io/david/react-component/util.svg
[david-dm-url]: https://david-dm.org/react-component/util
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/rc-util.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-util
## Install
[![rc-util](https://nodei.co/npm/rc-util.png)](https://npmjs.org/package/rc-util)
## API
### createChainedFunction
> (...functions): Function
Create a function which will call all the functions with it's arguments from left to right.
```jsx
import createChainedFunction from 'rc-util/lib/createChainedFunction';
```
### deprecated
> (prop: string, instead: string, component: string): void
Log an error message to warn developers that `prop` is deprecated.
```jsx
import deprecated from 'rc-util/lib/deprecated';
```
### getContainerRenderMixin
> (config: Object): Object
To generate a mixin which will render specific component into specific container automatically.
```jsx
import getContainerRenderMixin from 'rc-util/lib/getContainerRenderMixin';
```
Fields in `config` and their meanings.
| Field | Type | Description | Default |
|-------|------|-------------|---------|
| autoMount | boolean | Whether to render component into container automatically | true |
| autoDestroy | boolean | Whether to remove container automatically while the component is unmounted | true |
| isVisible | (instance): boolean | A function to get current visibility of the component | - |
| isForceRender | (instance): boolean | A function to determine whether to render popup even it's not visible | - |
| getComponent | (instance, extra): ReactNode | A function to get the component which will be rendered into container | - |
| getContainer | (instance): HTMLElement | A function to get the container | |
### Portal
Render children to the specific container;
```jsx
import Portal from 'rc-util/lib/Portal';
```
Props:
| Prop | Type | Description | Default |
|-------|------|-------------|---------|
| children | ReactChildren | Content render to the container | - |
| getContainer | (): HTMLElement | A function to get the container | - |
### getScrollBarSize
> (fresh?: boolean): number
Get the width of scrollbar.
```jsx
import getScrollBarSize from 'rc-util/lib/getScrollBarSize';
```
### guid
> (): string
To generate a global unique id across current application.
```jsx
import guid from 'rc-util/lib/guid';
```
### pickAttrs
> (props: Object): Object
Pick valid HTML attributes and events from props.
```jsx
import pickAttrs from 'rc-util/lib/pickAttrs';
```
### warn
> (msg: string): void
A shallow wrapper of `console.warn`.
```jsx
import warn from 'rc-util/lib/warn';
```
### warning
> (valid: boolean, msg: string): void
A shallow wrapper of [warning](https://github.com/BerkeleyTrue/warning), but only warning once for the same message.
```jsx
import warning, { noteOnce } from 'rc-util/lib/warning';
warning(false, '[antd Component] test hello world');
// Low level note
noteOnce(false, '[antd Component] test hello world');
```
### Children
A collection of functions to operate React elements' children.
#### Children/mapSelf
> (children): children
Return a shallow copy of children.
```jsx
import mapSelf from 'rc-util/lib/Children/mapSelf';
```
#### Children/toArray
> (children: ReactNode[]): ReactNode[]
Convert children into an array.
```jsx
import toArray from 'rc-util/lib/Children/toArray';
```
### Dom
A collection of functions to operate DOM elements.
#### Dom/addEventlistener
> (target: ReactNode, eventType: string, listener: Function): { remove: Function }
A shallow wrapper of [add-dom-event-listener](https://github.com/yiminghe/add-dom-event-listener).
```jsx
import addEventlistener from 'rc-util/lib/Dom/addEventlistener';
```
#### Dom/canUseDom
> (): boolean
Check if DOM is available.
```jsx
import canUseDom from 'rc-util/lib/Dom/canUseDom';
```
#### Dom/class
A collection of functions to operate DOM nodes' class name.
* `hasClass(node: HTMLElement, className: string): boolean`
* `addClass(node: HTMLElement, className: string): void`
* `removeClass(node: HTMLElement, className: string): void`
```jsx
import cssClass from 'rc-util/lib/Dom/class;
```
#### Dom/contains
> (root: HTMLElement, node: HTMLElement): boolean
Check if node is equal to root or in the subtree of root.
```jsx
import contains from 'rc-util/lib/Dom/contains';
```
#### Dom/css
A collection of functions to get or set css styles.
* `get(node: HTMLElement, name?: string): any`
* `set(node: HTMLElement, name?: string, value: any) | set(node, object)`
* `getOuterWidth(el: HTMLElement): number`
* `getOuterHeight(el: HTMLElement): number`
* `getDocSize(): { width: number, height: number }`
* `getClientSize(): { width: number, height: number }`
* `getScroll(): { scrollLeft: number, scrollTop: number }`
* `getOffset(node: HTMLElement): { left: number, top: number }`
```jsx
import css from 'rc-util/lib/Dom/css';
```
#### Dom/focus
A collection of functions to operate focus status of DOM node.
* `saveLastFocusNode(): void`
* `clearLastFocusNode(): void`
* `backLastFocusNode(): void`
* `getFocusNodeList(node: HTMLElement): HTMLElement[]` get a list of focusable nodes from the subtree of node.
* `limitTabRange(node: HTMLElement, e: Event): void`
```jsx
import focus from 'rc-util/lib/Dom/focus';
```
#### Dom/support
> { animation: boolean | Object, transition: boolean | Object }
A flag to tell whether current environment supports `animationend` or `transitionend`.
```jsx
import support from 'rc-util/lib/Dom/support';
```
### KeyCode
> Enum
Enum of KeyCode, please check the [definition](https://github.com/react-component/util/blob/master/src/KeyCode.js) of it.
```jsx
import KeyCode from 'rc-util/lib/KeyCode';
```
#### KeyCode.isTextModifyingKeyEvent
> (e: Event): boolean
Whether text and modified key is entered at the same time.
#### KeyCode.isCharacterKey
> (keyCode: KeyCode): boolean
Whether character is entered.
### switchScrollingEffect
> (close: boolean) => void
improve shake when page scroll bar hidden.
`switchScrollingEffect` change body style, and add a class `ant-scrolling-effect` when called, so if you page look abnormal, please check this;
```js
import switchScrollingEffect from "./src/switchScrollingEffect";
switchScrollingEffect();
```
## License
[MIT](/LICENSE)

10
web/node_modules/rc-util/es/Children/mapSelf.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react';
function mirror(o) {
return o;
}
export default function mapSelf(children) {
// return ReactFragment
return React.Children.map(children, mirror);
}

2
web/node_modules/rc-util/es/Children/toArray.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import React from 'react';
export default function toArray(children: React.ReactNode): React.ReactElement[];

19
web/node_modules/rc-util/es/Children/toArray.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import React from 'react';
import { isFragment } from 'react-is';
export default function toArray(children) {
var ret = [];
React.Children.forEach(children, function (child) {
if (child === undefined || child === null) {
return;
}
if (Array.isArray(child)) {
ret = ret.concat(toArray(child));
} else if (isFragment(child) && child.props) {
ret = ret.concat(toArray(child.props.children));
} else {
ret.push(child);
}
});
return ret;
}

126
web/node_modules/rc-util/es/ContainerRender.js generated vendored Normal file
View File

@@ -0,0 +1,126 @@
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
var ContainerRender = /*#__PURE__*/function (_React$Component) {
_inherits(ContainerRender, _React$Component);
var _super = _createSuper(ContainerRender);
function ContainerRender() {
var _this;
_classCallCheck(this, ContainerRender);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.removeContainer = function () {
if (_this.container) {
ReactDOM.unmountComponentAtNode(_this.container);
_this.container.parentNode.removeChild(_this.container);
_this.container = null;
}
};
_this.renderComponent = function (props, ready) {
var _this$props = _this.props,
visible = _this$props.visible,
getComponent = _this$props.getComponent,
forceRender = _this$props.forceRender,
getContainer = _this$props.getContainer,
parent = _this$props.parent;
if (visible || parent._component || forceRender) {
if (!_this.container) {
_this.container = getContainer();
}
ReactDOM.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {
if (ready) {
ready.call(this);
}
});
}
};
return _this;
}
_createClass(ContainerRender, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.props.autoDestroy) {
this.removeContainer();
}
}
}, {
key: "render",
value: function render() {
return this.props.children({
renderComponent: this.renderComponent,
removeContainer: this.removeContainer
});
}
}]);
return ContainerRender;
}(React.Component);
ContainerRender.propTypes = {
autoMount: PropTypes.bool,
autoDestroy: PropTypes.bool,
visible: PropTypes.bool,
forceRender: PropTypes.bool,
parent: PropTypes.any,
getComponent: PropTypes.func.isRequired,
getContainer: PropTypes.func.isRequired,
children: PropTypes.func.isRequired
};
ContainerRender.defaultProps = {
autoMount: true,
autoDestroy: true,
forceRender: false
};
export { ContainerRender as default };

9
web/node_modules/rc-util/es/Dom/addEventListener.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import addDOMEventListener from 'add-dom-event-listener';
import ReactDOM from 'react-dom';
export default function addEventListenerWrap(target, eventType, cb, option) {
/* eslint camelcase: 2 */
var callback = ReactDOM.unstable_batchedUpdates ? function run(e) {
ReactDOM.unstable_batchedUpdates(cb, e);
} : cb;
return addDOMEventListener(target, eventType, callback, option);
}

3
web/node_modules/rc-util/es/Dom/canUseDom.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export default function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}

27
web/node_modules/rc-util/es/Dom/class.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
export function hasClass(node, className) {
if (node.classList) {
return node.classList.contains(className);
}
var originClass = node.className;
return " ".concat(originClass, " ").indexOf(" ".concat(className, " ")) > -1;
}
export function addClass(node, className) {
if (node.classList) {
node.classList.add(className);
} else {
if (!hasClass(node, className)) {
node.className = "".concat(node.className, " ").concat(className);
}
}
}
export function removeClass(node, className) {
if (node.classList) {
node.classList.remove(className);
} else {
if (hasClass(node, className)) {
var originClass = node.className;
node.className = " ".concat(originClass, " ").replace(" ".concat(className, " "), ' ');
}
}
}

13
web/node_modules/rc-util/es/Dom/contains.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
export default function contains(root, n) {
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}

109
web/node_modules/rc-util/es/Dom/css.js generated vendored Normal file
View File

@@ -0,0 +1,109 @@
/* eslint-disable no-nested-ternary */
var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;
var removePixel = {
left: true,
top: true
};
var floatMap = {
cssFloat: 1,
styleFloat: 1,
float: 1
};
function getComputedStyle(node) {
return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
}
function getStyleValue(node, type, value) {
type = type.toLowerCase();
if (value === 'auto') {
if (type === 'height') {
return node.offsetHeight;
}
if (type === 'width') {
return node.offsetWidth;
}
}
if (!(type in removePixel)) {
removePixel[type] = PIXEL_PATTERN.test(type);
}
return removePixel[type] ? parseFloat(value) || 0 : value;
}
export function get(node, name) {
var length = arguments.length;
var style = getComputedStyle(node);
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);
}
export function set(node, name, value) {
var length = arguments.length;
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
if (length === 3) {
if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {
value = "".concat(value, "px");
}
node.style[name] = value; // Number
return value;
}
for (var x in name) {
if (name.hasOwnProperty(x)) {
set(node, x, name[x]);
}
}
return getComputedStyle(node);
}
export function getOuterWidth(el) {
if (el === document.body) {
return document.documentElement.clientWidth;
}
return el.offsetWidth;
}
export function getOuterHeight(el) {
if (el === document.body) {
return window.innerHeight || document.documentElement.clientHeight;
}
return el.offsetHeight;
}
export function getDocSize() {
var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
return {
width: width,
height: height
};
}
export function getClientSize() {
var width = document.documentElement.clientWidth;
var height = window.innerHeight || document.documentElement.clientHeight;
return {
width: width,
height: height
};
}
export function getScroll() {
return {
scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)
};
}
export function getOffset(node) {
var box = node.getBoundingClientRect();
var docElem = document.documentElement; // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft
return {
left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
};
}

5
web/node_modules/rc-util/es/Dom/findDOMNode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="react" />
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
export default function findDOMNode<T = Element | Text>(node: React.ReactInstance | HTMLElement): T;

12
web/node_modules/rc-util/es/Dom/findDOMNode.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import ReactDOM from 'react-dom';
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
export default function findDOMNode(node) {
if (node instanceof HTMLElement) {
return node;
}
return ReactDOM.findDOMNode(node);
}

79
web/node_modules/rc-util/es/Dom/focus.js generated vendored Normal file
View File

@@ -0,0 +1,79 @@
function hidden(node) {
return node.style.display === 'none';
}
function visible(node) {
while (node) {
if (node === document.body) {
break;
}
if (hidden(node)) {
return false;
}
node = node.parentNode;
}
return true;
}
function focusable(node) {
var nodeName = node.nodeName.toLowerCase();
var tabIndex = parseInt(node.getAttribute('tabindex'), 10);
var hasTabIndex = !isNaN(tabIndex) && tabIndex > -1;
if (visible(node)) {
if (['input', 'select', 'textarea', 'button'].indexOf(nodeName) > -1) {
return !node.disabled;
} else if (nodeName === 'a') {
return node.getAttribute('href') || hasTabIndex;
}
return node.isContentEditable || hasTabIndex;
}
}
export function getFocusNodeList(node) {
var res = [].slice.call(node.querySelectorAll('*'), 0).filter(function (child) {
return focusable(child);
});
if (focusable(node)) {
res.unshift(node);
}
return res;
}
var lastFocusElement = null;
export function saveLastFocusNode() {
lastFocusElement = document.activeElement;
}
export function clearLastFocusNode() {
lastFocusElement = null;
}
export function backLastFocusNode() {
if (lastFocusElement) {
try {
// 元素可能已经被移动了
lastFocusElement.focus();
/* eslint-disable no-empty */
} catch (e) {} // empty
/* eslint-enable no-empty */
}
}
export function limitTabRange(node, e) {
if (e.keyCode === 9) {
var tabNodeList = getFocusNodeList(node);
var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];
var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;
if (leavingTab) {
var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];
target.focus();
e.preventDefault();
}
}
}

28
web/node_modules/rc-util/es/Dom/support.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
import canUseDOM from './canUseDom';
var animationEndEventNames = {
WebkitAnimation: 'webkitAnimationEnd',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
};
var transitionEventNames = {
WebkitTransition: 'webkitTransitionEnd',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
};
function supportEnd(names) {
var el = document.createElement('div');
for (var name in names) {
if (names.hasOwnProperty(name) && el.style[name] !== undefined) {
return {
end: names[name]
};
}
}
return false;
}
export var animation = canUseDOM() && supportEnd(animationEndEventNames);
export var transition = canUseDOM() && supportEnd(transitionEventNames);

436
web/node_modules/rc-util/es/KeyCode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,436 @@
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
declare const KeyCode: {
/**
* MAC_ENTER
*/
MAC_ENTER: number;
/**
* BACKSPACE
*/
BACKSPACE: number;
/**
* TAB
*/
TAB: number;
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: number;
/**
* ENTER
*/
ENTER: number;
/**
* SHIFT
*/
SHIFT: number;
/**
* CTRL
*/
CTRL: number;
/**
* ALT
*/
ALT: number;
/**
* PAUSE
*/
PAUSE: number;
/**
* CAPS_LOCK
*/
CAPS_LOCK: number;
/**
* ESC
*/
ESC: number;
/**
* SPACE
*/
SPACE: number;
/**
* PAGE_UP
*/
PAGE_UP: number;
/**
* PAGE_DOWN
*/
PAGE_DOWN: number;
/**
* END
*/
END: number;
/**
* HOME
*/
HOME: number;
/**
* LEFT
*/
LEFT: number;
/**
* UP
*/
UP: number;
/**
* RIGHT
*/
RIGHT: number;
/**
* DOWN
*/
DOWN: number;
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: number;
/**
* INSERT
*/
INSERT: number;
/**
* DELETE
*/
DELETE: number;
/**
* ZERO
*/
ZERO: number;
/**
* ONE
*/
ONE: number;
/**
* TWO
*/
TWO: number;
/**
* THREE
*/
THREE: number;
/**
* FOUR
*/
FOUR: number;
/**
* FIVE
*/
FIVE: number;
/**
* SIX
*/
SIX: number;
/**
* SEVEN
*/
SEVEN: number;
/**
* EIGHT
*/
EIGHT: number;
/**
* NINE
*/
NINE: number;
/**
* QUESTION_MARK
*/
QUESTION_MARK: number;
/**
* A
*/
A: number;
/**
* B
*/
B: number;
/**
* C
*/
C: number;
/**
* D
*/
D: number;
/**
* E
*/
E: number;
/**
* F
*/
F: number;
/**
* G
*/
G: number;
/**
* H
*/
H: number;
/**
* I
*/
I: number;
/**
* J
*/
J: number;
/**
* K
*/
K: number;
/**
* L
*/
L: number;
/**
* M
*/
M: number;
/**
* N
*/
N: number;
/**
* O
*/
O: number;
/**
* P
*/
P: number;
/**
* Q
*/
Q: number;
/**
* R
*/
R: number;
/**
* S
*/
S: number;
/**
* T
*/
T: number;
/**
* U
*/
U: number;
/**
* V
*/
V: number;
/**
* W
*/
W: number;
/**
* X
*/
X: number;
/**
* Y
*/
Y: number;
/**
* Z
*/
Z: number;
/**
* META
*/
META: number;
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: number;
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: number;
/**
* NUM_ZERO
*/
NUM_ZERO: number;
/**
* NUM_ONE
*/
NUM_ONE: number;
/**
* NUM_TWO
*/
NUM_TWO: number;
/**
* NUM_THREE
*/
NUM_THREE: number;
/**
* NUM_FOUR
*/
NUM_FOUR: number;
/**
* NUM_FIVE
*/
NUM_FIVE: number;
/**
* NUM_SIX
*/
NUM_SIX: number;
/**
* NUM_SEVEN
*/
NUM_SEVEN: number;
/**
* NUM_EIGHT
*/
NUM_EIGHT: number;
/**
* NUM_NINE
*/
NUM_NINE: number;
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: number;
/**
* NUM_PLUS
*/
NUM_PLUS: number;
/**
* NUM_MINUS
*/
NUM_MINUS: number;
/**
* NUM_PERIOD
*/
NUM_PERIOD: number;
/**
* NUM_DIVISION
*/
NUM_DIVISION: number;
/**
* F1
*/
F1: number;
/**
* F2
*/
F2: number;
/**
* F3
*/
F3: number;
/**
* F4
*/
F4: number;
/**
* F5
*/
F5: number;
/**
* F6
*/
F6: number;
/**
* F7
*/
F7: number;
/**
* F8
*/
F8: number;
/**
* F9
*/
F9: number;
/**
* F10
*/
F10: number;
/**
* F11
*/
F11: number;
/**
* F12
*/
F12: number;
/**
* NUMLOCK
*/
NUMLOCK: number;
/**
* SEMICOLON
*/
SEMICOLON: number;
/**
* DASH
*/
DASH: number;
/**
* EQUALS
*/
EQUALS: number;
/**
* COMMA
*/
COMMA: number;
/**
* PERIOD
*/
PERIOD: number;
/**
* SLASH
*/
SLASH: number;
/**
* APOSTROPHE
*/
APOSTROPHE: number;
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: number;
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: number;
/**
* BACKSLASH
*/
BACKSLASH: number;
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: number;
/**
* WIN_KEY
*/
WIN_KEY: number;
/**
* MAC_FF_META
*/
MAC_FF_META: number;
/**
* WIN_IME
*/
WIN_IME: number;
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: (e: KeyboardEvent) => boolean;
/**
* whether character is entered.
*/
isCharacterKey: (keyCode: number) => boolean;
};
export default KeyCode;

623
web/node_modules/rc-util/es/KeyCode.js generated vendored Normal file
View File

@@ -0,0 +1,623 @@
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var 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) {
var keyCode = e.keyCode;
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;
}
}
};
export default KeyCode;

89
web/node_modules/rc-util/es/Portal.js generated vendored Normal file
View File

@@ -0,0 +1,89 @@
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
var Portal = /*#__PURE__*/function (_React$Component) {
_inherits(Portal, _React$Component);
var _super = _createSuper(Portal);
function Portal() {
_classCallCheck(this, Portal);
return _super.apply(this, arguments);
}
_createClass(Portal, [{
key: "componentDidMount",
value: function componentDidMount() {
this.createContainer();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var didUpdate = this.props.didUpdate;
if (didUpdate) {
didUpdate(prevProps);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.removeContainer();
}
}, {
key: "createContainer",
value: function createContainer() {
this._container = this.props.getContainer();
this.forceUpdate();
}
}, {
key: "removeContainer",
value: function removeContainer() {
if (this._container) {
this._container.parentNode.removeChild(this._container);
}
}
}, {
key: "render",
value: function render() {
if (this._container) {
return ReactDOM.createPortal(this.props.children, this._container);
}
return null;
}
}]);
return Portal;
}(React.Component);
Portal.propTypes = {
getContainer: PropTypes.func.isRequired,
children: PropTypes.node.isRequired,
didUpdate: PropTypes.func
};
export { Portal as default };

253
web/node_modules/rc-util/es/PortalWrapper.js generated vendored Normal file
View File

@@ -0,0 +1,253 @@
function 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; }
function _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; }
function _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; }
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable no-underscore-dangle,react/require-default-props */
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import { polyfill } from 'react-lifecycles-compat';
import ContainerRender from './ContainerRender';
import Portal from './Portal';
import switchScrollingEffect from './switchScrollingEffect';
import setStyle from './setStyle';
var openCount = 0;
var windowIsUndefined = !(typeof window !== 'undefined' && window.document && window.document.createElement);
var IS_REACT_16 = ('createPortal' in ReactDOM); // https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
var cacheOverflow = {};
var PortalWrapper = /*#__PURE__*/function (_React$Component) {
_inherits(PortalWrapper, _React$Component);
var _super = _createSuper(PortalWrapper);
function PortalWrapper(props) {
var _this;
_classCallCheck(this, PortalWrapper);
_this = _super.call(this, props);
_this.getParent = function () {
var getContainer = _this.props.getContainer;
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;
};
_this.getContainer = function () {
if (windowIsUndefined) {
return null;
}
if (!_this.container) {
_this.container = document.createElement('div');
var parent = _this.getParent();
if (parent) {
parent.appendChild(_this.container);
}
}
_this.setWrapperClassName();
return _this.container;
};
_this.setWrapperClassName = function () {
var wrapperClassName = _this.props.wrapperClassName;
if (_this.container && wrapperClassName && wrapperClassName !== _this.container.className) {
_this.container.className = wrapperClassName;
}
};
_this.savePortal = function (c) {
// Warning: don't rename _component
// https://github.com/react-component/util/pull/65#discussion_r352407916
_this._component = c;
};
_this.removeCurrentContainer = function (visible) {
_this.container = null;
_this._component = null;
if (!IS_REACT_16) {
if (visible) {
_this.renderComponent({
afterClose: _this.removeContainer,
onClose: function onClose() {},
visible: false
});
} else {
_this.removeContainer();
}
}
};
_this.switchScrollingEffect = function () {
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
switchScrollingEffect(); // Must be set after switchScrollingEffect
cacheOverflow = setStyle({
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden'
});
} else if (!openCount) {
setStyle(cacheOverflow);
cacheOverflow = {};
switchScrollingEffect(true);
}
};
var _visible = props.visible;
openCount = _visible ? openCount + 1 : openCount;
_this.state = {
_self: _assertThisInitialized(_this)
};
return _this;
}
_createClass(PortalWrapper, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.setWrapperClassName();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var visible = this.props.visible; // 离开时不会 render 导到离开时数值不变,改用 func 。。
openCount = visible && openCount ? openCount - 1 : openCount;
this.removeCurrentContainer(visible);
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
children = _this$props.children,
forceRender = _this$props.forceRender,
visible = _this$props.visible;
var portal = null;
var childProps = {
getOpenCount: function getOpenCount() {
return openCount;
},
getContainer: this.getContainer,
switchScrollingEffect: this.switchScrollingEffect
}; // suppport react15
if (!IS_REACT_16) {
return /*#__PURE__*/React.createElement(ContainerRender, {
parent: this,
visible: visible,
autoDestroy: false,
getComponent: function getComponent() {
var extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return children(_objectSpread({}, extra, {}, childProps, {
ref: _this2.savePortal
}));
},
getContainer: this.getContainer,
forceRender: forceRender
}, function (_ref) {
var renderComponent = _ref.renderComponent,
removeContainer = _ref.removeContainer;
_this2.renderComponent = renderComponent;
_this2.removeContainer = removeContainer;
return null;
});
}
if (forceRender || visible || this._component) {
portal = /*#__PURE__*/React.createElement(Portal, {
getContainer: this.getContainer,
ref: this.savePortal
}, children(childProps));
}
return portal;
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, _ref2) {
var prevProps = _ref2.prevProps,
_self = _ref2._self;
var visible = props.visible,
getContainer = props.getContainer;
if (prevProps) {
var prevVisible = prevProps.visible,
prevGetContainer = prevProps.getContainer;
if (visible !== prevVisible) {
openCount = visible && !prevVisible ? openCount + 1 : openCount - 1;
}
var getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) {
_self.removeCurrentContainer(false);
}
}
return {
prevProps: props
};
}
}]);
return PortalWrapper;
}(React.Component);
PortalWrapper.propTypes = {
wrapperClassName: PropTypes.string,
forceRender: PropTypes.bool,
getContainer: PropTypes.any,
children: PropTypes.func,
visible: PropTypes.bool
};
export default polyfill(PortalWrapper);

49
web/node_modules/rc-util/es/PureRenderMixin.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactComponentWithPureRenderMixin
*/
var shallowEqual = require('shallowequal');
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
/**
* If your React component's render function is "pure", e.g. it will render the
* same result given the same props and state, provide this mixin for a
* considerable performance boost.
*
* Most React components have pure render functions.
*
* Example:
*
* var ReactComponentWithPureRenderMixin =
* require('ReactComponentWithPureRenderMixin');
* React.createClass({
* mixins: [ReactComponentWithPureRenderMixin],
*
* render: function() {
* return <div className={this.props.className}>foo</div>;
* }
* });
*
* Note: This only checks shallow equality for props and state. If these contain
* complex data structures this mixin may have false-negatives for deeper
* differences. Only mixin to components which have simple props and state, or
* use `forceUpdate()` when you know deep data structures have changed.
*
* See https://facebook.github.io/react/docs/pure-render-mixin.html
*/
var ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
}
};
module.exports = ReactComponentWithPureRenderMixin;

23
web/node_modules/rc-util/es/createChainedFunction.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/**
* Safe chained function
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*
* @returns {function|null}
*/
export default function createChainedFunction() {
var args = [].slice.call(arguments, 0);
if (args.length === 1) {
return args[0];
}
return function chainedFunction() {
for (var i = 0; i < args.length; i++) {
if (args[i] && args[i].apply) {
args[i].apply(this, arguments);
}
}
};
}

86
web/node_modules/rc-util/es/debug/diff.js generated vendored Normal file
View File

@@ -0,0 +1,86 @@
function _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); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function 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; }
function _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; }
function _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; }
/* eslint no-proto: 0 */
function createArray() {
var arr = [];
arr.__proto__ = new Array();
arr.__proto__.format = function toString() {
return this.map(function (obj) {
return _objectSpread({}, obj, {
path: obj.path.join(' > ')
});
});
};
arr.__proto__.toString = function toString() {
return JSON.stringify(this.format(), null, 2);
};
return arr;
}
export default function diff(obj1, obj2) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : createArray();
if (depth <= 0) return diffList;
var keys = new Set([].concat(_toConsumableArray(Object.keys(obj1)), _toConsumableArray(Object.keys(obj2))));
keys.forEach(function (key) {
var value1 = obj1[key];
var value2 = obj2[key]; // Same value
if (value1 === value2) return;
var type1 = _typeof(value1);
var type2 = _typeof(value2); // Diff type
if (type1 !== type2) {
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
return;
} // NaN
if (Number.isNaN(value1) && Number.isNaN(value2)) {
return;
} // Object & Array
if (type1 === 'object' && value1 !== null && value2 !== null) {
diff(value1, value2, depth - 1, path.concat(key), diffList);
return;
} // Rest
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
});
return diffList;
}

5
web/node_modules/rc-util/es/deprecated.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export default function deprecated(props, instead, component) {
if (typeof window !== 'undefined' && window.console && window.console.error) {
window.console.error("Warning: ".concat(props, " is deprecated at [ ").concat(component, " ], ") + "use [ ".concat(instead, " ] instead of it."));
}
}

94
web/node_modules/rc-util/es/getContainerRenderMixin.js generated vendored Normal file
View File

@@ -0,0 +1,94 @@
function 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; }
function _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; }
function _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; }
import ReactDOM from 'react-dom';
function defaultGetContainer() {
var container = document.createElement('div');
document.body.appendChild(container);
return container;
}
export default function getContainerRenderMixin(config) {
var _config$autoMount = config.autoMount,
autoMount = _config$autoMount === void 0 ? true : _config$autoMount,
_config$autoDestroy = config.autoDestroy,
autoDestroy = _config$autoDestroy === void 0 ? true : _config$autoDestroy,
isVisible = config.isVisible,
isForceRender = config.isForceRender,
getComponent = config.getComponent,
_config$getContainer = config.getContainer,
getContainer = _config$getContainer === void 0 ? defaultGetContainer : _config$getContainer;
var mixin;
function _renderComponent(instance, componentArg, ready) {
if (!isVisible || instance._component || isVisible(instance) || isForceRender && isForceRender(instance)) {
if (!instance._container) {
instance._container = getContainer(instance);
}
var component;
if (instance.getComponent) {
component = instance.getComponent(componentArg);
} else {
component = getComponent(instance, componentArg);
}
ReactDOM.unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() {
instance._component = this;
if (ready) {
ready.call(this);
}
});
}
}
if (autoMount) {
mixin = _objectSpread({}, mixin, {
componentDidMount: function componentDidMount() {
_renderComponent(this);
},
componentDidUpdate: function componentDidUpdate() {
_renderComponent(this);
}
});
}
if (!autoMount || !autoDestroy) {
mixin = _objectSpread({}, mixin, {
renderComponent: function renderComponent(componentArg, ready) {
_renderComponent(this, componentArg, ready);
}
});
}
function _removeContainer(instance) {
if (instance._container) {
var container = instance._container;
ReactDOM.unmountComponentAtNode(container);
container.parentNode.removeChild(container);
instance._container = null;
}
}
if (autoDestroy) {
mixin = _objectSpread({}, mixin, {
componentWillUnmount: function componentWillUnmount() {
_removeContainer(this);
}
});
} else {
mixin = _objectSpread({}, mixin, {
removeContainer: function removeContainer() {
_removeContainer(this);
}
});
}
return mixin;
}

36
web/node_modules/rc-util/es/getScrollBarSize.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
var cached;
export default function getScrollBarSize(fresh) {
if (typeof document === 'undefined') {
return 0;
}
if (fresh || cached === undefined) {
var inner = document.createElement('div');
inner.style.width = '100%';
inner.style.height = '200px';
var outer = document.createElement('div');
var outerStyle = outer.style;
outerStyle.position = 'absolute';
outerStyle.top = 0;
outerStyle.left = 0;
outerStyle.pointerEvents = 'none';
outerStyle.visibility = 'hidden';
outerStyle.width = '200px';
outerStyle.height = '150px';
outerStyle.overflow = 'hidden';
outer.appendChild(inner);
document.body.appendChild(outer);
var widthContained = inner.offsetWidth;
outer.style.overflow = 'scroll';
var widthScroll = inner.offsetWidth;
if (widthContained === widthScroll) {
widthScroll = outer.clientWidth;
}
document.body.removeChild(outer);
cached = widthContained - widthScroll;
}
return cached;
}

4
web/node_modules/rc-util/es/guid.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
var seed = 0;
export default function guid() {
return "".concat(Date.now(), "_").concat(seed++);
}

2
web/node_modules/rc-util/es/hooks/useEffect.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
/** As `React.useEffect` but pass origin value in callback and not need care deps length change. */
export default function useEffect(callback: (prevDeps: any[]) => void, deps: any[]): void;

15
web/node_modules/rc-util/es/hooks/useEffect.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from 'react';
/** As `React.useEffect` but pass origin value in callback and not need care deps length change. */
export default function useEffect(callback, deps) {
var prevRef = React.useRef(deps);
React.useEffect(function () {
if (deps.length !== prevRef.current.length || deps.some(function (dep, index) {
return dep !== prevRef.current[index];
})) {
callback(prevRef.current);
}
prevRef.current = deps;
});
}

1
web/node_modules/rc-util/es/hooks/useMemo.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function useMemo<Value, Condition = any[]>(getValue: () => Value, condition: Condition, shouldUpdate: (prev: Condition, next: Condition) => boolean): Value;

11
web/node_modules/rc-util/es/hooks/useMemo.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import * as React from 'react';
export default function useMemo(getValue, condition, shouldUpdate) {
var cacheRef = React.useRef({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}

View File

@@ -0,0 +1,6 @@
export default function useControlledState<T, R = T>(defaultStateValue: T | (() => T), option?: {
defaultValue?: T | (() => T);
value?: T;
onChange?: (value: T, prevValue: T) => void;
postState?: (value: T) => T;
}): [R, (value: T) => void];

51
web/node_modules/rc-util/es/hooks/useMergedState.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import * as React from 'react';
export default function useControlledState(defaultStateValue, option) {
var _ref = option || {},
defaultValue = _ref.defaultValue,
value = _ref.value,
onChange = _ref.onChange,
postState = _ref.postState;
var _React$useState = React.useState(function () {
if (value !== undefined) {
return value;
}
if (defaultValue !== undefined) {
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
}
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
}),
_React$useState2 = _slicedToArray(_React$useState, 2),
innerValue = _React$useState2[0],
setInnerValue = _React$useState2[1];
var mergedValue = value !== undefined ? value : innerValue;
if (postState) {
mergedValue = postState(mergedValue);
}
function triggerChange(newValue) {
setInnerValue(newValue);
if (mergedValue !== newValue && onChange) {
onChange(newValue, mergedValue);
}
}
return [mergedValue, triggerChange];
}

29
web/node_modules/rc-util/es/pickAttrs.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
/* eslint-disable max-len */
var 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".replace(/\s+/g, ' ').replace(/\t|\n|\r/g, '').split(' ');
var 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".replace(/\s+/g, ' ').replace(/\t|\n|\r/g, '').split(' ');
/* eslint-enable max-len */
var attrsPrefix = ['data', 'aria'];
export default function pickAttrs(props) {
var attrs = {};
var _loop = function _loop(key) {
if (attributes.indexOf(key) > -1 || eventsName.indexOf(key) > -1) {
attrs[key] = props[key];
/* eslint-disable no-loop-func */
} else if (attrsPrefix.map(function (prefix) {
return new RegExp("^".concat(prefix));
}).some(function (reg) {
return key.replace(reg, '') !== key;
})) {
/* eslint-enable no-loop-func */
attrs[key] = props[key];
}
};
for (var key in props) {
_loop(key);
}
return attrs;
}

7
web/node_modules/rc-util/es/ref.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import * as React from 'react';
export declare function fillRef<T>(ref: React.Ref<T>, node: T): void;
/**
* Merge refs into one ref function to support ref passing.
*/
export declare function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T>;
export declare function supportRef(nodeOrComponent: any): boolean;

38
web/node_modules/rc-util/es/ref.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
function _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); }
export function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if (_typeof(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
}
/**
* Merge refs into one ref function to support ref passing.
*/
export function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
}
export function supportRef(nodeOrComponent) {
// Function component node
if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) {
return false;
} // Class component
if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) {
return false;
}
return true;
}
/* eslint-enable */

12
web/node_modules/rc-util/es/setStyle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import * as React from 'react';
export interface SetStyleOptions {
element?: HTMLElement;
}
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
declare function setStyle(style: React.CSSProperties, options?: SetStyleOptions): React.CSSProperties;
export default setStyle;

23
web/node_modules/rc-util/es/setStyle.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
function setStyle(style) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$element = options.element,
element = _options$element === void 0 ? document.body : _options$element;
var oldStyle = {};
var styleKeys = Object.keys(style); // IE browser compatible
styleKeys.forEach(function (key) {
oldStyle[key] = element.style[key];
});
styleKeys.forEach(function (key) {
element.style[key] = style[key];
});
return oldStyle;
}
export default setStyle;

40
web/node_modules/rc-util/es/switchScrollingEffect.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
import getScrollBarSize from './getScrollBarSize';
import setStyle from './setStyle';
function isBodyOverflowing() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
var cacheStyle = {};
export default (function (close) {
if (!isBodyOverflowing() && !close) {
return;
} // https://github.com/ant-design/ant-design/issues/19729
var scrollingEffectClassName = 'ant-scrolling-effect';
var scrollingEffectClassNameReg = new RegExp("".concat(scrollingEffectClassName), 'g');
var bodyClassName = document.body.className;
if (close) {
if (!scrollingEffectClassNameReg.test(bodyClassName)) return;
setStyle(cacheStyle);
cacheStyle = {};
document.body.className = bodyClassName.replace(scrollingEffectClassNameReg, '').trim();
return;
}
var scrollBarSize = getScrollBarSize();
if (scrollBarSize) {
cacheStyle = setStyle({
position: 'relative',
width: "calc(100% - ".concat(scrollBarSize, "px)")
});
if (!scrollingEffectClassNameReg.test(bodyClassName)) {
var addClassName = "".concat(bodyClassName, " ").concat(scrollingEffectClassName);
document.body.className = addClassName.trim();
}
}
});

8
web/node_modules/rc-util/es/test/domHook.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
export declare type ElementClass = Function;
export declare type Property = PropertyDescriptor | Function;
export declare function spyElementPrototypes<T extends ElementClass>(elementClass: T, properties: Record<string, Property>): {
mockRestore(): void;
};
export declare function spyElementPrototype(Element: ElementClass, propName: string, property: Property): {
mockRestore(): void;
};

68
web/node_modules/rc-util/es/test/domHook.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
function 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; }
function _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; }
function _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; }
/* eslint-disable no-param-reassign */
var NO_EXIST = {
__NOT_EXIST: true
};
export function spyElementPrototypes(elementClass, properties) {
var propNames = Object.keys(properties);
var originDescriptors = {};
propNames.forEach(function (propName) {
var originDescriptor = Object.getOwnPropertyDescriptor(elementClass.prototype, propName);
originDescriptors[propName] = originDescriptor || NO_EXIST;
var spyProp = properties[propName];
if (typeof spyProp === 'function') {
// If is a function
elementClass.prototype[propName] = function spyFunc() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return spyProp.call.apply(spyProp, [this, originDescriptor].concat(args));
};
} else {
// Otherwise tread as a property
Object.defineProperty(elementClass.prototype, propName, _objectSpread({}, spyProp, {
set: function set(value) {
if (spyProp.set) {
return spyProp.set.call(this, originDescriptor, value);
}
return originDescriptor.set(value);
},
get: function get() {
if (spyProp.get) {
return spyProp.get.call(this, originDescriptor);
}
return originDescriptor.get();
},
configurable: true
}));
}
});
return {
mockRestore: function mockRestore() {
propNames.forEach(function (propName) {
var originDescriptor = originDescriptors[propName];
if (originDescriptor === NO_EXIST) {
delete elementClass.prototype[propName];
} else if (typeof originDescriptor === 'function') {
elementClass.prototype[propName] = originDescriptor;
} else {
Object.defineProperty(elementClass.prototype, propName, originDescriptor);
}
});
}
};
}
export function spyElementPrototype(Element, propName, property) {
return spyElementPrototypes(Element, _defineProperty({}, propName, property));
}
/* eslint-enable */

View File

@@ -0,0 +1,27 @@
import React from 'react';
var unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
} // only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!React.Profiler) {
return Component;
} // Here polyfill get started
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
delete prototype.componentWillReceiveProps;
return Component;
};
export default unsafeLifecyclesPolyfill;

1
web/node_modules/rc-util/es/utils/get.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function get<T = any>(entity: any, path: (string | number)[]): any;

13
web/node_modules/rc-util/es/utils/get.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
export default function get(entity, path) {
var current = entity;
for (var i = 0; i < path.length; i += 1) {
if (current === null || current === undefined) {
return undefined;
}
current = current[path[i]];
}
return current;
}

1
web/node_modules/rc-util/es/utils/set.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function set<Entity = any, Output = Entity, Value = any>(entity: Entity, paths: (string | number)[], value: Value): Output;

46
web/node_modules/rc-util/es/utils/set.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
function 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; }
function _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; }
function _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; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
export default function set(entity, paths, value) {
if (!paths.length) {
return value;
}
var _paths = _toArray(paths),
path = _paths[0],
restPath = _paths.slice(1);
var clone;
if (!entity && typeof path === 'number') {
clone = [];
} else if (Array.isArray(entity)) {
clone = _toConsumableArray(entity);
} else {
clone = _objectSpread({}, entity);
}
clone[path] = set(clone[path], restPath, value);
return clone;
}

7
web/node_modules/rc-util/es/warn.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export default function warn(msg) {
if (process.env.NODE_ENV !== 'production') {
if (typeof console !== 'undefined' && console.warn) {
console.warn(msg);
}
}
}

7
web/node_modules/rc-util/es/warning.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export declare function warning(valid: boolean, message: string): void;
export declare function note(valid: boolean, message: string): void;
export declare function resetWarned(): void;
export declare function call(method: (valid: boolean, message: string) => void, valid: boolean, message: string): void;
export declare function warningOnce(valid: boolean, message: string): void;
export declare function noteOnce(valid: boolean, message: string): void;
export default warningOnce;

31
web/node_modules/rc-util/es/warning.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
/* eslint-disable no-console */
var warned = {};
export function warning(valid, message) {
// Support uglify
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
console.error("Warning: ".concat(message));
}
}
export function note(valid, message) {
// Support uglify
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
console.warn("Note: ".concat(message));
}
}
export function resetWarned() {
warned = {};
}
export function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
export function warningOnce(valid, message) {
call(warning, valid, message);
}
export function noteOnce(valid, message) {
call(note, valid, message);
}
export default warningOnce;
/* eslint-enable */

19
web/node_modules/rc-util/lib/Children/mapSelf.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = mapSelf;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function mirror(o) {
return o;
}
function mapSelf(children) {
// return ReactFragment
return _react.default.Children.map(children, mirror);
}

2
web/node_modules/rc-util/lib/Children/toArray.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import React from 'react';
export default function toArray(children: React.ReactNode): React.ReactElement[];

32
web/node_modules/rc-util/lib/Children/toArray.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toArray;
var _react = _interopRequireDefault(require("react"));
var _reactIs = require("react-is");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function toArray(children) {
var ret = [];
_react.default.Children.forEach(children, function (child) {
if (child === undefined || child === null) {
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));
} else {
ret.push(child);
}
});
return ret;
}

137
web/node_modules/rc-util/lib/ContainerRender.js generated vendored Normal file
View File

@@ -0,0 +1,137 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ContainerRender = /*#__PURE__*/function (_React$Component) {
_inherits(ContainerRender, _React$Component);
var _super = _createSuper(ContainerRender);
function ContainerRender() {
var _this;
_classCallCheck(this, ContainerRender);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.removeContainer = function () {
if (_this.container) {
_reactDom.default.unmountComponentAtNode(_this.container);
_this.container.parentNode.removeChild(_this.container);
_this.container = null;
}
};
_this.renderComponent = function (props, ready) {
var _this$props = _this.props,
visible = _this$props.visible,
getComponent = _this$props.getComponent,
forceRender = _this$props.forceRender,
getContainer = _this$props.getContainer,
parent = _this$props.parent;
if (visible || parent._component || forceRender) {
if (!_this.container) {
_this.container = getContainer();
}
_reactDom.default.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {
if (ready) {
ready.call(this);
}
});
}
};
return _this;
}
_createClass(ContainerRender, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
if (this.props.autoMount) {
this.renderComponent();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.props.autoDestroy) {
this.removeContainer();
}
}
}, {
key: "render",
value: function render() {
return this.props.children({
renderComponent: this.renderComponent,
removeContainer: this.removeContainer
});
}
}]);
return ContainerRender;
}(_react.default.Component);
exports.default = ContainerRender;
ContainerRender.propTypes = {
autoMount: _propTypes.default.bool,
autoDestroy: _propTypes.default.bool,
visible: _propTypes.default.bool,
forceRender: _propTypes.default.bool,
parent: _propTypes.default.any,
getComponent: _propTypes.default.func.isRequired,
getContainer: _propTypes.default.func.isRequired,
children: _propTypes.default.func.isRequired
};
ContainerRender.defaultProps = {
autoMount: true,
autoDestroy: true,
forceRender: false
};

20
web/node_modules/rc-util/lib/Dom/addEventListener.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = addEventListenerWrap;
var _addDomEventListener = _interopRequireDefault(require("add-dom-event-listener"));
var _reactDom = _interopRequireDefault(require("react-dom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function addEventListenerWrap(target, eventType, cb, option) {
/* eslint camelcase: 2 */
var callback = _reactDom.default.unstable_batchedUpdates ? function run(e) {
_reactDom.default.unstable_batchedUpdates(cb, e);
} : cb;
return (0, _addDomEventListener.default)(target, eventType, callback, option);
}

10
web/node_modules/rc-util/lib/Dom/canUseDom.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = canUseDom;
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}

38
web/node_modules/rc-util/lib/Dom/class.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hasClass = hasClass;
exports.addClass = addClass;
exports.removeClass = removeClass;
function hasClass(node, className) {
if (node.classList) {
return node.classList.contains(className);
}
var originClass = node.className;
return " ".concat(originClass, " ").indexOf(" ".concat(className, " ")) > -1;
}
function addClass(node, className) {
if (node.classList) {
node.classList.add(className);
} else {
if (!hasClass(node, className)) {
node.className = "".concat(node.className, " ").concat(className);
}
}
}
function removeClass(node, className) {
if (node.classList) {
node.classList.remove(className);
} else {
if (hasClass(node, className)) {
var originClass = node.className;
node.className = " ".concat(originClass, " ").replace(" ".concat(className, " "), ' ');
}
}
}

20
web/node_modules/rc-util/lib/Dom/contains.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = contains;
function contains(root, n) {
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}

130
web/node_modules/rc-util/lib/Dom/css.js generated vendored Normal file
View File

@@ -0,0 +1,130 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.get = get;
exports.set = set;
exports.getOuterWidth = getOuterWidth;
exports.getOuterHeight = getOuterHeight;
exports.getDocSize = getDocSize;
exports.getClientSize = getClientSize;
exports.getScroll = getScroll;
exports.getOffset = getOffset;
/* eslint-disable no-nested-ternary */
var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;
var removePixel = {
left: true,
top: true
};
var floatMap = {
cssFloat: 1,
styleFloat: 1,
float: 1
};
function getComputedStyle(node) {
return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
}
function getStyleValue(node, type, value) {
type = type.toLowerCase();
if (value === 'auto') {
if (type === 'height') {
return node.offsetHeight;
}
if (type === 'width') {
return node.offsetWidth;
}
}
if (!(type in removePixel)) {
removePixel[type] = PIXEL_PATTERN.test(type);
}
return removePixel[type] ? parseFloat(value) || 0 : value;
}
function get(node, name) {
var length = arguments.length;
var style = getComputedStyle(node);
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);
}
function set(node, name, value) {
var length = arguments.length;
name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;
if (length === 3) {
if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {
value = "".concat(value, "px");
}
node.style[name] = value; // Number
return value;
}
for (var x in name) {
if (name.hasOwnProperty(x)) {
set(node, x, name[x]);
}
}
return getComputedStyle(node);
}
function getOuterWidth(el) {
if (el === document.body) {
return document.documentElement.clientWidth;
}
return el.offsetWidth;
}
function getOuterHeight(el) {
if (el === document.body) {
return window.innerHeight || document.documentElement.clientHeight;
}
return el.offsetHeight;
}
function getDocSize() {
var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
return {
width: width,
height: height
};
}
function getClientSize() {
var width = document.documentElement.clientWidth;
var height = window.innerHeight || document.documentElement.clientHeight;
return {
width: width,
height: height
};
}
function getScroll() {
return {
scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),
scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)
};
}
function getOffset(node) {
var box = node.getBoundingClientRect();
var docElem = document.documentElement; // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft
return {
left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),
top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)
};
}

5
web/node_modules/rc-util/lib/Dom/findDOMNode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="react" />
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
export default function findDOMNode<T = Element | Text>(node: React.ReactInstance | HTMLElement): T;

21
web/node_modules/rc-util/lib/Dom/findDOMNode.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = findDOMNode;
var _reactDom = _interopRequireDefault(require("react-dom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
function findDOMNode(node) {
if (node instanceof HTMLElement) {
return node;
}
return _reactDom.default.findDOMNode(node);
}

95
web/node_modules/rc-util/lib/Dom/focus.js generated vendored Normal file
View File

@@ -0,0 +1,95 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFocusNodeList = getFocusNodeList;
exports.saveLastFocusNode = saveLastFocusNode;
exports.clearLastFocusNode = clearLastFocusNode;
exports.backLastFocusNode = backLastFocusNode;
exports.limitTabRange = limitTabRange;
function hidden(node) {
return node.style.display === 'none';
}
function visible(node) {
while (node) {
if (node === document.body) {
break;
}
if (hidden(node)) {
return false;
}
node = node.parentNode;
}
return true;
}
function focusable(node) {
var nodeName = node.nodeName.toLowerCase();
var tabIndex = parseInt(node.getAttribute('tabindex'), 10);
var hasTabIndex = !isNaN(tabIndex) && tabIndex > -1;
if (visible(node)) {
if (['input', 'select', 'textarea', 'button'].indexOf(nodeName) > -1) {
return !node.disabled;
} else if (nodeName === 'a') {
return node.getAttribute('href') || hasTabIndex;
}
return node.isContentEditable || hasTabIndex;
}
}
function getFocusNodeList(node) {
var res = [].slice.call(node.querySelectorAll('*'), 0).filter(function (child) {
return focusable(child);
});
if (focusable(node)) {
res.unshift(node);
}
return res;
}
var lastFocusElement = null;
function saveLastFocusNode() {
lastFocusElement = document.activeElement;
}
function clearLastFocusNode() {
lastFocusElement = null;
}
function backLastFocusNode() {
if (lastFocusElement) {
try {
// 元素可能已经被移动了
lastFocusElement.focus();
/* eslint-disable no-empty */
} catch (e) {} // empty
/* eslint-enable no-empty */
}
}
function limitTabRange(node, e) {
if (e.keyCode === 9) {
var tabNodeList = getFocusNodeList(node);
var lastTabNode = tabNodeList[e.shiftKey ? 0 : tabNodeList.length - 1];
var leavingTab = lastTabNode === document.activeElement || node === document.activeElement;
if (leavingTab) {
var target = tabNodeList[e.shiftKey ? tabNodeList.length - 1 : 0];
target.focus();
e.preventDefault();
}
}
}

40
web/node_modules/rc-util/lib/Dom/support.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transition = exports.animation = void 0;
var _canUseDom = _interopRequireDefault(require("./canUseDom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var animationEndEventNames = {
WebkitAnimation: 'webkitAnimationEnd',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
};
var transitionEventNames = {
WebkitTransition: 'webkitTransitionEnd',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
};
function supportEnd(names) {
var el = document.createElement('div');
for (var name in names) {
if (names.hasOwnProperty(name) && el.style[name] !== undefined) {
return {
end: names[name]
};
}
}
return false;
}
var animation = (0, _canUseDom.default)() && supportEnd(animationEndEventNames);
exports.animation = animation;
var transition = (0, _canUseDom.default)() && supportEnd(transitionEventNames);
exports.transition = transition;

436
web/node_modules/rc-util/lib/KeyCode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,436 @@
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
declare const KeyCode: {
/**
* MAC_ENTER
*/
MAC_ENTER: number;
/**
* BACKSPACE
*/
BACKSPACE: number;
/**
* TAB
*/
TAB: number;
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: number;
/**
* ENTER
*/
ENTER: number;
/**
* SHIFT
*/
SHIFT: number;
/**
* CTRL
*/
CTRL: number;
/**
* ALT
*/
ALT: number;
/**
* PAUSE
*/
PAUSE: number;
/**
* CAPS_LOCK
*/
CAPS_LOCK: number;
/**
* ESC
*/
ESC: number;
/**
* SPACE
*/
SPACE: number;
/**
* PAGE_UP
*/
PAGE_UP: number;
/**
* PAGE_DOWN
*/
PAGE_DOWN: number;
/**
* END
*/
END: number;
/**
* HOME
*/
HOME: number;
/**
* LEFT
*/
LEFT: number;
/**
* UP
*/
UP: number;
/**
* RIGHT
*/
RIGHT: number;
/**
* DOWN
*/
DOWN: number;
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: number;
/**
* INSERT
*/
INSERT: number;
/**
* DELETE
*/
DELETE: number;
/**
* ZERO
*/
ZERO: number;
/**
* ONE
*/
ONE: number;
/**
* TWO
*/
TWO: number;
/**
* THREE
*/
THREE: number;
/**
* FOUR
*/
FOUR: number;
/**
* FIVE
*/
FIVE: number;
/**
* SIX
*/
SIX: number;
/**
* SEVEN
*/
SEVEN: number;
/**
* EIGHT
*/
EIGHT: number;
/**
* NINE
*/
NINE: number;
/**
* QUESTION_MARK
*/
QUESTION_MARK: number;
/**
* A
*/
A: number;
/**
* B
*/
B: number;
/**
* C
*/
C: number;
/**
* D
*/
D: number;
/**
* E
*/
E: number;
/**
* F
*/
F: number;
/**
* G
*/
G: number;
/**
* H
*/
H: number;
/**
* I
*/
I: number;
/**
* J
*/
J: number;
/**
* K
*/
K: number;
/**
* L
*/
L: number;
/**
* M
*/
M: number;
/**
* N
*/
N: number;
/**
* O
*/
O: number;
/**
* P
*/
P: number;
/**
* Q
*/
Q: number;
/**
* R
*/
R: number;
/**
* S
*/
S: number;
/**
* T
*/
T: number;
/**
* U
*/
U: number;
/**
* V
*/
V: number;
/**
* W
*/
W: number;
/**
* X
*/
X: number;
/**
* Y
*/
Y: number;
/**
* Z
*/
Z: number;
/**
* META
*/
META: number;
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: number;
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: number;
/**
* NUM_ZERO
*/
NUM_ZERO: number;
/**
* NUM_ONE
*/
NUM_ONE: number;
/**
* NUM_TWO
*/
NUM_TWO: number;
/**
* NUM_THREE
*/
NUM_THREE: number;
/**
* NUM_FOUR
*/
NUM_FOUR: number;
/**
* NUM_FIVE
*/
NUM_FIVE: number;
/**
* NUM_SIX
*/
NUM_SIX: number;
/**
* NUM_SEVEN
*/
NUM_SEVEN: number;
/**
* NUM_EIGHT
*/
NUM_EIGHT: number;
/**
* NUM_NINE
*/
NUM_NINE: number;
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: number;
/**
* NUM_PLUS
*/
NUM_PLUS: number;
/**
* NUM_MINUS
*/
NUM_MINUS: number;
/**
* NUM_PERIOD
*/
NUM_PERIOD: number;
/**
* NUM_DIVISION
*/
NUM_DIVISION: number;
/**
* F1
*/
F1: number;
/**
* F2
*/
F2: number;
/**
* F3
*/
F3: number;
/**
* F4
*/
F4: number;
/**
* F5
*/
F5: number;
/**
* F6
*/
F6: number;
/**
* F7
*/
F7: number;
/**
* F8
*/
F8: number;
/**
* F9
*/
F9: number;
/**
* F10
*/
F10: number;
/**
* F11
*/
F11: number;
/**
* F12
*/
F12: number;
/**
* NUMLOCK
*/
NUMLOCK: number;
/**
* SEMICOLON
*/
SEMICOLON: number;
/**
* DASH
*/
DASH: number;
/**
* EQUALS
*/
EQUALS: number;
/**
* COMMA
*/
COMMA: number;
/**
* PERIOD
*/
PERIOD: number;
/**
* SLASH
*/
SLASH: number;
/**
* APOSTROPHE
*/
APOSTROPHE: number;
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: number;
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: number;
/**
* BACKSLASH
*/
BACKSLASH: number;
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: number;
/**
* WIN_KEY
*/
WIN_KEY: number;
/**
* MAC_FF_META
*/
MAC_FF_META: number;
/**
* WIN_IME
*/
WIN_IME: number;
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: (e: KeyboardEvent) => boolean;
/**
* whether character is entered.
*/
isCharacterKey: (keyCode: number) => boolean;
};
export default KeyCode;

631
web/node_modules/rc-util/lib/KeyCode.js generated vendored Normal file
View File

@@ -0,0 +1,631 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var 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) {
var keyCode = e.keyCode;
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;
}
}
};
var _default = KeyCode;
exports.default = _default;

100
web/node_modules/rc-util/lib/Portal.js generated vendored Normal file
View File

@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _propTypes = _interopRequireDefault(require("prop-types"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Portal = /*#__PURE__*/function (_React$Component) {
_inherits(Portal, _React$Component);
var _super = _createSuper(Portal);
function Portal() {
_classCallCheck(this, Portal);
return _super.apply(this, arguments);
}
_createClass(Portal, [{
key: "componentDidMount",
value: function componentDidMount() {
this.createContainer();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var didUpdate = this.props.didUpdate;
if (didUpdate) {
didUpdate(prevProps);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.removeContainer();
}
}, {
key: "createContainer",
value: function createContainer() {
this._container = this.props.getContainer();
this.forceUpdate();
}
}, {
key: "removeContainer",
value: function removeContainer() {
if (this._container) {
this._container.parentNode.removeChild(this._container);
}
}
}, {
key: "render",
value: function render() {
if (this._container) {
return _reactDom.default.createPortal(this.props.children, this._container);
}
return null;
}
}]);
return Portal;
}(_react.default.Component);
exports.default = Portal;
Portal.propTypes = {
getContainer: _propTypes.default.func.isRequired,
children: _propTypes.default.node.isRequired,
didUpdate: _propTypes.default.func
};

272
web/node_modules/rc-util/lib/PortalWrapper.js generated vendored Normal file
View File

@@ -0,0 +1,272 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _reactLifecyclesCompat = require("react-lifecycles-compat");
var _ContainerRender = _interopRequireDefault(require("./ContainerRender"));
var _Portal = _interopRequireDefault(require("./Portal"));
var _switchScrollingEffect = _interopRequireDefault(require("./switchScrollingEffect"));
var _setStyle = _interopRequireDefault(require("./setStyle"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function 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; }
function _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; }
function _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; }
function _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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var openCount = 0;
var windowIsUndefined = !(typeof window !== 'undefined' && window.document && window.document.createElement);
var IS_REACT_16 = ('createPortal' in _reactDom.default); // https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
var cacheOverflow = {};
var PortalWrapper = /*#__PURE__*/function (_React$Component) {
_inherits(PortalWrapper, _React$Component);
var _super = _createSuper(PortalWrapper);
function PortalWrapper(props) {
var _this;
_classCallCheck(this, PortalWrapper);
_this = _super.call(this, props);
_this.getParent = function () {
var getContainer = _this.props.getContainer;
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;
};
_this.getContainer = function () {
if (windowIsUndefined) {
return null;
}
if (!_this.container) {
_this.container = document.createElement('div');
var parent = _this.getParent();
if (parent) {
parent.appendChild(_this.container);
}
}
_this.setWrapperClassName();
return _this.container;
};
_this.setWrapperClassName = function () {
var wrapperClassName = _this.props.wrapperClassName;
if (_this.container && wrapperClassName && wrapperClassName !== _this.container.className) {
_this.container.className = wrapperClassName;
}
};
_this.savePortal = function (c) {
// Warning: don't rename _component
// https://github.com/react-component/util/pull/65#discussion_r352407916
_this._component = c;
};
_this.removeCurrentContainer = function (visible) {
_this.container = null;
_this._component = null;
if (!IS_REACT_16) {
if (visible) {
_this.renderComponent({
afterClose: _this.removeContainer,
onClose: function onClose() {},
visible: false
});
} else {
_this.removeContainer();
}
}
};
_this.switchScrollingEffect = function () {
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
(0, _switchScrollingEffect.default)(); // Must be set after switchScrollingEffect
cacheOverflow = (0, _setStyle.default)({
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden'
});
} else if (!openCount) {
(0, _setStyle.default)(cacheOverflow);
cacheOverflow = {};
(0, _switchScrollingEffect.default)(true);
}
};
var _visible = props.visible;
openCount = _visible ? openCount + 1 : openCount;
_this.state = {
_self: _assertThisInitialized(_this)
};
return _this;
}
_createClass(PortalWrapper, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.setWrapperClassName();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var visible = this.props.visible; // 离开时不会 render 导到离开时数值不变,改用 func 。。
openCount = visible && openCount ? openCount - 1 : openCount;
this.removeCurrentContainer(visible);
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
children = _this$props.children,
forceRender = _this$props.forceRender,
visible = _this$props.visible;
var portal = null;
var childProps = {
getOpenCount: function getOpenCount() {
return openCount;
},
getContainer: this.getContainer,
switchScrollingEffect: this.switchScrollingEffect
}; // suppport react15
if (!IS_REACT_16) {
return /*#__PURE__*/_react.default.createElement(_ContainerRender.default, {
parent: this,
visible: visible,
autoDestroy: false,
getComponent: function getComponent() {
var extra = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return children(_objectSpread({}, extra, {}, childProps, {
ref: _this2.savePortal
}));
},
getContainer: this.getContainer,
forceRender: forceRender
}, function (_ref) {
var renderComponent = _ref.renderComponent,
removeContainer = _ref.removeContainer;
_this2.renderComponent = renderComponent;
_this2.removeContainer = removeContainer;
return null;
});
}
if (forceRender || visible || this._component) {
portal = /*#__PURE__*/_react.default.createElement(_Portal.default, {
getContainer: this.getContainer,
ref: this.savePortal
}, children(childProps));
}
return portal;
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, _ref2) {
var prevProps = _ref2.prevProps,
_self = _ref2._self;
var visible = props.visible,
getContainer = props.getContainer;
if (prevProps) {
var prevVisible = prevProps.visible,
prevGetContainer = prevProps.getContainer;
if (visible !== prevVisible) {
openCount = visible && !prevVisible ? openCount + 1 : openCount - 1;
}
var getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) {
_self.removeCurrentContainer(false);
}
}
return {
prevProps: props
};
}
}]);
return PortalWrapper;
}(_react.default.Component);
PortalWrapper.propTypes = {
wrapperClassName: _propTypes.default.string,
forceRender: _propTypes.default.bool,
getContainer: _propTypes.default.any,
children: _propTypes.default.func,
visible: _propTypes.default.bool
};
var _default = (0, _reactLifecyclesCompat.polyfill)(PortalWrapper);
exports.default = _default;

51
web/node_modules/rc-util/lib/PureRenderMixin.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactComponentWithPureRenderMixin
*/
var shallowEqual = require('shallowequal');
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
/**
* If your React component's render function is "pure", e.g. it will render the
* same result given the same props and state, provide this mixin for a
* considerable performance boost.
*
* Most React components have pure render functions.
*
* Example:
*
* var ReactComponentWithPureRenderMixin =
* require('ReactComponentWithPureRenderMixin');
* React.createClass({
* mixins: [ReactComponentWithPureRenderMixin],
*
* render: function() {
* return <div className={this.props.className}>foo</div>;
* }
* });
*
* Note: This only checks shallow equality for props and state. If these contain
* complex data structures this mixin may have false-negatives for deeper
* differences. Only mixin to components which have simple props and state, or
* use `forceUpdate()` when you know deep data structures have changed.
*
* See https://facebook.github.io/react/docs/pure-render-mixin.html
*/
var ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
}
};
module.exports = ReactComponentWithPureRenderMixin;

30
web/node_modules/rc-util/lib/createChainedFunction.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createChainedFunction;
/**
* Safe chained function
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*
* @returns {function|null}
*/
function createChainedFunction() {
var args = [].slice.call(arguments, 0);
if (args.length === 1) {
return args[0];
}
return function chainedFunction() {
for (var i = 0; i < args.length; i++) {
if (args[i] && args[i].apply) {
args[i].apply(this, arguments);
}
}
};
}

93
web/node_modules/rc-util/lib/debug/diff.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = diff;
function _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); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function 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; }
function _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; }
function _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; }
/* eslint no-proto: 0 */
function createArray() {
var arr = [];
arr.__proto__ = new Array();
arr.__proto__.format = function toString() {
return this.map(function (obj) {
return _objectSpread({}, obj, {
path: obj.path.join(' > ')
});
});
};
arr.__proto__.toString = function toString() {
return JSON.stringify(this.format(), null, 2);
};
return arr;
}
function diff(obj1, obj2) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : createArray();
if (depth <= 0) return diffList;
var keys = new Set([].concat(_toConsumableArray(Object.keys(obj1)), _toConsumableArray(Object.keys(obj2))));
keys.forEach(function (key) {
var value1 = obj1[key];
var value2 = obj2[key]; // Same value
if (value1 === value2) return;
var type1 = _typeof(value1);
var type2 = _typeof(value2); // Diff type
if (type1 !== type2) {
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
return;
} // NaN
if (Number.isNaN(value1) && Number.isNaN(value2)) {
return;
} // Object & Array
if (type1 === 'object' && value1 !== null && value2 !== null) {
diff(value1, value2, depth - 1, path.concat(key), diffList);
return;
} // Rest
diffList.push({
path: path.concat(key),
value1: value1,
value2: value2
});
});
return diffList;
}

12
web/node_modules/rc-util/lib/deprecated.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = deprecated;
function deprecated(props, instead, component) {
if (typeof window !== 'undefined' && window.console && window.console.error) {
window.console.error("Warning: ".concat(props, " is deprecated at [ ").concat(component, " ], ") + "use [ ".concat(instead, " ] instead of it."));
}
}

105
web/node_modules/rc-util/lib/getContainerRenderMixin.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getContainerRenderMixin;
var _reactDom = _interopRequireDefault(require("react-dom"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function 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; }
function _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; }
function _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; }
function defaultGetContainer() {
var container = document.createElement('div');
document.body.appendChild(container);
return container;
}
function getContainerRenderMixin(config) {
var _config$autoMount = config.autoMount,
autoMount = _config$autoMount === void 0 ? true : _config$autoMount,
_config$autoDestroy = config.autoDestroy,
autoDestroy = _config$autoDestroy === void 0 ? true : _config$autoDestroy,
isVisible = config.isVisible,
isForceRender = config.isForceRender,
getComponent = config.getComponent,
_config$getContainer = config.getContainer,
getContainer = _config$getContainer === void 0 ? defaultGetContainer : _config$getContainer;
var mixin;
function _renderComponent(instance, componentArg, ready) {
if (!isVisible || instance._component || isVisible(instance) || isForceRender && isForceRender(instance)) {
if (!instance._container) {
instance._container = getContainer(instance);
}
var component;
if (instance.getComponent) {
component = instance.getComponent(componentArg);
} else {
component = getComponent(instance, componentArg);
}
_reactDom.default.unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() {
instance._component = this;
if (ready) {
ready.call(this);
}
});
}
}
if (autoMount) {
mixin = _objectSpread({}, mixin, {
componentDidMount: function componentDidMount() {
_renderComponent(this);
},
componentDidUpdate: function componentDidUpdate() {
_renderComponent(this);
}
});
}
if (!autoMount || !autoDestroy) {
mixin = _objectSpread({}, mixin, {
renderComponent: function renderComponent(componentArg, ready) {
_renderComponent(this, componentArg, ready);
}
});
}
function _removeContainer(instance) {
if (instance._container) {
var container = instance._container;
_reactDom.default.unmountComponentAtNode(container);
container.parentNode.removeChild(container);
instance._container = null;
}
}
if (autoDestroy) {
mixin = _objectSpread({}, mixin, {
componentWillUnmount: function componentWillUnmount() {
_removeContainer(this);
}
});
} else {
mixin = _objectSpread({}, mixin, {
removeContainer: function removeContainer() {
_removeContainer(this);
}
});
}
return mixin;
}

43
web/node_modules/rc-util/lib/getScrollBarSize.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getScrollBarSize;
var cached;
function getScrollBarSize(fresh) {
if (typeof document === 'undefined') {
return 0;
}
if (fresh || cached === undefined) {
var inner = document.createElement('div');
inner.style.width = '100%';
inner.style.height = '200px';
var outer = document.createElement('div');
var outerStyle = outer.style;
outerStyle.position = 'absolute';
outerStyle.top = 0;
outerStyle.left = 0;
outerStyle.pointerEvents = 'none';
outerStyle.visibility = 'hidden';
outerStyle.width = '200px';
outerStyle.height = '150px';
outerStyle.overflow = 'hidden';
outer.appendChild(inner);
document.body.appendChild(outer);
var widthContained = inner.offsetWidth;
outer.style.overflow = 'scroll';
var widthScroll = inner.offsetWidth;
if (widthContained === widthScroll) {
widthScroll = outer.clientWidth;
}
document.body.removeChild(outer);
cached = widthContained - widthScroll;
}
return cached;
}

11
web/node_modules/rc-util/lib/guid.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = guid;
var seed = 0;
function guid() {
return "".concat(Date.now(), "_").concat(seed++);
}

2
web/node_modules/rc-util/lib/hooks/useEffect.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
/** As `React.useEffect` but pass origin value in callback and not need care deps length change. */
export default function useEffect(callback: (prevDeps: any[]) => void, deps: any[]): void;

28
web/node_modules/rc-util/lib/hooks/useEffect.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
"use strict";
function _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); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useEffect;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/** As `React.useEffect` but pass origin value in callback and not need care deps length change. */
function useEffect(callback, deps) {
var prevRef = React.useRef(deps);
React.useEffect(function () {
if (deps.length !== prevRef.current.length || deps.some(function (dep, index) {
return dep !== prevRef.current[index];
})) {
callback(prevRef.current);
}
prevRef.current = deps;
});
}

1
web/node_modules/rc-util/lib/hooks/useMemo.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function useMemo<Value, Condition = any[]>(getValue: () => Value, condition: Condition, shouldUpdate: (prev: Condition, next: Condition) => boolean): Value;

25
web/node_modules/rc-util/lib/hooks/useMemo.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
function _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); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useMemo;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function useMemo(getValue, condition, shouldUpdate) {
var cacheRef = React.useRef({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}

View File

@@ -0,0 +1,6 @@
export default function useControlledState<T, R = T>(defaultStateValue: T | (() => T), option?: {
defaultValue?: T | (() => T);
value?: T;
onChange?: (value: T, prevValue: T) => void;
postState?: (value: T) => T;
}): [R, (value: T) => void];

65
web/node_modules/rc-util/lib/hooks/useMergedState.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
"use strict";
function _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); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useControlledState;
var React = _interopRequireWildcard(require("react"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function useControlledState(defaultStateValue, option) {
var _ref = option || {},
defaultValue = _ref.defaultValue,
value = _ref.value,
onChange = _ref.onChange,
postState = _ref.postState;
var _React$useState = React.useState(function () {
if (value !== undefined) {
return value;
}
if (defaultValue !== undefined) {
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
}
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
}),
_React$useState2 = _slicedToArray(_React$useState, 2),
innerValue = _React$useState2[0],
setInnerValue = _React$useState2[1];
var mergedValue = value !== undefined ? value : innerValue;
if (postState) {
mergedValue = postState(mergedValue);
}
function triggerChange(newValue) {
setInnerValue(newValue);
if (mergedValue !== newValue && onChange) {
onChange(newValue, mergedValue);
}
}
return [mergedValue, triggerChange];
}

37
web/node_modules/rc-util/lib/pickAttrs.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = pickAttrs;
/* eslint-disable max-len */
var 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".replace(/\s+/g, ' ').replace(/\t|\n|\r/g, '').split(' ');
var 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".replace(/\s+/g, ' ').replace(/\t|\n|\r/g, '').split(' ');
/* eslint-enable max-len */
var attrsPrefix = ['data', 'aria'];
function pickAttrs(props) {
var attrs = {};
var _loop = function _loop(key) {
if (attributes.indexOf(key) > -1 || eventsName.indexOf(key) > -1) {
attrs[key] = props[key];
/* eslint-disable no-loop-func */
} else if (attrsPrefix.map(function (prefix) {
return new RegExp("^".concat(prefix));
}).some(function (reg) {
return key.replace(reg, '') !== key;
})) {
/* eslint-enable no-loop-func */
attrs[key] = props[key];
}
};
for (var key in props) {
_loop(key);
}
return attrs;
}

7
web/node_modules/rc-util/lib/ref.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import * as React from 'react';
export declare function fillRef<T>(ref: React.Ref<T>, node: T): void;
/**
* Merge refs into one ref function to support ref passing.
*/
export declare function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T>;
export declare function supportRef(nodeOrComponent: any): boolean;

49
web/node_modules/rc-util/lib/ref.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fillRef = fillRef;
exports.composeRef = composeRef;
exports.supportRef = supportRef;
function _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); }
function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if (_typeof(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
}
/**
* Merge refs into one ref function to support ref passing.
*/
function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
}
function supportRef(nodeOrComponent) {
// Function component node
if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) {
return false;
} // Class component
if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) {
return false;
}
return true;
}
/* eslint-enable */

12
web/node_modules/rc-util/lib/setStyle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import * as React from 'react';
export interface SetStyleOptions {
element?: HTMLElement;
}
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
declare function setStyle(style: React.CSSProperties, options?: SetStyleOptions): React.CSSProperties;
export default setStyle;

31
web/node_modules/rc-util/lib/setStyle.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
function setStyle(style) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$element = options.element,
element = _options$element === void 0 ? document.body : _options$element;
var oldStyle = {};
var styleKeys = Object.keys(style); // IE browser compatible
styleKeys.forEach(function (key) {
oldStyle[key] = element.style[key];
});
styleKeys.forEach(function (key) {
element.style[key] = style[key];
});
return oldStyle;
}
var _default = setStyle;
exports.default = _default;

53
web/node_modules/rc-util/lib/switchScrollingEffect.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _getScrollBarSize = _interopRequireDefault(require("./getScrollBarSize"));
var _setStyle = _interopRequireDefault(require("./setStyle"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isBodyOverflowing() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
var cacheStyle = {};
var _default = function _default(close) {
if (!isBodyOverflowing() && !close) {
return;
} // https://github.com/ant-design/ant-design/issues/19729
var scrollingEffectClassName = 'ant-scrolling-effect';
var scrollingEffectClassNameReg = new RegExp("".concat(scrollingEffectClassName), 'g');
var bodyClassName = document.body.className;
if (close) {
if (!scrollingEffectClassNameReg.test(bodyClassName)) return;
(0, _setStyle.default)(cacheStyle);
cacheStyle = {};
document.body.className = bodyClassName.replace(scrollingEffectClassNameReg, '').trim();
return;
}
var scrollBarSize = (0, _getScrollBarSize.default)();
if (scrollBarSize) {
cacheStyle = (0, _setStyle.default)({
position: 'relative',
width: "calc(100% - ".concat(scrollBarSize, "px)")
});
if (!scrollingEffectClassNameReg.test(bodyClassName)) {
var addClassName = "".concat(bodyClassName, " ").concat(scrollingEffectClassName);
document.body.className = addClassName.trim();
}
}
};
exports.default = _default;

8
web/node_modules/rc-util/lib/test/domHook.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
export declare type ElementClass = Function;
export declare type Property = PropertyDescriptor | Function;
export declare function spyElementPrototypes<T extends ElementClass>(elementClass: T, properties: Record<string, Property>): {
mockRestore(): void;
};
export declare function spyElementPrototype(Element: ElementClass, propName: string, property: Property): {
mockRestore(): void;
};

78
web/node_modules/rc-util/lib/test/domHook.js generated vendored Normal file
View File

@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.spyElementPrototypes = spyElementPrototypes;
exports.spyElementPrototype = spyElementPrototype;
function 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; }
function _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; }
function _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; }
/* eslint-disable no-param-reassign */
var NO_EXIST = {
__NOT_EXIST: true
};
function spyElementPrototypes(elementClass, properties) {
var propNames = Object.keys(properties);
var originDescriptors = {};
propNames.forEach(function (propName) {
var originDescriptor = Object.getOwnPropertyDescriptor(elementClass.prototype, propName);
originDescriptors[propName] = originDescriptor || NO_EXIST;
var spyProp = properties[propName];
if (typeof spyProp === 'function') {
// If is a function
elementClass.prototype[propName] = function spyFunc() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return spyProp.call.apply(spyProp, [this, originDescriptor].concat(args));
};
} else {
// Otherwise tread as a property
Object.defineProperty(elementClass.prototype, propName, _objectSpread({}, spyProp, {
set: function set(value) {
if (spyProp.set) {
return spyProp.set.call(this, originDescriptor, value);
}
return originDescriptor.set(value);
},
get: function get() {
if (spyProp.get) {
return spyProp.get.call(this, originDescriptor);
}
return originDescriptor.get();
},
configurable: true
}));
}
});
return {
mockRestore: function mockRestore() {
propNames.forEach(function (propName) {
var originDescriptor = originDescriptors[propName];
if (originDescriptor === NO_EXIST) {
delete elementClass.prototype[propName];
} else if (typeof originDescriptor === 'function') {
elementClass.prototype[propName] = originDescriptor;
} else {
Object.defineProperty(elementClass.prototype, propName, originDescriptor);
}
});
}
};
}
function spyElementPrototype(Element, propName, property) {
return spyElementPrototypes(Element, _defineProperty({}, propName, property));
}
/* eslint-enable */

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
} // only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!_react.default.Profiler) {
return Component;
} // Here polyfill get started
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
delete prototype.componentWillReceiveProps;
return Component;
};
var _default = unsafeLifecyclesPolyfill;
exports.default = _default;

1
web/node_modules/rc-util/lib/utils/get.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function get<T = any>(entity: any, path: (string | number)[]): any;

20
web/node_modules/rc-util/lib/utils/get.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = get;
function get(entity, path) {
var current = entity;
for (var i = 0; i < path.length; i += 1) {
if (current === null || current === undefined) {
return undefined;
}
current = current[path[i]];
}
return current;
}

1
web/node_modules/rc-util/lib/utils/set.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function set<Entity = any, Output = Entity, Value = any>(entity: Entity, paths: (string | number)[], value: Value): Output;

53
web/node_modules/rc-util/lib/utils/set.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = set;
function 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; }
function _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; }
function _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; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function set(entity, paths, value) {
if (!paths.length) {
return value;
}
var _paths = _toArray(paths),
path = _paths[0],
restPath = _paths.slice(1);
var clone;
if (!entity && typeof path === 'number') {
clone = [];
} else if (Array.isArray(entity)) {
clone = _toConsumableArray(entity);
} else {
clone = _objectSpread({}, entity);
}
clone[path] = set(clone[path], restPath, value);
return clone;
}

14
web/node_modules/rc-util/lib/warn.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = warn;
function warn(msg) {
if (process.env.NODE_ENV !== 'production') {
if (typeof console !== 'undefined' && console.warn) {
console.warn(msg);
}
}
}

7
web/node_modules/rc-util/lib/warning.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export declare function warning(valid: boolean, message: string): void;
export declare function note(valid: boolean, message: string): void;
export declare function resetWarned(): void;
export declare function call(method: (valid: boolean, message: string) => void, valid: boolean, message: string): void;
export declare function warningOnce(valid: boolean, message: string): void;
export declare function noteOnce(valid: boolean, message: string): void;
export default warningOnce;

53
web/node_modules/rc-util/lib/warning.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.warning = warning;
exports.note = note;
exports.resetWarned = resetWarned;
exports.call = call;
exports.warningOnce = warningOnce;
exports.noteOnce = noteOnce;
exports.default = void 0;
/* eslint-disable no-console */
var warned = {};
function warning(valid, message) {
// Support uglify
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
console.error("Warning: ".concat(message));
}
}
function note(valid, message) {
// Support uglify
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
console.warn("Note: ".concat(message));
}
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
function warningOnce(valid, message) {
call(warning, valid, message);
}
function noteOnce(valid, message) {
call(note, valid, message);
}
var _default = warningOnce;
/* eslint-enable */
exports.default = _default;

106
web/node_modules/rc-util/package.json generated vendored Normal file
View File

@@ -0,0 +1,106 @@
{
"_from": "rc-util@^4.20.0",
"_id": "rc-util@4.20.3",
"_inBundle": false,
"_integrity": "sha512-NBBc9Ad5yGAVTp4jV+pD7tXQGqHxGM2onPSZFyVoJ5fuvRF+ZgzSjZ6RXLPE0pVVISRJ07h+APgLJPBcAeZQlg==",
"_location": "/rc-util",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "rc-util@^4.20.0",
"name": "rc-util",
"escapedName": "rc-util",
"rawSpec": "^4.20.0",
"saveSpec": null,
"fetchSpec": "^4.20.0"
},
"_requiredBy": [
"/@ant-design/icons",
"/antd",
"/rc-align",
"/rc-animate",
"/rc-cascader",
"/rc-dialog",
"/rc-drawer",
"/rc-field-form",
"/rc-input-number",
"/rc-mentions",
"/rc-menu",
"/rc-notification",
"/rc-picker",
"/rc-rate",
"/rc-resize-observer",
"/rc-select",
"/rc-slider",
"/rc-table",
"/rc-tree",
"/rc-tree-select",
"/rc-trigger",
"/rc-virtual-list"
],
"_resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.20.3.tgz",
"_shasum": "c4d4ee6171cf685dc75572752a764310325888d3",
"_spec": "rc-util@^4.20.0",
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/antd",
"bugs": {
"url": "http://github.com/react-component/util/issues"
},
"bundleDependencies": false,
"config": {
"port": 8100
},
"dependencies": {
"add-dom-event-listener": "^1.1.0",
"prop-types": "^15.5.10",
"react-is": "^16.12.0",
"react-lifecycles-compat": "^3.0.4",
"shallowequal": "^1.1.0"
},
"deprecated": false,
"description": "Common Utils For React Component",
"devDependencies": {
"@types/enzyme": "^3.10.5",
"@types/jest": "^24.0.23",
"@types/react": "^16.9.3",
"@types/react-dom": "^16.9.1",
"@types/warning": "^3.0.0",
"@umijs/fabric": "^1.2.1",
"coveralls": "^2.11.15",
"create-react-class": "^15.6.3",
"enzyme": "^3.10.0",
"eslint": "^6.6.0",
"father": "^2.14.0",
"np": "^5.0.3",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"typescript": "^3.8.3"
},
"files": [
"lib",
"es"
],
"homepage": "http://github.com/react-component/util",
"keywords": [
"react",
"util"
],
"license": "MIT",
"name": "rc-util",
"peerDependencies": {
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/react-component/util.git"
},
"scripts": {
"compile": "father build",
"coverage": "father test --coverage && cat ./coverage/lcov.info | coveralls",
"lint": "eslint src/ --ext .tsx,.ts & eslint tests/ --ext .js",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"test": "father test"
},
"version": "4.20.3"
}