react-ui-basics 0.0.246 → 0.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animated.d.ts +36 -0
- package/Animated.js +125 -124
- package/Animated.js.map +1 -1
- package/ReactConstants.d.ts +5 -0
- package/ReactConstants.js.map +1 -1
- package/bundle.css +703 -703
- package/package.json +1 -1
- package/router/Link.js +1 -2
- package/router/Link.js.map +1 -1
- package/router/NavLink.js +1 -2
- package/router/NavLink.js.map +1 -1
- package/router/Route.d.ts +14 -0
- package/router/Route.js +163 -159
- package/router/Route.js.map +1 -1
- package/router/index.d.ts +8 -0
- package/router/index.js +3 -3
- package/router/index.js.map +1 -1
- package/src/{Animated.js → Animated.tsx} +77 -74
- package/src/ReactConstants.ts +17 -0
- package/src/router/{Route.js → Route.tsx} +50 -46
- package/src/router/index.ts +9 -0
- package/src/router/index.js +0 -9
package/Animated.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import './Animated.css';
|
|
3
|
+
import { PureComponent } from "./ReactConstants";
|
|
4
|
+
export interface AnimatedStyles {
|
|
5
|
+
mounting?: CSSProperties;
|
|
6
|
+
mounted?: CSSProperties;
|
|
7
|
+
unmounting?: CSSProperties;
|
|
8
|
+
default?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export interface AnimatedProps {
|
|
11
|
+
value: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
styles?: AnimatedStyles;
|
|
14
|
+
mountingDelay?: number;
|
|
15
|
+
unmountingDelay?: number;
|
|
16
|
+
mounting?: number;
|
|
17
|
+
unmounting?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface AnimatedState {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
mounting: boolean;
|
|
22
|
+
unmounting: boolean;
|
|
23
|
+
mounted: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare class Animated extends PureComponent<AnimatedProps, AnimatedState> {
|
|
26
|
+
static defaultProps: {
|
|
27
|
+
className: string;
|
|
28
|
+
mounting: number;
|
|
29
|
+
unmounting: number;
|
|
30
|
+
styles: {};
|
|
31
|
+
mountingDelay: number;
|
|
32
|
+
unmountingDelay: number;
|
|
33
|
+
};
|
|
34
|
+
constructor(properties: any);
|
|
35
|
+
}
|
|
36
|
+
export default Animated;
|
package/Animated.js
CHANGED
|
@@ -1,134 +1,135 @@
|
|
|
1
|
-
import ReactConstants from "./ReactConstants"; import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields"; import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers"; import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers"; import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers"; import './Animated.css'; import
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import './ReactCreateElement.js';
|
|
4
|
-
import 'prop-types';
|
|
1
|
+
import ReactConstants from "./ReactConstants"; import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields"; import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers"; import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers"; import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers"; import './Animated.css'; import React from 'react';
|
|
5
2
|
import { setOf, allPropsExcept, classNames, requestAnimationFrame, clearTimeout, setTimeout } from './Tools.js';
|
|
6
|
-
import { children, className, componentDidMount, props, componentWillUnmount, render, state, componentDidUpdate, setState
|
|
3
|
+
import { children, className, PureComponent, componentDidMount, props, componentWillUnmount, render, state, componentDidUpdate, setState } from './ReactConstants.js';
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
const mounting = 'mounting', unmounting = 'unmounting', mounted = 'mounted', enabled = 'enabled', mountingDelay = 'mountingDelay', unmountingDelay = 'unmountingDelay', timeout = 'timeout', value = 'value', selfProps = setOf([
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
'styles',
|
|
9
|
+
mountingDelay,
|
|
10
|
+
unmountingDelay,
|
|
11
|
+
mounting,
|
|
12
|
+
unmounting,
|
|
13
|
+
value,
|
|
14
|
+
]);
|
|
15
|
+
const clearTimer = that => clearTimeout(that[timeout]);
|
|
16
|
+
const animatedState = (isEnabled, isMounting, isMounted, isUnMounting) => {
|
|
17
|
+
const r = {};
|
|
18
|
+
r[enabled] = isEnabled;
|
|
19
|
+
r[mounting] = isMounting;
|
|
20
|
+
r[mounted] = isMounted;
|
|
21
|
+
r[unmounting] = isUnMounting;
|
|
22
|
+
return r;
|
|
20
23
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
r[mounting] = isMounting;
|
|
25
|
-
r[mounted] = isMounted;
|
|
26
|
-
r[unmounting] = isUnMounting;
|
|
27
|
-
return r;
|
|
24
|
+
const doMounting = (that, duration) => {
|
|
25
|
+
setState(that, animatedState(true, true, false, false));
|
|
26
|
+
that[timeout] = setTimeout(setState, duration, that, animatedState(true, false, true, false));
|
|
28
27
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const processMounting = (that, duration, mountingDelay) => {
|
|
29
|
+
const _state = state(that);
|
|
30
|
+
if (_state[mounting] || _state[mounted])
|
|
31
|
+
return;
|
|
32
|
+
clearTimer(that);
|
|
33
|
+
if (_state[unmounting])
|
|
34
|
+
return doMounting(that, duration);
|
|
35
|
+
if (mountingDelay) {
|
|
36
|
+
that[timeout] = setTimeout(() => {
|
|
37
|
+
if (state(that)[mounted])
|
|
38
|
+
return;
|
|
39
|
+
doMounting(that, duration);
|
|
40
|
+
}, mountingDelay);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
doMounting(that, duration);
|
|
44
|
+
}
|
|
32
45
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
clearTimer(that);
|
|
37
|
-
if (_state[unmounting]) return doMounting(that, duration);
|
|
38
|
-
if (mountingDelay) {
|
|
39
|
-
that[timeout] = setTimeout(function () {
|
|
40
|
-
if (state(that)[mounted]) return;
|
|
41
|
-
doMounting(that, duration);
|
|
42
|
-
}, mountingDelay);
|
|
43
|
-
} else {
|
|
44
|
-
doMounting(that, duration);
|
|
45
|
-
}
|
|
46
|
+
const doUnmounting = (that, duration) => {
|
|
47
|
+
setState(that, animatedState(true, false, false, true));
|
|
48
|
+
that[timeout] = setTimeout(setState, duration, that, animatedState(false, false, false, false));
|
|
46
49
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
const processUnmounting = (that, duration, unmountingDelay) => {
|
|
51
|
+
const _state = state(that);
|
|
52
|
+
if (_state[unmounting])
|
|
53
|
+
return;
|
|
54
|
+
clearTimer(that);
|
|
55
|
+
if (_state[mounting])
|
|
56
|
+
return doUnmounting(that, duration);
|
|
57
|
+
if (unmountingDelay) {
|
|
58
|
+
that[timeout] = setTimeout(() => {
|
|
59
|
+
if (props(that)[value])
|
|
60
|
+
return;
|
|
61
|
+
doUnmounting(that, duration);
|
|
62
|
+
}, unmountingDelay);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
doUnmounting(that, duration);
|
|
66
|
+
}
|
|
50
67
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
doUnmounting(that, duration);
|
|
60
|
-
}, unmountingDelay);
|
|
61
|
-
} else {
|
|
62
|
-
doUnmounting(that, duration);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var Animated = function (_PureComponent) {
|
|
66
|
-
_inherits(Animated, _PureComponent);
|
|
67
|
-
var _super = _createSuper(Animated);
|
|
68
|
-
function Animated(properties) {
|
|
69
|
-
var _this;
|
|
70
|
-
_classCallCheck(this, Animated);
|
|
71
|
-
_this = _super.call(this, properties);
|
|
72
|
-
var that = _assertThisInitialized(_this);
|
|
73
|
-
that.state = animatedState(!!properties[value]);
|
|
74
|
-
that[ReactConstants[0]] = function () {
|
|
75
|
-
var _props = props(that);
|
|
76
|
-
if (!!_props[value]) processMounting(that, _props[mounting], _props[mountingDelay]);
|
|
77
|
-
};
|
|
78
|
-
that[ReactConstants[1]] = function () {
|
|
79
|
-
clearTimer(that);
|
|
80
|
-
};
|
|
81
|
-
that[ReactConstants[3]] = function () {
|
|
82
|
-
var _state = state(that);
|
|
83
|
-
if (!_state[enabled]) return null;
|
|
84
|
-
var _props = props(that),
|
|
85
|
-
styles = _props.styles,
|
|
86
|
-
isMounting = _state[mounting],
|
|
87
|
-
isUnMounting = _state[unmounting],
|
|
88
|
-
isMounted = _state[mounted];
|
|
89
|
-
var childStyles = styles["default"];
|
|
90
|
-
if (isMounting) childStyles = styles[mounting];else if (isUnMounting) childStyles = styles[unmounting];else if (isMounted) childStyles = styles[mounted] || styles[mounting];
|
|
91
|
-
var otherProps = allPropsExcept(_props, selfProps);
|
|
92
|
-
return React.Children.map(_props[ReactConstants[4]], function (child) {
|
|
93
|
-
var _objectSpread2$1;
|
|
94
|
-
return child && React.cloneElement(child, _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, className, classNames(props(child)[ReactConstants[5]], _props[ReactConstants[5]], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting)), _defineProperty(_objectSpread2$1, "style", _objectSpread2(_objectSpread2({}, __style(props(child))), childStyles)), _objectSpread2$1), otherProps));
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
that[ReactConstants[2]] = function () {
|
|
98
|
-
var p = props;
|
|
99
|
-
var t = that;
|
|
100
|
-
var _props = p(t) || props(that),
|
|
101
|
-
_state = state(that),
|
|
102
|
-
v = _props[value],
|
|
103
|
-
mountingDuration = _props[mounting],
|
|
104
|
-
unmountingDuration = _props[unmounting],
|
|
105
|
-
isMounting = _state[mounting],
|
|
106
|
-
isUnMounting = _state[unmounting],
|
|
107
|
-
isMounted = _state[mounted],
|
|
108
|
-
isEnabled = _state[enabled];
|
|
109
|
-
if (isUnMounting && v) return processMounting(that, mountingDuration, _props[mountingDelay]);
|
|
110
|
-
if (isMounting && !v) return processUnmounting(that, unmountingDuration, _props[unmountingDelay]);
|
|
111
|
-
var toggled = isEnabled && !v || !isEnabled && !!v;
|
|
112
|
-
if (toggled) {
|
|
113
|
-
if (!!v) {
|
|
114
|
-
setState(that, animatedState(true));
|
|
115
|
-
} else processUnmounting(that, unmountingDuration, _props[unmountingDelay]);
|
|
116
|
-
} else {
|
|
117
|
-
if (isEnabled && !isMounting && !isMounted && !isUnMounting) {
|
|
118
|
-
requestAnimationFrame(function () {
|
|
119
|
-
return requestAnimationFrame(function () {
|
|
120
|
-
return processMounting(that, mountingDuration, _props[mountingDelay]);
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
68
|
+
class Animated extends PureComponent {
|
|
69
|
+
static defaultProps = {
|
|
70
|
+
[ReactConstants[5]]: 'animated',
|
|
71
|
+
[mounting]: 250,
|
|
72
|
+
[unmounting]: 250,
|
|
73
|
+
styles: {},
|
|
74
|
+
[mountingDelay]: 0,
|
|
75
|
+
[unmountingDelay]: 0,
|
|
125
76
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
77
|
+
constructor(properties) {
|
|
78
|
+
super(properties);
|
|
79
|
+
const that = this;
|
|
80
|
+
that.state = animatedState(!!properties[value]);
|
|
81
|
+
that[ReactConstants[0]] = () => {
|
|
82
|
+
const _props = props(that);
|
|
83
|
+
if (!!_props[value])
|
|
84
|
+
processMounting(that, _props[mounting], _props[mountingDelay]);
|
|
85
|
+
};
|
|
86
|
+
that[ReactConstants[1]] = () => {
|
|
87
|
+
clearTimer(that);
|
|
88
|
+
};
|
|
89
|
+
that[ReactConstants[3]] = () => {
|
|
90
|
+
const _state = state(that);
|
|
91
|
+
if (!_state[enabled])
|
|
92
|
+
return null;
|
|
93
|
+
const _props = props(that), { styles } = _props, { [mounting]: isMounting, [unmounting]: isUnMounting, [mounted]: isMounted, } = _state;
|
|
94
|
+
let childStyles = styles.default;
|
|
95
|
+
if (isMounting)
|
|
96
|
+
childStyles = styles[mounting];
|
|
97
|
+
else if (isUnMounting)
|
|
98
|
+
childStyles = styles[unmounting];
|
|
99
|
+
else if (isMounted)
|
|
100
|
+
childStyles = styles[mounted] || styles[mounting];
|
|
101
|
+
const otherProps = allPropsExcept(_props, selfProps);
|
|
102
|
+
return React.Children.map(_props[ReactConstants[4]], child => child && React.cloneElement(child, {
|
|
103
|
+
[ReactConstants[5]]: classNames(props(child)[ReactConstants[5]], _props[ReactConstants[5]], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting),
|
|
104
|
+
// @ts-ignore
|
|
105
|
+
style: { ...__style(props(child)), ...childStyles },
|
|
106
|
+
...otherProps,
|
|
107
|
+
}));
|
|
108
|
+
};
|
|
109
|
+
that[ReactConstants[2]] = () => {
|
|
110
|
+
const _props = props(that), _state = state(that), { [value]: v, [mounting]: mountingDuration, [unmounting]: unmountingDuration, } = _props, { [mounting]: isMounting, [unmounting]: isUnMounting, [mounted]: isMounted, [enabled]: isEnabled, } = _state;
|
|
111
|
+
if (isUnMounting && v)
|
|
112
|
+
return processMounting(that, mountingDuration, _props[mountingDelay]);
|
|
113
|
+
if (isMounting && !v)
|
|
114
|
+
return processUnmounting(that, unmountingDuration, _props[unmountingDelay]);
|
|
115
|
+
let toggled = (isEnabled && !v) || (!isEnabled && !!v);
|
|
116
|
+
if (toggled) {
|
|
117
|
+
if (!!v) {
|
|
118
|
+
// just set enable to true and wait until react will mount children
|
|
119
|
+
setState(that, animatedState(true));
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
processUnmounting(that, unmountingDuration, _props[unmountingDelay]);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (isEnabled && !isMounting && !isMounted && !isUnMounting) {
|
|
126
|
+
// react requires a delay to mount children, one requestAnimationFrame is not enough
|
|
127
|
+
requestAnimationFrame(() => requestAnimationFrame(() => processMounting(that, mountingDuration, _props[mountingDelay])));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
132
133
|
|
|
133
|
-
export { Animated
|
|
134
|
+
export { Animated as default };
|
|
134
135
|
//# sourceMappingURL=Animated.js.map
|
package/Animated.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Animated.js","sources":["./src/Animated.js"],"sourcesContent":["import React from 'react';\nimport ReactCreateElement from './ReactCreateElement';\nimport PropTypes from 'prop-types';\nimport './Animated.css'\nimport {allPropsExcept, classNames, setOf, setTimeout, requestAnimationFrame, clearTimeout} from \"./Tools\";\nimport {props, state, setState, componentWillUnmount, componentDidMount, render, componentDidUpdate, className, children, PureComponent} from \"./ReactConstants\";\n\nlet mounting = 'mounting',\n unmounting = 'unmounting',\n mounted = 'mounted',\n enabled = 'enabled',\n mountingDelay = 'mountingDelay',\n unmountingDelay = 'unmountingDelay',\n timeout = 'timeout',\n value = 'value'\n;\n\nconst selfProps = setOf([\n children,\n className,\n 'styles',\n mountingDelay,\n unmountingDelay,\n mounting,\n unmounting,\n value,\n]);\n\nconst clearTimer = that => clearTimeout(that[timeout]);\n\nconst animatedState = (isEnabled, isMounting, isMounted, isUnMounting) => {\n const r = {};\n r[enabled] = isEnabled;\n r[mounting] = isMounting;\n r[mounted] = isMounted;\n r[unmounting] = isUnMounting;\n return r;\n};\n\nconst doMounting = (that, duration) => {\n setState(that, animatedState(true, true, false, false));\n\n that[timeout] = setTimeout(setState, duration, that, animatedState(true, false, true, false))\n};\n\nconst processMounting = (that, duration, mountingDelay) => {\n const _state = state(that);\n if (_state[mounting] || _state[mounted]) return;\n clearTimer(that);\n\n if (_state[unmounting])\n return doMounting(that, duration);\n\n if (mountingDelay) {\n that[timeout] = setTimeout(() => {\n if (state(that)[mounted]) return;\n doMounting(that, duration)\n }, mountingDelay);\n } else {\n doMounting(that, duration);\n }\n};\n\nconst doUnmounting = (that, duration) => {\n setState(that, animatedState(true, false, false, true));\n that[timeout] = setTimeout(setState, duration, that, animatedState(false, false, false, false));\n};\n\nconst processUnmounting = (that, duration, unmountingDelay) => {\n const _state = state(that);\n if (_state[unmounting]) return;\n clearTimer(that);\n\n if (_state[mounting])\n return doUnmounting(that, duration);\n\n if (unmountingDelay) {\n that[timeout] = setTimeout(() => {\n if (props(that)[value]) return;\n doUnmounting(that, duration);\n }, unmountingDelay);\n } else {\n doUnmounting(that, duration);\n }\n};\n\nclass Animated extends PureComponent {\n\n constructor(properties) {\n super(properties);\n const that = this;\n that.state = animatedState(!!properties[value]);\n\n that[componentDidMount] = () => {\n const _props = props(that);\n if (!!_props[value])\n processMounting(that, _props[mounting], _props[mountingDelay])\n };\n\n that[componentWillUnmount] = () => {\n clearTimer(that)\n };\n\n that[render] = () => {\n const _state = state(that);\n if (!_state[enabled]) return null;\n\n const _props = props(that),\n {styles} = _props,\n {\n [mounting]: isMounting,\n [unmounting]: isUnMounting,\n [mounted]: isMounted,\n } = _state;\n\n let childStyles = styles.default;\n if (isMounting)\n childStyles = styles[mounting];\n else if (isUnMounting)\n childStyles = styles[unmounting];\n else if (isMounted)\n childStyles = styles[mounted] || styles[mounting];\n\n const otherProps = allPropsExcept(_props, selfProps);\n return React.Children.map(_props[children], child =>\n child && React.cloneElement(child, {\n [className]: classNames(\n props(child)[className],\n _props[className],\n isMounting && mounting,\n isMounted && mounted,\n isUnMounting && unmounting\n ),\n style: {...props(child).style, ...childStyles},\n ...otherProps,\n }));\n };\n\n that[componentDidUpdate] = () => {\n const p = props;\n const t = that;\n const _props = p(t)||props(that),\n _state = state(that),\n {\n [value]: v,\n [mounting]: mountingDuration,\n [unmounting]: unmountingDuration,\n } = _props,\n {\n [mounting]: isMounting,\n [unmounting]: isUnMounting,\n [mounted]: isMounted,\n [enabled]: isEnabled,\n } = _state;\n\n if (isUnMounting && v)\n return processMounting(that, mountingDuration, _props[mountingDelay]);\n if (isMounting && !v)\n return processUnmounting(that, unmountingDuration, _props[unmountingDelay]);\n\n let toggled = (isEnabled && !v) || (!isEnabled && !!v);\n if (toggled) {\n if (!!v) {\n // just set enable to true and wait until react will mount children\n setState(that, animatedState(true))\n } else\n processUnmounting(that, unmountingDuration, _props[unmountingDelay]);\n } else {\n if (isEnabled && !isMounting && !isMounted && !isUnMounting) {\n // react requires a delay to mount children, one requestAnimationFrame is not enough\n requestAnimationFrame(() => requestAnimationFrame(() => processMounting(that, mountingDuration, _props[mountingDelay])))\n }\n }\n }\n }\n}\n\nif (window.isNotProductionEnvironment) {\n Animated.propTypes = {\n [value]: PropTypes.bool,\n [className]: PropTypes.string,\n styles: PropTypes.shape({\n [mounting]: PropTypes.object,\n [mounted]: PropTypes.object,\n [unmounting]: PropTypes.object,\n }),\n [mountingDelay]: PropTypes.number,\n [unmountingDelay]: PropTypes.number,\n [mounting]: PropTypes.number,\n [unmounting]: PropTypes.number,\n };\n}\n\nAnimated.defaultProps = {\n [className]: 'animated',\n [mounting]: 250,\n [unmounting]: 250,\n styles: {},\n [mountingDelay]: 0,\n [unmountingDelay]: 0,\n};\n\n// forcing webpack to NOT inline constant fields\n// mounting = mounting || 1;\n// mounted = mounted || 1;\n// unmounting = unmounting || 1;\n// enabled = enabled || 1;\n// mountingDelay = mountingDelay || 1;\n// unmountingDelay = unmountingDelay || 1;\n// value = value || 1;\n// timeout = timeout || 1;\n\nexport default Animated"],"names":["mounting","unmounting","mounted","enabled","mountingDelay","unmountingDelay","timeout","value","selfProps","setOf","children","className","clearTimer","that","clearTimeout","animatedState","isEnabled","isMounting","isMounted","isUnMounting","r","doMounting","duration","setState","setTimeout","processMounting","_state","state","doUnmounting","processUnmounting","props","Animated","_PureComponent","_inherits","_super","_createSuper","properties","_this","_classCallCheck","call","_assertThisInitialized","componentDidMount","_props","componentWillUnmount","render","styles","childStyles","otherProps","allPropsExcept","React","Children","map","child","_objectSpread2","cloneElement","_objectSpread","_defineProperty","classNames","style","componentDidUpdate","p","t","v","mountingDuration","unmountingDuration","toggled","requestAnimationFrame","_createClass","PureComponent","defaultProps","_Animated$defaultProp"],"mappings":";;;;;;;;AAOA,IAAIA,QAAQ,GAAG,UAAU;AACrBC,EAAAA,UAAU,GAAG,YAAY;AACzBC,EAAAA,OAAO,GAAG,SAAS;AACnBC,EAAAA,OAAO,GAAG,SAAS;AACnBC,EAAAA,aAAa,GAAG,eAAe;AAC/BC,EAAAA,eAAe,GAAG,iBAAiB;AACnCC,EAAAA,OAAO,GAAG,SAAS;AACnBC,EAAAA,KAAK,GAAG,OAAO,CAAA;AAGnB,IAAMC,SAAS,GAAGC,KAAK,CAAC,CACpBC,QAAQ,EACRC,SAAS,EACT,QAAQ,EACRP,aAAa,EACbC,eAAe,EACfL,QAAQ,EACRC,UAAU,EACVM,KAAK,CACR,CAAC,CAAA;AAEF,IAAMK,UAAU,GAAG,SAAbA,UAAUA,CAAGC,IAAI,EAAA;AAAA,EAAA,OAAIC,YAAY,CAACD,IAAI,CAACP,OAAO,CAAC,CAAC,CAAA;AAAA,CAAA,CAAA;AAEtD,IAAMS,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,SAAS,EAAEC,UAAU,EAAEC,SAAS,EAAEC,YAAY,EAAK;EACtE,IAAMC,CAAC,GAAG,EAAE,CAAA;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AAC,CAAC,CAAA;AAC3H,iBAAA;AACJ,aAAA;AACL,SAAC,CAAA;KACJ;;;;;"}
|
package/ReactConstants.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare const propsGetter: <P>(that: React.Component<P>) => (() => P);
|
|
|
4
4
|
export declare const state: <P, S>(that: React.Component<P, S>) => S;
|
|
5
5
|
export declare const setState: (that: React.Component, data: any, cb?: any) => void;
|
|
6
6
|
export declare const stateFieldSetter: (that: any, key: any, cb?: () => void) => (value: any, cb2?: any) => void;
|
|
7
|
+
export type Callback = () => void;
|
|
8
|
+
export declare function createStateGetterSetter<C extends React.Component, K extends keyof C["state"]>(that: C, key: K, cb?: Callback): {
|
|
9
|
+
(): C["state"][K];
|
|
10
|
+
(value: C["state"][K], cb2?: Callback): void;
|
|
11
|
+
};
|
|
7
12
|
type GetterSetter<T> = (v?: T, cb?: () => void) => T;
|
|
8
13
|
export declare const stateGS: (<T>(that: React.Component) => GetterSetter<T>);
|
|
9
14
|
type TupleToGetterSetter<T extends any[]> = {
|
package/ReactConstants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactConstants.js","sources":["./src/ReactConstants.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,MAAM,KAAK,GAAG,EAAE,CAAC;AACJ,MAAA,KAAK,GAAuC,IAAI,IAAI,IAAI,CAAC,MAAM;AACrE,MAAM,WAAW,GAA+C,IAAI,IAAI,MAAM,KAAK,CAAC,IAAI,EAAE;AACjG;AACO,MAAM,KAAK,GAA6C,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM;AAC9E,MAAA,QAAQ,GAAG,CAAC,IAAqB,EAAE,IAAI,EAAE,EAAG,KAAI;AACzD,IAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC5B,EAAE;AACW,MAAA,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,EAAe,KAAK,CAAC,KAAK,EAA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