@tarojs/components-advanced 3.6.2 → 3.6.4
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/LICENSE +21 -0
- package/dist/_virtual/_commonjsHelpers.js +35 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/arrayLikeToArray.js +7 -0
- package/dist/_virtual/arrayLikeToArray.js.map +1 -0
- package/dist/_virtual/arrayLikeToArray2.js +4 -0
- package/dist/_virtual/arrayLikeToArray2.js.map +1 -0
- package/dist/_virtual/arrayWithoutHoles.js +7 -0
- package/dist/_virtual/arrayWithoutHoles.js.map +1 -0
- package/dist/_virtual/arrayWithoutHoles2.js +4 -0
- package/dist/_virtual/arrayWithoutHoles2.js.map +1 -0
- package/dist/_virtual/assertThisInitialized.js +7 -0
- package/dist/_virtual/assertThisInitialized.js.map +1 -0
- package/dist/_virtual/assertThisInitialized2.js +4 -0
- package/dist/_virtual/assertThisInitialized2.js.map +1 -0
- package/dist/_virtual/classCallCheck.js +4 -0
- package/dist/_virtual/classCallCheck.js.map +1 -0
- package/dist/_virtual/createClass.js +4 -0
- package/dist/_virtual/createClass.js.map +1 -0
- package/dist/_virtual/createSuper.js +4 -0
- package/dist/_virtual/createSuper.js.map +1 -0
- package/dist/_virtual/defineProperty.js +4 -0
- package/dist/_virtual/defineProperty.js.map +1 -0
- package/dist/_virtual/defineProperty2.js +7 -0
- package/dist/_virtual/defineProperty2.js.map +1 -0
- package/dist/_virtual/getPrototypeOf.js +7 -0
- package/dist/_virtual/getPrototypeOf.js.map +1 -0
- package/dist/_virtual/getPrototypeOf2.js +4 -0
- package/dist/_virtual/getPrototypeOf2.js.map +1 -0
- package/dist/_virtual/index.esm.js +7 -0
- package/dist/_virtual/index.esm.js.map +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/inherits.js +4 -0
- package/dist/_virtual/inherits.js.map +1 -0
- package/dist/_virtual/isNativeReflectConstruct.js +7 -0
- package/dist/_virtual/isNativeReflectConstruct.js.map +1 -0
- package/dist/_virtual/isNativeReflectConstruct2.js +4 -0
- package/dist/_virtual/isNativeReflectConstruct2.js.map +1 -0
- package/dist/_virtual/iterableToArray.js +7 -0
- package/dist/_virtual/iterableToArray.js.map +1 -0
- package/dist/_virtual/iterableToArray2.js +4 -0
- package/dist/_virtual/iterableToArray2.js.map +1 -0
- package/dist/_virtual/nonIterableSpread.js +7 -0
- package/dist/_virtual/nonIterableSpread.js.map +1 -0
- package/dist/_virtual/nonIterableSpread2.js +4 -0
- package/dist/_virtual/nonIterableSpread2.js.map +1 -0
- package/dist/_virtual/objectSpread2.js +4 -0
- package/dist/_virtual/objectSpread2.js.map +1 -0
- package/dist/_virtual/possibleConstructorReturn.js +7 -0
- package/dist/_virtual/possibleConstructorReturn.js.map +1 -0
- package/dist/_virtual/possibleConstructorReturn2.js +4 -0
- package/dist/_virtual/possibleConstructorReturn2.js.map +1 -0
- package/dist/_virtual/runtime.esm.js +7 -0
- package/dist/_virtual/runtime.esm.js.map +1 -0
- package/dist/_virtual/setPrototypeOf.js +7 -0
- package/dist/_virtual/setPrototypeOf.js.map +1 -0
- package/dist/_virtual/setPrototypeOf2.js +4 -0
- package/dist/_virtual/setPrototypeOf2.js.map +1 -0
- package/dist/_virtual/toConsumableArray.js +4 -0
- package/dist/_virtual/toConsumableArray.js.map +1 -0
- package/dist/_virtual/typeof.js +4 -0
- package/dist/_virtual/typeof.js.map +1 -0
- package/dist/_virtual/typeof2.js +7 -0
- package/dist/_virtual/typeof2.js.map +1 -0
- package/dist/_virtual/unsupportedIterableToArray.js +7 -0
- package/dist/_virtual/unsupportedIterableToArray.js.map +1 -0
- package/dist/_virtual/unsupportedIterableToArray2.js +4 -0
- package/dist/_virtual/unsupportedIterableToArray2.js.map +1 -0
- package/dist/components/virtual-list/index.d.ts +29 -0
- package/dist/components/virtual-list/index.js.map +1 -1
- package/dist/components/virtual-list/react/index.js +1 -1
- package/dist/components/virtual-list/react/list.js +3 -5
- package/dist/components/virtual-list/react/list.js.map +1 -1
- package/dist/components/virtual-list/utils.js +4 -3
- package/dist/components/virtual-list/utils.js.map +1 -1
- package/dist/components/virtual-list/vue/list.js +8 -6
- package/dist/components/virtual-list/vue/list.js.map +1 -1
- package/dist/components/virtual-list/vue/render.js +1 -1
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +21 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +20 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/assertThisInitialized.js +19 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/assertThisInitialized.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/classCallCheck.js +17 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/classCallCheck.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/createClass.js +30 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/createClass.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/createSuper.js +43 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/createSuper.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/defineProperty.js +26 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/defineProperty.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/getPrototypeOf.js +18 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/getPrototypeOf.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/inherits.js +34 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/inherits.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +24 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/iterableToArray.js +15 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/iterableToArray.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/nonIterableSpread.js +15 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/nonIterableSpread.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/objectSpread2.js +42 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/objectSpread2.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +31 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/setPrototypeOf.js +19 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/setPrototypeOf.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/toConsumableArray.js +35 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/toConsumableArray.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/typeof.js +21 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/typeof.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +25 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js +221 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/packages/taro/index.js +23 -0
- package/dist/packages/taro/index.js.map +1 -0
- package/dist/packages/taro-api/dist/index.esm.js +861 -0
- package/dist/packages/taro-api/dist/index.esm.js.map +1 -0
- package/dist/packages/taro-runtime/dist/runtime.esm.js +4107 -0
- package/dist/packages/taro-runtime/dist/runtime.esm.js.map +1 -0
- package/dist/utils/timer.js +4 -4
- package/dist/utils/timer.js.map +1 -1
- package/package.json +6 -5
package/LICENSE
CHANGED
|
@@ -137,3 +137,24 @@ MIT (miniprogram-render):
|
|
|
137
137
|
The following files embed [miniprogram-render](https://github.com/Tencent/kbone) MIT:
|
|
138
138
|
`/packages/taro-plugin-http/src/runtime/Cookie.ts`
|
|
139
139
|
See `/LICENSE` for details of the license.
|
|
140
|
+
|
|
141
|
+
==================
|
|
142
|
+
|
|
143
|
+
MIT (stencil-ds-output-targets):
|
|
144
|
+
The following files embed [stencil-ds-output-targets](https://github.com/ionic-team/stencil-ds-output-targets/) MIT:
|
|
145
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/attachProps.ts`
|
|
146
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/case.ts`
|
|
147
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/dev.ts`
|
|
148
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/index.tsx`
|
|
149
|
+
`/packages/taro-components-library-react/src/react-component-lib/createComponent.tsx`
|
|
150
|
+
`/packages/taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx`
|
|
151
|
+
`/packages/taro-components-library-react/src/react-component-lib/interfaces.ts`
|
|
152
|
+
`/packages/taro-components-library-vue3/src/vue-component-lib/utils.ts`
|
|
153
|
+
See `/LICENSE` for details of the license.
|
|
154
|
+
|
|
155
|
+
==================
|
|
156
|
+
|
|
157
|
+
MIT (stencil-vue2-output-target):
|
|
158
|
+
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
|
+
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
|
+
See `/LICENSE` for details of the license.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
8
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
12
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function getAugmentedNamespace(n) {
|
|
16
|
+
if (n.__esModule) return n;
|
|
17
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
18
|
+
Object.keys(n).forEach(function (k) {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
20
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return n[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return a;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function commonjsRequire (path) {
|
|
31
|
+
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { commonjsGlobal, commonjsRequire, getAugmentedNamespace, getDefaultExportFromCjs, getDefaultExportFromNamespaceIfNotNamed, getDefaultExportFromNamespaceIfPresent };
|
|
35
|
+
//# sourceMappingURL=_commonjsHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayLikeToArray.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayLikeToArray2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayWithoutHoles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayWithoutHoles2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/assertThisInitialized.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var exports = assertThisInitialized$1.exports;
|
|
6
|
+
export { exports as default };
|
|
7
|
+
//# sourceMappingURL=assertThisInitialized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertThisInitialized.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertThisInitialized2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classCallCheck.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createClass.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSuper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineProperty.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineProperty2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPrototypeOf.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPrototypeOf2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getAugmentedNamespace } from './_commonjsHelpers.js';
|
|
2
|
+
import * as index_esm from '../packages/taro-api/dist/index.esm.js';
|
|
3
|
+
|
|
4
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(index_esm);
|
|
5
|
+
|
|
6
|
+
export { require$$1 as default };
|
|
7
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherits.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var exports = isNativeReflectConstruct$1.exports;
|
|
6
|
+
export { exports as default };
|
|
7
|
+
//# sourceMappingURL=isNativeReflectConstruct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNativeReflectConstruct.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNativeReflectConstruct2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterableToArray.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterableToArray2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nonIterableSpread.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nonIterableSpread2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectSpread2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var exports = possibleConstructorReturn$1.exports;
|
|
6
|
+
export { exports as default };
|
|
7
|
+
//# sourceMappingURL=possibleConstructorReturn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"possibleConstructorReturn.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"possibleConstructorReturn2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getAugmentedNamespace } from './_commonjsHelpers.js';
|
|
2
|
+
import * as runtime_esm from '../packages/taro-runtime/dist/runtime.esm.js';
|
|
3
|
+
|
|
4
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(runtime_esm);
|
|
5
|
+
|
|
6
|
+
export { require$$0 as default };
|
|
7
|
+
//# sourceMappingURL=runtime.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setPrototypeOf.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setPrototypeOf2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toConsumableArray.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeof.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeof2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../node_modules/.pnpm/registry.npmjs.org_@babel_runtime@7.18.3/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var exports = unsupportedIterableToArray$1.exports;
|
|
6
|
+
export { exports as default };
|
|
7
|
+
//# sourceMappingURL=unsupportedIterableToArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupportedIterableToArray.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupportedIterableToArray2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -188,6 +188,35 @@ declare namespace VirtualListProps {
|
|
|
188
188
|
* @see https://taro-docs.jd.com/docs/virtual-list
|
|
189
189
|
*/
|
|
190
190
|
declare class VirtualListComponent extends Component<VirtualListProps> {
|
|
191
|
+
/**
|
|
192
|
+
* 滚动到指定的地点。
|
|
193
|
+
*/
|
|
194
|
+
/**
|
|
195
|
+
* 滚动到指定的地点。
|
|
196
|
+
*/
|
|
197
|
+
scrollTo(scrollOffset: number): void;
|
|
198
|
+
/** 滚动到指定的条目。
|
|
199
|
+
* @param index 指定条目的索引。
|
|
200
|
+
* @param align 滚动到指定条目时,指定条目的位置。默认值为 auto。
|
|
201
|
+
*
|
|
202
|
+
* - start:指定条目在可视区域的顶部。
|
|
203
|
+
* - end:指定条目在可视区域的底部。
|
|
204
|
+
* - center:指定条目在可视区域的中间。
|
|
205
|
+
* - auto:尽可能滚动距离最小保证条目在可视区域中,如果已经在可视区域,就不滚动。
|
|
206
|
+
* - smart:条目如果已经在可视区域,就不滚动;如果有部分在可视区域,尽可能滚动距离最小保证条目在可视区域中;如果条目完全不在可视区域,那就滚动到条目在可视区域居中显示。
|
|
207
|
+
*/
|
|
208
|
+
/** 滚动到指定的条目。
|
|
209
|
+
* @param index 指定条目的索引。
|
|
210
|
+
* @param align 滚动到指定条目时,指定条目的位置。默认值为 auto。
|
|
211
|
+
*
|
|
212
|
+
* - start:指定条目在可视区域的顶部。
|
|
213
|
+
* - end:指定条目在可视区域的底部。
|
|
214
|
+
* - center:指定条目在可视区域的中间。
|
|
215
|
+
* - auto:尽可能滚动距离最小保证条目在可视区域中,如果已经在可视区域,就不滚动。
|
|
216
|
+
* - smart:条目如果已经在可视区域,就不滚动;如果有部分在可视区域,尽可能滚动距离最小保证条目在可视区域中;如果条目完全不在可视区域,那就滚动到条目在可视区域居中显示。
|
|
217
|
+
*/
|
|
218
|
+
scrollToItem(index: number, align: 'start' | 'end' | 'center' | 'auto' | 'smart'): void;
|
|
191
219
|
}
|
|
220
|
+
type VirtualList = VirtualListComponent;
|
|
192
221
|
declare const VirtualList: typeof VirtualListComponent;
|
|
193
222
|
export { VirtualList as default, VirtualList, VirtualListProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/virtual-list/index.ts"],"sourcesContent":["import type { BaseEventOrig, BaseEventOrigFunction, ScrollViewProps, StandardProps } from '@tarojs/components'\nimport type { Component, ComponentType, CSSProperties, ReactNode } from 'react'\n\ninterface VirtualListProps extends Omit<StandardProps, 'children'> {\n /** 列表的高度。 */\n height: string | number\n /** 列表的宽度。 */\n width: string | number\n /** 子组件 */\n item: ComponentType<{\n /** 组件 ID */\n id: string\n /** 单项的样式,样式必须传入组件的 style 中 */\n style?: CSSProperties\n /** 组件渲染的数据 */\n data: any\n /** 组件渲染数据的索引 */\n index: number\n /** 组件是否正在滚动,当 useIsScrolling 值为 true 时返回布尔值,否则返回 undefined */\n isScrolling?: boolean\n }>\n /** 列表的长度 */\n itemCount: number\n /** 渲染数据 */\n itemData: any[]\n /** 列表单项的大小,垂直滚动时为高度,水平滚动时为宽度。\n *\n * > Note:\n * > - unlimitedSize 模式下如果传入函数,只会调用一次用于设置初始值\n * > - 非 unlimitedSize 模式下如果传入函数,为避免性能问题,每个节点只会调用一次用于设置初始值\n */\n itemSize: number | ((index?: number, itemData?: any[]) => number)\n /** 解开高度列表单项大小限制,默认值使用: itemSize (请注意,初始高度与实际高度差异过大会导致隐患)。\n *\n * > Note: 通过 itemSize 设置的初始高度与子节点实际高度差异过大会导致隐患\n * @default false\n */\n unlimitedSize?: boolean\n /** 布局方式\n * @default \"absolute\"\n */\n position?: 'absolute' | 'relative'\n /** 初始滚动偏移值,水平滚动影响 scrollLeft,垂直滚动影响 scrollTop。 */\n initialScrollOffset?: number\n /** 列表内部容器组件类型。\n * @default View\n */\n innerElementType?: ComponentType\n /** 通过 ScrollViewContext 优化组件滚动性能\n * @default false\n * @note 部分平台不支持,使用时请注意甄别\n */\n enhanced?: boolean\n /** 顶部区域 */\n renderTop?: ReactNode\n /** 底部区域 */\n renderBottom?: ReactNode\n /** 滚动方向。vertical 为垂直滚动,horizontal 为平行滚动。\n * @default \"vertical\"\n */\n layout?: 'vertical' | 'horizontal'\n /** 列表滚动时调用函数 */\n onScroll?: (event: VirtualListProps.IVirtualListEvent<VirtualListProps.IVirtualListEventDetail>) => void\n /** 调用平台原生的滚动监听函数。 */\n onScrollNative?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>\n /** 在可视区域之外渲染的列表单项数量,值设置得越高,快速滚动时出现白屏的概率就越小,相应地,每次滚动的性能会变得越差。 */\n overscanCount?: number\n /** 上下滚动预占位节点 */\n placeholderCount?: number\n /** 是否注入 isScrolling 属性到 item 组件。这个参数一般用于实现滚动骨架屏(或其它 placeholder) 时比较有用。 */\n useIsScrolling?: boolean\n style?: CSSProperties\n}\n\ndeclare namespace VirtualListProps {\n interface IVirtualListEventDetail extends ScrollViewProps.onScrollDetail {\n scrollLeft: number\n scrollTop: number\n scrollHeight: number\n scrollWidth: number\n }\n\n interface IVirtualListEvent<T extends ScrollViewProps.onScrollDetail = ScrollViewProps.onScrollDetail> extends BaseEventOrig {\n /** 滚动方向,可能值为 forward 往前, backward 往后。 */\n scrollDirection: 'forward' | 'backward'\n /** 滚动距离 */\n scrollOffset: number\n /** 当滚动是由 scrollTo() 或 scrollToItem() 调用时返回 true,否则返回 false */\n scrollUpdateWasRequested: boolean\n /** 当前只有 React 支持 */\n detail: T\n }\n}\n\n/** 虚拟列表\n * @classification viewContainer\n * @supported weapp, swan, alipay, tt, qq, jd, h5\n * @example_react\n * ```tsx\n * import VirtualList from `@tarojs/components/virtual-list`\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset);\n * }\n *\n * const Row = React.memo(({ id, index, style, data }) => {\n * return (\n * <View id={id} className={index % 2 ? 'ListItemOdd' : 'ListItemEven'} style={style}>\n * Row {index}\n * </View>\n * );\n * })\n *\n * export default class Index extends Component {\n * state = {\n * data: buildData(0),\n * }\n *\n * render() {\n * const { data } = this.state\n * const dataLen = data.length\n * return (\n * <VirtualList\n * height={500} // 列表的高度\n * width='100%' // 列表的宽度\n * item={Row} // 列表单项组件,这里只能传入一个组件\n * itemData={data} // 渲染列表的数据\n * itemCount={dataLen} // 渲染列表的长度\n * itemSize={100} // 列表单项的高度\n * />\n * );\n * }\n * }\n * ```\n * @example_vue\n * ```js\n * // app.js 入口文件\n * import Vue from 'vue'\n * import VirtualList from '@tarojs/components/virtual-list'\n *\n * Vue.use(VirtualList)\n * ```\n * ```js\n * <! –– row.vue 单项组件 ––>\n * <template>\n * <view\n * :class=\"index % 2 ? 'ListItemOdd' : 'ListItemEven'\"\n * :style=\"css\"\n * >\n * Row {{ index }} : {{ data[index] }}\n * </view>\n * </template>\n *\n * <script>\n * export default {\n * props: ['index', 'data', 'css']\n * }\n * </script>\n * ```\n * ```js\n * <! –– page.vue 页面组件 ––>\n * <template>\n * <virtual-list\n * wclass=\"List\"\n * :height=\"500\"\n * :item-data=\"list\"\n * :item-count=\"list.length\"\n * :item-size=\"100\"\n * :item=\"Row\"\n * width=\"100%\"\n * />\n * </template>\n *\n * <script>\n * import Row from './row.vue'\n * import { markRaw } from 'vue'\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset)\n * }\n *\n * export default {\n * data() {\n * return {\n * Row: markRaw(Row),\n * list: buildData(0)\n * }\n * },\n * }\n * </script>\n * ```\n * @see https://taro-docs.jd.com/docs/virtual-list\n */\ndeclare class VirtualListComponent extends Component<VirtualListProps> {}\n\nconst VirtualList: typeof VirtualListComponent = (process.env.FRAMEWORK === 'vue' || process.env.FRAMEWORK === 'vue3')\n ? require('./vue').default\n : require('./react').default\n\nexport { VirtualList, VirtualListProps }\nexport default VirtualList\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/virtual-list/index.ts"],"sourcesContent":["import type { BaseEventOrig, BaseEventOrigFunction, ScrollViewProps, StandardProps } from '@tarojs/components'\nimport type { Component, ComponentType, CSSProperties, ReactNode } from 'react'\n\ninterface VirtualListProps extends Omit<StandardProps, 'children'> {\n /** 列表的高度。 */\n height: string | number\n /** 列表的宽度。 */\n width: string | number\n /** 子组件 */\n item: ComponentType<{\n /** 组件 ID */\n id: string\n /** 单项的样式,样式必须传入组件的 style 中 */\n style?: CSSProperties\n /** 组件渲染的数据 */\n data: any\n /** 组件渲染数据的索引 */\n index: number\n /** 组件是否正在滚动,当 useIsScrolling 值为 true 时返回布尔值,否则返回 undefined */\n isScrolling?: boolean\n }>\n /** 列表的长度 */\n itemCount: number\n /** 渲染数据 */\n itemData: any[]\n /** 列表单项的大小,垂直滚动时为高度,水平滚动时为宽度。\n *\n * > Note:\n * > - unlimitedSize 模式下如果传入函数,只会调用一次用于设置初始值\n * > - 非 unlimitedSize 模式下如果传入函数,为避免性能问题,每个节点只会调用一次用于设置初始值\n */\n itemSize: number | ((index?: number, itemData?: any[]) => number)\n /** 解开高度列表单项大小限制,默认值使用: itemSize (请注意,初始高度与实际高度差异过大会导致隐患)。\n *\n * > Note: 通过 itemSize 设置的初始高度与子节点实际高度差异过大会导致隐患\n * @default false\n */\n unlimitedSize?: boolean\n /** 布局方式\n * @default \"absolute\"\n */\n position?: 'absolute' | 'relative'\n /** 初始滚动偏移值,水平滚动影响 scrollLeft,垂直滚动影响 scrollTop。 */\n initialScrollOffset?: number\n /** 列表内部容器组件类型。\n * @default View\n */\n innerElementType?: ComponentType\n /** 通过 ScrollViewContext 优化组件滚动性能\n * @default false\n * @note 部分平台不支持,使用时请注意甄别\n */\n enhanced?: boolean\n /** 顶部区域 */\n renderTop?: ReactNode\n /** 底部区域 */\n renderBottom?: ReactNode\n /** 滚动方向。vertical 为垂直滚动,horizontal 为平行滚动。\n * @default \"vertical\"\n */\n layout?: 'vertical' | 'horizontal'\n /** 列表滚动时调用函数 */\n onScroll?: (event: VirtualListProps.IVirtualListEvent<VirtualListProps.IVirtualListEventDetail>) => void\n /** 调用平台原生的滚动监听函数。 */\n onScrollNative?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>\n /** 在可视区域之外渲染的列表单项数量,值设置得越高,快速滚动时出现白屏的概率就越小,相应地,每次滚动的性能会变得越差。 */\n overscanCount?: number\n /** 上下滚动预占位节点 */\n placeholderCount?: number\n /** 是否注入 isScrolling 属性到 item 组件。这个参数一般用于实现滚动骨架屏(或其它 placeholder) 时比较有用。 */\n useIsScrolling?: boolean\n style?: CSSProperties\n}\n\ndeclare namespace VirtualListProps {\n interface IVirtualListEventDetail extends ScrollViewProps.onScrollDetail {\n scrollLeft: number\n scrollTop: number\n scrollHeight: number\n scrollWidth: number\n }\n\n interface IVirtualListEvent<T extends ScrollViewProps.onScrollDetail = ScrollViewProps.onScrollDetail> extends BaseEventOrig {\n /** 滚动方向,可能值为 forward 往前, backward 往后。 */\n scrollDirection: 'forward' | 'backward'\n /** 滚动距离 */\n scrollOffset: number\n /** 当滚动是由 scrollTo() 或 scrollToItem() 调用时返回 true,否则返回 false */\n scrollUpdateWasRequested: boolean\n /** 当前只有 React 支持 */\n detail: T\n }\n}\n\n/** 虚拟列表\n * @classification viewContainer\n * @supported weapp, swan, alipay, tt, qq, jd, h5\n * @example_react\n * ```tsx\n * import VirtualList from `@tarojs/components/virtual-list`\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset);\n * }\n *\n * const Row = React.memo(({ id, index, style, data }) => {\n * return (\n * <View id={id} className={index % 2 ? 'ListItemOdd' : 'ListItemEven'} style={style}>\n * Row {index}\n * </View>\n * );\n * })\n *\n * export default class Index extends Component {\n * state = {\n * data: buildData(0),\n * }\n *\n * render() {\n * const { data } = this.state\n * const dataLen = data.length\n * return (\n * <VirtualList\n * height={500} // 列表的高度\n * width='100%' // 列表的宽度\n * item={Row} // 列表单项组件,这里只能传入一个组件\n * itemData={data} // 渲染列表的数据\n * itemCount={dataLen} // 渲染列表的长度\n * itemSize={100} // 列表单项的高度\n * />\n * );\n * }\n * }\n * ```\n * @example_vue\n * ```js\n * // app.js 入口文件\n * import Vue from 'vue'\n * import VirtualList from '@tarojs/components/virtual-list'\n *\n * Vue.use(VirtualList)\n * ```\n * ```js\n * <! –– row.vue 单项组件 ––>\n * <template>\n * <view\n * :class=\"index % 2 ? 'ListItemOdd' : 'ListItemEven'\"\n * :style=\"css\"\n * >\n * Row {{ index }} : {{ data[index] }}\n * </view>\n * </template>\n *\n * <script>\n * export default {\n * props: ['index', 'data', 'css']\n * }\n * </script>\n * ```\n * ```js\n * <! –– page.vue 页面组件 ––>\n * <template>\n * <virtual-list\n * wclass=\"List\"\n * :height=\"500\"\n * :item-data=\"list\"\n * :item-count=\"list.length\"\n * :item-size=\"100\"\n * :item=\"Row\"\n * width=\"100%\"\n * />\n * </template>\n *\n * <script>\n * import Row from './row.vue'\n * import { markRaw } from 'vue'\n *\n * function buildData (offset = 0) {\n * return Array(100).fill(0).map((_, i) => i + offset)\n * }\n *\n * export default {\n * data() {\n * return {\n * Row: markRaw(Row),\n * list: buildData(0)\n * }\n * },\n * }\n * </script>\n * ```\n * @see https://taro-docs.jd.com/docs/virtual-list\n */\ndeclare class VirtualListComponent extends Component<VirtualListProps> {\n /**\n * 滚动到指定的地点。\n */\n public scrollTo(scrollOffset: number): void\n\n /** 滚动到指定的条目。\n * @param index 指定条目的索引。\n * @param align 滚动到指定条目时,指定条目的位置。默认值为 auto。\n *\n * - start:指定条目在可视区域的顶部。\n * - end:指定条目在可视区域的底部。\n * - center:指定条目在可视区域的中间。\n * - auto:尽可能滚动距离最小保证条目在可视区域中,如果已经在可视区域,就不滚动。\n * - smart:条目如果已经在可视区域,就不滚动;如果有部分在可视区域,尽可能滚动距离最小保证条目在可视区域中;如果条目完全不在可视区域,那就滚动到条目在可视区域居中显示。\n */\n public scrollToItem(index: number, align: 'start' | 'end' | 'center' | 'auto' | 'smart'): void\n}\n\ndeclare type VirtualList = VirtualListComponent\nconst VirtualList: typeof VirtualListComponent = (process.env.FRAMEWORK === 'vue' || process.env.FRAMEWORK === 'vue3')\n ? require('./vue').default\n : require('./react').default\n\nexport { VirtualList, VirtualListProps }\nexport default VirtualList\n"],"names":[],"mappings":"AAqNA,MAAM,WAAW,GAAgC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,MAAM;AACnH,MAAE,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO;AAC1B,MAAE,OAAO,CAAC,SAAS,CAAC,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __rest } from 'tslib';
|
|
1
|
+
import { __rest } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { ScrollView, View } from '@tarojs/components';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { convertPX2Int } from '../../../utils/convert.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __rest } from 'tslib';
|
|
1
|
+
import { __rest } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import memoizeOne from 'memoize-one';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { convertNumber2PX } from '../../../utils/convert.js';
|
|
@@ -13,7 +13,6 @@ import { validateListProps } from './validate.js';
|
|
|
13
13
|
class List extends React.PureComponent {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
|
-
// FIXME Warning: Cannot update during an existing state transition (such as within `render`).
|
|
17
16
|
this.refresh = () => {
|
|
18
17
|
if (process.env.FRAMEWORK === 'preact') {
|
|
19
18
|
this.forceUpdate();
|
|
@@ -32,7 +31,6 @@ class List extends React.PureComponent {
|
|
|
32
31
|
visibleStartIndex,
|
|
33
32
|
visibleStopIndex
|
|
34
33
|
}));
|
|
35
|
-
// FIXME 优化事件信息
|
|
36
34
|
this._callOnScroll = memoizeOne((scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) => this.props.onScroll({
|
|
37
35
|
scrollDirection,
|
|
38
36
|
scrollOffset,
|
|
@@ -61,7 +59,7 @@ class List extends React.PureComponent {
|
|
|
61
59
|
});
|
|
62
60
|
};
|
|
63
61
|
this._onScrollHorizontal = event => {
|
|
64
|
-
const { clientWidth
|
|
62
|
+
const { clientWidth = this.itemList.wrapperSize, scrollHeight, scrollWidth = this.itemList.getOffsetSize(), scrollTop, scrollLeft, } = event.currentTarget;
|
|
65
63
|
this.preset.field = {
|
|
66
64
|
scrollHeight: scrollHeight,
|
|
67
65
|
scrollWidth: this.itemList.getOffsetSize(),
|
|
@@ -105,7 +103,7 @@ class List extends React.PureComponent {
|
|
|
105
103
|
}, this._resetIsScrollingDebounced);
|
|
106
104
|
};
|
|
107
105
|
this._onScrollVertical = event => {
|
|
108
|
-
const { clientHeight, scrollHeight, scrollWidth, scrollTop, scrollLeft } = event.currentTarget;
|
|
106
|
+
const { clientHeight = this.itemList.wrapperSize, scrollHeight = this.itemList.getOffsetSize(), scrollWidth, scrollTop, scrollLeft } = event.currentTarget;
|
|
109
107
|
this.setState((prevState) => {
|
|
110
108
|
const diffOffset = this.preset.field.scrollTop - scrollTop;
|
|
111
109
|
if (prevState.scrollOffset === scrollTop || this.preset.isShaking(diffOffset)) {
|