@tarojs/components-react 3.5.0-beta.4 → 3.5.0-theta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image/index.js +1 -1
- package/dist/image/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index2.js.map +1 -1
- package/dist/pull-down-refresh/index.js +1 -1
- package/dist/pull-down-refresh/index.js.map +1 -1
- package/dist/scroll-view/index.js.map +1 -1
- package/dist/swiper/index.js +1 -1
- package/dist/swiper/index.js.map +1 -1
- package/dist/text/index.js +1 -1
- package/dist/text/index.js.map +1 -1
- package/dist/tslib.es6.js +17 -0
- package/dist/tslib.es6.js.map +1 -0
- package/dist/view/index.js +1 -1
- package/dist/view/index.js.map +1 -1
- package/package.json +2 -3
- package/LICENSE +0 -21
- package/dist/_tslib.js +0 -29
- package/dist/_tslib.js.map +0 -1
package/dist/text/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
3
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
4
4
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
5
|
-
import { _ as __rest } from '../
|
|
5
|
+
import { _ as __rest } from '../tslib.es6.js';
|
|
6
6
|
import '../weui.js';
|
|
7
7
|
import { s as styleInject, c as classNames } from '../index.js';
|
|
8
8
|
import React from 'react';
|
package/dist/text/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/text/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\n selectable?: boolean\n}\n\nclass Text extends React.Component<IProps, Record<string, unknown>> {\n render () {\n const { className, selectable = false, ...restProps } = this.props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls}>\n {this.props.children}\n </span>\n )\n }\n}\n\nexport default Text\n"],"names":["Text","_a","props","className","selectable","restProps","__rest","cls","classNames","React","createElement","Object","assign","children","Component"],"mappings":";;;;;;;;;;;;;IAUMA;;;;;;;;;;;;;WACJ,SAAM,MAAA,GAAA;MACE,IAAAC,KAAkD,IAAA,CAAKC,KAAvD;AAAA,UAAEC,SAAF,GAA4DF,EAA5D,CAAEE,SAAF;UAA4DF,aAAAA,GAAAA,EAA5D,CAAaG,UAAb;UAAaA,UAAb,8BAA0B,KAA1B,GAAA,aAAA;UAAoCC,SAApC,GAAAC,MAAA,CAAAL,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,CAAA,CAAA,CAAA;;AACN,MAAA,IAAMM,GAAG,GAAGC,UAAU,CACpB,WADoB,EAEpB;QACE,uBAAyBJ,EAAAA,UAAAA;OAHP,EAKpBD,SALoB,CAAtB,CAAA;AAOA,MAAA,OACEM,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EAAUP,SAAV,EAAmB;AAAEF,QAAAA,SAAS,EAAEI,GAAAA;AAAb,OAAnB,CAAA,EACG,IAAA,CAAKL,KAAL,CAAWW,QADd,CADF,CAAA;AAKD,KAAA;;;;AAfgBJ,CAAAA,CAAAA,KAAK,CAACK;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/typeof';
|
|
2
|
+
|
|
3
|
+
function __rest(s, e) {
|
|
4
|
+
var t = {};
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
11
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { __rest as _ };
|
|
17
|
+
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tslib.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
package/dist/view/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
5
5
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
6
|
-
import { _ as __rest } from '../
|
|
6
|
+
import { _ as __rest } from '../tslib.es6.js';
|
|
7
7
|
import '../weui.js';
|
|
8
8
|
import { s as styleInject, c as classNames } from '../index.js';
|
|
9
9
|
import React from 'react';
|
package/dist/view/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/view/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n}\n\ninterface IState {\n hover: boolean\n touch: boolean\n}\n\nclass View extends React.Component<IProps, IState> {\n state = {\n hover: false,\n touch: false\n }\n\n timeoutEvent: ReturnType<typeof setTimeout>\n startTime = 0\n\n render () {\n const {\n className,\n hoverClass,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n } = this.props\n\n const cls = classNames(\n '',\n {\n [`${hoverClass}`]: this.state.hover\n },\n className\n )\n\n const _onTouchStart = e => {\n if (hoverClass) {\n this.setState(() => ({\n touch: true\n }))\n setTimeout(() => {\n if (this.state.touch) {\n this.setState(() => ({\n hover: true\n }))\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (this.props.onLongPress) {\n this.timeoutEvent = setTimeout(() => {\n this.props.onLongPress!()\n }, 350)\n this.startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(this.timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - this.startTime\n if (spanTime < 350) {\n clearTimeout(this.timeoutEvent)\n }\n if (hoverClass) {\n this.setState(() => ({\n touch: false\n }))\n setTimeout(() => {\n if (!this.state.touch) {\n this.setState(() => ({\n hover: false\n }))\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n return (\n <div\n className={cls}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default View\n"],"names":["View","state","hover","touch","startTime","_a","props","className","hoverClass","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","cls","classNames","_onTouchStart","e","setState","setTimeout","onLongPress","timeoutEvent","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","React","createElement","Object","assign","children","Component"],"mappings":";;;;;;;;;;;;;;IAqBMA;;;;;EAAN,SAAA,IAAA,GAAA;AAAA,IAAA,IAAA,KAAA,CAAA;;AAAA,IAAA,eAAA,CAAA,IAAA,EAAA,IAA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AAA,KAAK,EAAE,KAAA;aADK,CAAA;WAAd,CAAA,CAAA;;AAGAkB,UAAAA,UAAU,CAAC,YAAK;AACd,YAAA,IAAI,CAAC,MAAI,CAACpB,KAAL,CAAWE,KAAhB,EAAuB;cACrB,MAAI,CAACiB,QAAL,CAAc,YAAA;gBAAA,OAAO;AACnBlB,kBAAAA,KAAK,EAAE,KAAA;iBADK,CAAA;eAAd,CAAA,CAAA;AAGD,aAAA;WALO,EAMPW,aANO,CAAV,CAAA;AAOD,SAAA;;AACDH,QAAAA,UAAU,IAAIA,UAAU,CAACS,CAAD,CAAxB,CAAA;OAjBF,CAAA;;MAoBA,OACEW,KACE,CAAAC,aADF,CACE,KADF,EACEC,MAAA,CAAAC,MAAA,CAAA;AAAA1B,QAAAA,SAAS,EAAES,GAAX;AACAP,QAAAA,YAAY,EAAES,aADd;AAEAR,QAAAA,UAAU,EAAEkB,WAFZ;AAGAjB,QAAAA,WAAW,EAAEe,YAAAA;OAHb,EAIIZ,KAJJ,CADF,EAOG,KAAKR,KAAL,CAAW4B,QAPd,CADF,CAAA;AAWD,KAAA;;;;AAvFgBJ,CAAAA,CAAAA,KAAK,CAACK;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-theta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,6 +30,5 @@
|
|
|
30
30
|
"resolve-pathname": "^3.0.0",
|
|
31
31
|
"swiper": "6.8.0",
|
|
32
32
|
"weui": "^1.1.2"
|
|
33
|
-
}
|
|
34
|
-
"gitHead": "7aca7841ed7e2af1b182ff5d24e91f44730ce783"
|
|
33
|
+
}
|
|
35
34
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/_tslib.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
-
|
|
12
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
-
and limitations under the License.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
|
-
function __rest(s, e) {
|
|
17
|
-
var t = {};
|
|
18
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
-
t[p] = s[p];
|
|
20
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
-
t[p[i]] = s[p[i]];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { __rest as _ };
|
|
29
|
-
//# sourceMappingURL=_tslib.js.map
|
package/dist/_tslib.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|