@tarojs/components-advanced 3.6.0-canary.8 → 3.6.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.
Files changed (60) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/index.js +2 -0
  3. package/dist/components/index.js.map +1 -0
  4. package/dist/components/virtual-list/constants.d.ts +2 -0
  5. package/dist/components/virtual-list/constants.js +4 -0
  6. package/dist/components/virtual-list/constants.js.map +1 -0
  7. package/dist/components/virtual-list/dom-helpers.d.ts +2 -0
  8. package/dist/components/virtual-list/dom-helpers.js +41 -0
  9. package/dist/components/virtual-list/dom-helpers.js.map +1 -0
  10. package/dist/components/virtual-list/index.d.ts +188 -0
  11. package/dist/components/virtual-list/index.js +6 -0
  12. package/dist/components/virtual-list/index.js.map +1 -0
  13. package/dist/components/virtual-list/list-set.d.ts +27 -0
  14. package/dist/components/virtual-list/list-set.js +183 -0
  15. package/dist/components/virtual-list/list-set.js.map +1 -0
  16. package/dist/components/virtual-list/preset.d.ts +49 -0
  17. package/dist/components/virtual-list/preset.js +135 -0
  18. package/dist/components/virtual-list/preset.js.map +1 -0
  19. package/dist/components/virtual-list/react/index.d.ts +4 -0
  20. package/dist/components/virtual-list/react/index.js +35 -0
  21. package/dist/components/virtual-list/react/index.js.map +1 -0
  22. package/dist/components/virtual-list/react/list.d.ts +44 -0
  23. package/dist/components/virtual-list/react/list.js +378 -0
  24. package/dist/components/virtual-list/react/list.js.map +1 -0
  25. package/dist/components/virtual-list/react/validate.d.ts +4 -0
  26. package/dist/components/virtual-list/react/validate.js +64 -0
  27. package/dist/components/virtual-list/react/validate.js.map +1 -0
  28. package/dist/components/virtual-list/utils.d.ts +12 -0
  29. package/dist/components/virtual-list/utils.js +32 -0
  30. package/dist/components/virtual-list/utils.js.map +1 -0
  31. package/dist/components/virtual-list/vue/index.d.ts +17 -0
  32. package/dist/components/virtual-list/vue/index.js +12 -0
  33. package/dist/components/virtual-list/vue/index.js.map +1 -0
  34. package/dist/components/virtual-list/vue/list.d.ts +120 -0
  35. package/dist/components/virtual-list/vue/list.js +450 -0
  36. package/dist/components/virtual-list/vue/list.js.map +1 -0
  37. package/dist/components/virtual-list/vue/render.d.ts +4 -0
  38. package/dist/components/virtual-list/vue/render.js +18 -0
  39. package/dist/components/virtual-list/vue/render.js.map +1 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +8 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/utils/convert.d.ts +6 -0
  44. package/dist/utils/convert.js +20 -0
  45. package/dist/utils/convert.js.map +1 -0
  46. package/dist/utils/index.d.ts +4 -0
  47. package/dist/utils/index.js +5 -0
  48. package/dist/utils/index.js.map +1 -0
  49. package/dist/utils/lodash.d.ts +2 -0
  50. package/dist/utils/lodash.js +10 -0
  51. package/dist/utils/lodash.js.map +1 -0
  52. package/dist/utils/math.d.ts +3 -0
  53. package/dist/utils/math.js +15 -0
  54. package/dist/utils/math.js.map +1 -0
  55. package/dist/utils/timer.d.ts +6 -0
  56. package/dist/utils/timer.js +24 -0
  57. package/dist/utils/timer.js.map +1 -0
  58. package/package.json +18 -8
  59. package/typings/global.d.ts +1 -0
  60. package/typings/vue.d.ts +7 -0
@@ -0,0 +1,450 @@
1
+ import memoizeOne from 'memoize-one';
2
+ import { convertNumber2PX } from '../../../utils/convert.js';
3
+ import { omit } from '../../../utils/lodash.js';
4
+ import { cancelTimeout, requestTimeout } from '../../../utils/timer.js';
5
+ import { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants.js';
6
+ import { getRTLOffsetType } from '../dom-helpers.js';
7
+ import Preset from '../preset.js';
8
+ import { getRectSize, defaultItemKey } from '../utils.js';
9
+ import render from './render.js';
10
+
11
+ var List = {
12
+ props: {
13
+ height: {
14
+ type: [String, Number],
15
+ required: true
16
+ },
17
+ width: {
18
+ type: [String, Number],
19
+ required: true
20
+ },
21
+ itemCount: {
22
+ type: Number,
23
+ required: true
24
+ },
25
+ itemData: {
26
+ type: Array,
27
+ required: true
28
+ },
29
+ itemSize: {
30
+ type: [Number, Function],
31
+ required: true
32
+ },
33
+ unlimitedSize: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ position: {
38
+ type: String,
39
+ default: 'absolute'
40
+ },
41
+ initialScrollOffset: {
42
+ type: Number,
43
+ default: 0
44
+ },
45
+ innerElementType: {
46
+ type: String,
47
+ default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'
48
+ },
49
+ direction: {
50
+ type: String,
51
+ default: 'ltr'
52
+ },
53
+ layout: {
54
+ type: String,
55
+ default: 'vertical'
56
+ },
57
+ overscanCount: {
58
+ type: Number,
59
+ default: 1
60
+ },
61
+ placeholderCount: {
62
+ type: Number
63
+ },
64
+ useIsScrolling: {
65
+ type: Boolean,
66
+ default: false
67
+ },
68
+ item: {
69
+ required: true
70
+ },
71
+ itemKey: String,
72
+ itemTagName: {
73
+ type: String,
74
+ default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'
75
+ },
76
+ innerTagName: {
77
+ type: String,
78
+ default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'
79
+ },
80
+ outerTagName: {
81
+ type: String,
82
+ default: process.env.TARO_ENV === 'h5' ? 'taro-scroll-view-core' : 'scroll-view'
83
+ },
84
+ itemElementType: String,
85
+ outerElementType: String,
86
+ innerRef: String,
87
+ outerRef: String,
88
+ onItemsRendered: Function,
89
+ onScrollNative: Function,
90
+ shouldResetStyleCacheOnItemSizeChange: {
91
+ type: Boolean,
92
+ default: true
93
+ },
94
+ },
95
+ data() {
96
+ const preset = new Preset(this.$props, this.refresh);
97
+ return {
98
+ itemList: preset.itemList,
99
+ preset,
100
+ id: this.$props.id || preset.id,
101
+ instance: this,
102
+ isScrolling: false,
103
+ scrollDirection: 'forward',
104
+ scrollOffset: typeof this.$props.initialScrollOffset === 'number'
105
+ ? this.$props.initialScrollOffset
106
+ : 0,
107
+ scrollUpdateWasRequested: false,
108
+ resetIsScrollingTimeoutId: null,
109
+ refreshCount: 0
110
+ };
111
+ },
112
+ methods: {
113
+ refresh() {
114
+ this.refreshCount = this.refreshCount + 1;
115
+ },
116
+ scrollTo(scrollOffset) {
117
+ scrollOffset = Math.max(0, scrollOffset);
118
+ if (this.scrollOffset === scrollOffset) {
119
+ return;
120
+ }
121
+ this.scrollDirection = this.scrollOffset < scrollOffset ? 'forward' : 'backward';
122
+ this.scrollOffset = scrollOffset;
123
+ this.scrollUpdateWasRequested = true;
124
+ this.$nextTick(this._resetIsScrollingDebounced);
125
+ },
126
+ scrollToItem(index, align = 'auto') {
127
+ const { itemCount } = this.$props;
128
+ const { scrollOffset } = this.$data;
129
+ index = Math.max(0, Math.min(index, itemCount - 1));
130
+ this.scrollTo(this.itemList.getOffsetForIndexAndAlignment(this.$props, index, align, scrollOffset));
131
+ },
132
+ _callOnItemsRendered: memoizeOne(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
133
+ return this.$props.onItemsRendered({
134
+ overscanStartIndex,
135
+ overscanStopIndex,
136
+ visibleStartIndex,
137
+ visibleStopIndex
138
+ });
139
+ }),
140
+ _callOnScroll: memoizeOne(function (scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) {
141
+ this.$emit('scroll', {
142
+ scrollDirection,
143
+ scrollOffset,
144
+ scrollUpdateWasRequested,
145
+ detail
146
+ });
147
+ }),
148
+ _callPropsCallbacks() {
149
+ if (typeof this.$props.onItemsRendered === 'function') {
150
+ const { itemCount } = this.$props;
151
+ if (itemCount > 0) {
152
+ const [overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex] = this._getRangeToRender();
153
+ this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex);
154
+ }
155
+ }
156
+ this._callOnScroll(this.scrollDirection, this.scrollOffset, this.scrollUpdateWasRequested, this.preset.field);
157
+ setTimeout(() => {
158
+ const [startIndex, stopIndex] = this._getRangeToRender();
159
+ const isHorizontal = this.preset.isHorizontal;
160
+ for (let index = startIndex; index <= stopIndex; index++) {
161
+ this._getSizeUploadSync(index, isHorizontal);
162
+ }
163
+ }, 0);
164
+ },
165
+ _getSizeUploadSync(index, isHorizontal) {
166
+ const ID = `#${this.$data.id}-${index}`;
167
+ return new Promise((resolve) => {
168
+ const success = ({ width, height }) => {
169
+ const size = isHorizontal ? width : height;
170
+ if (!this.itemList.compareSize(index, size)) {
171
+ this.itemList.setSize(index, size);
172
+ resolve(this.itemList.getSize(index));
173
+ }
174
+ };
175
+ const fail = () => {
176
+ const [startIndex, stopIndex] = this._getRangeToRender();
177
+ if (index >= startIndex && index <= stopIndex) {
178
+ setTimeout(() => {
179
+ getRectSize(ID, success, fail);
180
+ }, 100);
181
+ }
182
+ };
183
+ getRectSize(ID, success, fail);
184
+ });
185
+ },
186
+ _getRangeToRender() {
187
+ return this.itemList.getRangeToRender(this.$data.scrollDirection, this.$data.scrollOffset, this.$data.isScrolling);
188
+ },
189
+ _onScrollHorizontal(event) {
190
+ const { clientWidth, scrollTop, scrollLeft, scrollHeight, scrollWidth } = event.currentTarget;
191
+ this.preset.field = {
192
+ scrollHeight: scrollHeight,
193
+ scrollWidth: this.itemList.getOffsetSize(),
194
+ scrollTop: scrollTop,
195
+ scrollLeft: scrollLeft,
196
+ clientHeight: scrollHeight,
197
+ clientWidth: scrollWidth
198
+ };
199
+ if (this.$props.onScrollNative) {
200
+ this.$props.onScrollNative(event);
201
+ }
202
+ const diffOffset = this.preset.field.scrollLeft - scrollLeft;
203
+ if (this.scrollOffset === scrollLeft || this.preset.isShaking(diffOffset)) {
204
+ return;
205
+ }
206
+ let scrollOffset = scrollLeft;
207
+ if (this.preset.isRtl) {
208
+ // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
209
+ // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
210
+ // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.
211
+ // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.
212
+ switch (getRTLOffsetType()) {
213
+ case 'negative':
214
+ scrollOffset = -scrollLeft;
215
+ break;
216
+ case 'positive-descending':
217
+ scrollOffset = scrollWidth - clientWidth - scrollLeft;
218
+ break;
219
+ }
220
+ }
221
+ // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.
222
+ scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
223
+ this.preset.field = {
224
+ scrollWidth: scrollOffset,
225
+ };
226
+ this.isScrolling = true;
227
+ this.scrollDirection = this.scrollOffset < scrollLeft ? 'forward' : 'backward';
228
+ this.scrollOffset = scrollOffset;
229
+ this.scrollUpdateWasRequested = false;
230
+ this.$nextTick(this._resetIsScrollingDebounced);
231
+ },
232
+ _onScrollVertical(event) {
233
+ const { clientHeight, scrollHeight, scrollWidth, scrollTop, scrollLeft } = event.currentTarget;
234
+ if (this.$props.onScrollNative) {
235
+ this.$props.onScrollNative(event);
236
+ }
237
+ const diffOffset = this.preset.field.scrollTop - scrollTop;
238
+ if (this.scrollOffset === scrollTop || this.preset.isShaking(diffOffset)) {
239
+ return;
240
+ }
241
+ // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.
242
+ const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
243
+ this.preset.field = {
244
+ scrollHeight: this.itemList.getOffsetSize(),
245
+ scrollWidth: scrollWidth,
246
+ scrollTop: scrollOffset,
247
+ scrollLeft: scrollLeft,
248
+ clientHeight: clientHeight,
249
+ clientWidth: scrollWidth,
250
+ diffOffset: this.preset.field.scrollTop - scrollOffset,
251
+ };
252
+ this.isScrolling = true;
253
+ this.scrollDirection = this.scrollOffset < scrollOffset ? 'forward' : 'backward';
254
+ this.scrollOffset = scrollOffset;
255
+ this.scrollUpdateWasRequested = false;
256
+ this.$nextTick(this._resetIsScrollingDebounced);
257
+ },
258
+ _outerRefSetter(ref) {
259
+ const { outerRef } = this.$props;
260
+ this._outerRef = ref;
261
+ if (typeof outerRef === 'function') {
262
+ outerRef(ref);
263
+ }
264
+ else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('value')) {
265
+ outerRef.value = ref;
266
+ }
267
+ },
268
+ _resetIsScrollingDebounced() {
269
+ if (this.resetIsScrollingTimeoutId !== null) {
270
+ cancelTimeout(this.resetIsScrollingTimeoutId);
271
+ }
272
+ this.resetIsScrollingTimeoutId = requestTimeout(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
273
+ },
274
+ _resetIsScrolling() {
275
+ this.resetIsScrollingTimeoutId = null;
276
+ this.isScrolling = false;
277
+ this.$nextTick(() => {
278
+ this.preset.getItemStyleCache(-1, null);
279
+ });
280
+ }
281
+ },
282
+ mounted() {
283
+ const { initialScrollOffset } = this.$props;
284
+ if (typeof initialScrollOffset === 'number' && this._outerRef != null) {
285
+ const outerRef = this._outerRef;
286
+ if (this.preset.isHorizontal) {
287
+ outerRef.scrollLeft = initialScrollOffset;
288
+ }
289
+ else {
290
+ outerRef.scrollTop = initialScrollOffset;
291
+ }
292
+ }
293
+ this._callPropsCallbacks();
294
+ },
295
+ updated() {
296
+ this.preset.update(this.$props);
297
+ const { scrollOffset, scrollUpdateWasRequested } = this.$data;
298
+ if (scrollUpdateWasRequested && this._outerRef != null) {
299
+ const outerRef = this._outerRef;
300
+ if (this.preset.isHorizontal) {
301
+ if (this.preset.isRtl) {
302
+ // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
303
+ // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
304
+ // So we need to determine which browser behavior we're dealing with, and mimic it.
305
+ switch (getRTLOffsetType()) {
306
+ case 'negative':
307
+ outerRef.scrollLeft = -scrollOffset;
308
+ break;
309
+ case 'positive-ascending':
310
+ outerRef.scrollLeft = scrollOffset;
311
+ break;
312
+ default: {
313
+ const { clientWidth, scrollWidth } = outerRef;
314
+ outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
315
+ break;
316
+ }
317
+ }
318
+ }
319
+ else {
320
+ outerRef.scrollLeft = scrollOffset;
321
+ }
322
+ }
323
+ else {
324
+ outerRef.scrollTop = scrollOffset;
325
+ }
326
+ }
327
+ this._callPropsCallbacks();
328
+ },
329
+ beforeDestroy() {
330
+ if (this.resetIsScrollingTimeoutId !== null) {
331
+ cancelTimeout(this.resetIsScrollingTimeoutId);
332
+ }
333
+ },
334
+ render() {
335
+ var _a, _b, _c, _d, _e, _f, _g, _h;
336
+ const { item, direction, height, innerRef, itemCount, itemData, itemKey = defaultItemKey, layout, useIsScrolling, width } = omit(this.$props, ['innerElementType', 'innerTagName', 'itemElementType', 'itemTagName', 'outerElementType', 'outerTagName', 'position']);
337
+ const { id, isScrolling, scrollOffset, scrollUpdateWasRequested } = this.$data;
338
+ const isHorizontal = this.preset.isHorizontal;
339
+ const placeholderCount = this.preset.placeholderCount;
340
+ const onScroll = isHorizontal
341
+ ? this._onScrollHorizontal
342
+ : this._onScrollVertical;
343
+ const [startIndex, stopIndex] = this._getRangeToRender();
344
+ const items = [];
345
+ if (itemCount > 0) {
346
+ const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount;
347
+ items.push(new Array(prevPlaceholder).fill(-1).map((_, index) => render(this.preset.itemTagName, {
348
+ key: itemKey(index + startIndex - prevPlaceholder, itemData),
349
+ style: { display: 'none' }
350
+ })));
351
+ for (let index = startIndex; index <= stopIndex; index++) {
352
+ const style = this.preset.getItemStyle(index);
353
+ items.push(render(this.preset.itemTagName, {
354
+ key: itemKey(index, itemData),
355
+ style
356
+ }, [
357
+ render(item, {
358
+ id: `${id}-${index}`,
359
+ props: {
360
+ id: `${id}-${index}`,
361
+ data: itemData,
362
+ index,
363
+ isScrolling: useIsScrolling ? isScrolling : undefined
364
+ }
365
+ })
366
+ ]));
367
+ }
368
+ const restCount = itemCount - stopIndex;
369
+ const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount;
370
+ items.push(new Array(postPlaceholder).fill(-1).map((_, index) => render(this.preset.itemTagName, {
371
+ key: itemKey(1 + index + stopIndex, itemData),
372
+ style: { display: 'none' }
373
+ })));
374
+ }
375
+ // Read this value AFTER items have been created,
376
+ // So their actual sizes (if variable) are taken into consideration.
377
+ const estimatedTotalSize = convertNumber2PX(this.itemList.getOffsetSize());
378
+ const outerElementProps = {
379
+ id,
380
+ ref: this._outerRefSetter,
381
+ layout,
382
+ style: {
383
+ position: 'relative',
384
+ height: convertNumber2PX(height),
385
+ width: convertNumber2PX(width),
386
+ overflow: 'auto',
387
+ WebkitOverflowScrolling: 'touch',
388
+ willChange: 'transform',
389
+ direction
390
+ },
391
+ attrs: {
392
+ scrollY: layout === 'vertical',
393
+ scrollX: layout === 'horizontal'
394
+ },
395
+ on: {
396
+ scroll: onScroll
397
+ }
398
+ };
399
+ if (isHorizontal) {
400
+ outerElementProps.scrollLeft = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollLeft;
401
+ }
402
+ else {
403
+ outerElementProps.scrollTop = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollTop;
404
+ }
405
+ if (this.preset.isRelative) {
406
+ const pre = convertNumber2PX(this.itemList.getOffsetSize(startIndex));
407
+ return render(this.preset.outerTagName, outerElementProps, [
408
+ process.env.FRAMEWORK === 'vue3' ? (_b = (_a = this.$slots).top) === null || _b === void 0 ? void 0 : _b.call(_a) : this.$slots.top,
409
+ render(this.preset.itemTagName, {
410
+ key: `${id}-pre`,
411
+ id: `${id}-pre`,
412
+ style: {
413
+ height: isHorizontal ? '100%' : pre,
414
+ width: !isHorizontal ? '100%' : pre
415
+ }
416
+ }),
417
+ render(this.preset.innerTagName, {
418
+ ref: innerRef,
419
+ key: `${id}-inner`,
420
+ id: `${id}-inner`,
421
+ style: {
422
+ pointerEvents: isScrolling ? 'none' : 'auto',
423
+ position: 'relative',
424
+ }
425
+ }, items),
426
+ process.env.FRAMEWORK === 'vue3' ? (_d = (_c = this.$slots).bottom) === null || _d === void 0 ? void 0 : _d.call(_c) : this.$slots.bottom,
427
+ ]);
428
+ }
429
+ else {
430
+ return render(this.preset.outerTagName, outerElementProps, [
431
+ process.env.FRAMEWORK === 'vue3' ? (_f = (_e = this.$slots).top) === null || _f === void 0 ? void 0 : _f.call(_e) : this.$slots.top,
432
+ render(this.preset.innerTagName, {
433
+ ref: innerRef,
434
+ key: `${id}-inner`,
435
+ id: `${id}-inner`,
436
+ style: {
437
+ height: isHorizontal ? '100%' : estimatedTotalSize,
438
+ pointerEvents: isScrolling ? 'none' : 'auto',
439
+ position: 'relative',
440
+ width: !isHorizontal ? '100%' : estimatedTotalSize
441
+ }
442
+ }, items),
443
+ process.env.FRAMEWORK === 'vue3' ? (_h = (_g = this.$slots).bottom) === null || _h === void 0 ? void 0 : _h.call(_g) : this.$slots.bottom,
444
+ ]);
445
+ }
446
+ }
447
+ };
448
+
449
+ export { List as default };
450
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sources":["../../../../src/components/virtual-list/vue/list.ts"],"sourcesContent":["import memoizeOne from 'memoize-one'\n\nimport { convertNumber2PX } from '../../../utils/convert'\nimport { omit } from '../../../utils/lodash'\nimport { cancelTimeout, requestTimeout } from '../../../utils/timer'\nimport { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants'\nimport { getRTLOffsetType } from '../dom-helpers'\nimport Preset from '../preset'\nimport { defaultItemKey, getRectSize } from '../utils'\nimport render from './render'\n\nexport default {\n props: {\n height: {\n type: [String, Number],\n required: true\n },\n width: {\n type: [String, Number],\n required: true\n },\n itemCount: {\n type: Number,\n required: true\n },\n itemData: {\n type: Array,\n required: true\n },\n itemSize: {\n type: [Number, Function],\n required: true\n },\n unlimitedSize: {\n type: Boolean,\n default: false\n },\n position: {\n type: String,\n default: 'absolute'\n },\n initialScrollOffset: {\n type: Number,\n default: 0\n },\n innerElementType: {\n type: String,\n default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'\n },\n direction: {\n type: String,\n default: 'ltr'\n },\n layout: {\n type: String,\n default: 'vertical'\n },\n overscanCount: {\n type: Number,\n default: 1\n },\n placeholderCount: {\n type: Number\n },\n useIsScrolling: {\n type: Boolean,\n default: false\n },\n item: {\n required: true\n },\n itemKey: String,\n itemTagName: {\n type: String,\n default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'\n },\n innerTagName: {\n type: String,\n default: process.env.TARO_ENV === 'h5' ? 'taro-view-core' : 'view'\n },\n outerTagName: {\n type: String,\n default: process.env.TARO_ENV === 'h5' ? 'taro-scroll-view-core' : 'scroll-view'\n },\n itemElementType: String,\n outerElementType: String,\n innerRef: String,\n outerRef: String,\n onItemsRendered: Function,\n onScrollNative: Function,\n shouldResetStyleCacheOnItemSizeChange: {\n type: Boolean,\n default: true\n },\n },\n data () {\n const preset = new Preset(this.$props, this.refresh)\n return {\n itemList: preset.itemList,\n preset,\n id: this.$props.id || preset.id,\n instance: this,\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset:\n typeof this.$props.initialScrollOffset === 'number'\n ? this.$props.initialScrollOffset\n : 0,\n scrollUpdateWasRequested: false,\n resetIsScrollingTimeoutId: null,\n refreshCount: 0\n }\n },\n methods: {\n refresh () {\n this.refreshCount = this.refreshCount + 1\n },\n scrollTo (scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset)\n\n if (this.scrollOffset === scrollOffset) {\n return\n }\n\n this.scrollDirection = this.scrollOffset < scrollOffset ? 'forward' : 'backward'\n this.scrollOffset = scrollOffset\n this.scrollUpdateWasRequested = true\n\n this.$nextTick(this._resetIsScrollingDebounced)\n },\n\n scrollToItem (index, align = 'auto') {\n const { itemCount } = this.$props\n const { scrollOffset } = this.$data\n\n index = Math.max(0, Math.min(index, itemCount - 1))\n\n this.scrollTo(\n this.itemList.getOffsetForIndexAndAlignment(\n this.$props,\n index,\n align,\n scrollOffset\n )\n )\n },\n\n _callOnItemsRendered: memoizeOne(\n function (\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n ) {\n return this.$props.onItemsRendered({\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n })\n }\n ),\n\n _callOnScroll: memoizeOne(\n function (\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n ) {\n this.$emit('scroll', {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n })\n }\n ),\n\n _callPropsCallbacks () {\n if (typeof this.$props.onItemsRendered === 'function') {\n const { itemCount } = this.$props\n if (itemCount > 0) {\n const [\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n ] = this._getRangeToRender()\n this._callOnItemsRendered(\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n )\n }\n }\n\n this._callOnScroll(\n this.scrollDirection,\n this.scrollOffset,\n this.scrollUpdateWasRequested,\n this.preset.field\n )\n\n setTimeout(() => {\n const [startIndex, stopIndex] = this._getRangeToRender()\n const isHorizontal = this.preset.isHorizontal\n for (let index = startIndex; index <= stopIndex; index++) {\n this._getSizeUploadSync(index, isHorizontal)\n }\n }, 0)\n },\n\n _getSizeUploadSync (index: number, isHorizontal: boolean) {\n const ID = `#${this.$data.id}-${index}`\n\n return new Promise((resolve) => {\n const success = ({ width, height }) => {\n const size = isHorizontal ? width : height\n if (!this.itemList.compareSize(index, size)) {\n this.itemList.setSize(index, size)\n resolve(this.itemList.getSize(index))\n }\n }\n const fail = () => {\n const [startIndex, stopIndex] = this._getRangeToRender()\n if (index >= startIndex && index <= stopIndex) {\n setTimeout(() => {\n getRectSize(ID, success, fail)\n }, 100)\n }\n }\n getRectSize(ID, success, fail)\n })\n },\n\n _getRangeToRender () {\n return this.itemList.getRangeToRender(\n this.$data.scrollDirection,\n this.$data.scrollOffset,\n this.$data.isScrolling\n )\n },\n\n _onScrollHorizontal (event) {\n const {\n clientWidth,\n scrollTop,\n scrollLeft,\n scrollHeight,\n scrollWidth\n } = event.currentTarget\n this.preset.field = {\n scrollHeight: scrollHeight,\n scrollWidth: this.itemList.getOffsetSize(),\n scrollTop: scrollTop,\n scrollLeft: scrollLeft,\n clientHeight: scrollHeight,\n clientWidth: scrollWidth\n }\n if (this.$props.onScrollNative) {\n this.$props.onScrollNative(event)\n }\n const diffOffset = this.preset.field.scrollLeft - scrollLeft\n if (this.scrollOffset === scrollLeft || this.preset.isShaking(diffOffset)) {\n return\n }\n\n let scrollOffset = scrollLeft\n if (this.preset.isRtl) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft\n break\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n )\n this.preset.field = {\n scrollWidth: scrollOffset,\n }\n this.isScrolling = true\n this.scrollDirection = this.scrollOffset < scrollLeft ? 'forward' : 'backward'\n this.scrollOffset = scrollOffset\n this.scrollUpdateWasRequested = false\n this.$nextTick(this._resetIsScrollingDebounced)\n },\n\n _onScrollVertical (event) {\n const {\n clientHeight,\n scrollHeight,\n scrollWidth,\n scrollTop,\n scrollLeft\n } = event.currentTarget\n if (this.$props.onScrollNative) {\n this.$props.onScrollNative(event)\n }\n const diffOffset = this.preset.field.scrollTop - scrollTop\n if (this.scrollOffset === scrollTop || this.preset.isShaking(diffOffset)) {\n return\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n )\n this.preset.field = {\n scrollHeight: this.itemList.getOffsetSize(),\n scrollWidth: scrollWidth,\n scrollTop: scrollOffset,\n scrollLeft: scrollLeft,\n clientHeight: clientHeight,\n clientWidth: scrollWidth,\n diffOffset: this.preset.field.scrollTop - scrollOffset,\n }\n\n this.isScrolling = true\n this.scrollDirection = this.scrollOffset < scrollOffset ? 'forward' : 'backward'\n this.scrollOffset = scrollOffset\n this.scrollUpdateWasRequested = false\n this.$nextTick(this._resetIsScrollingDebounced)\n },\n\n _outerRefSetter (ref) {\n const {\n outerRef\n } = this.$props\n this._outerRef = ref\n\n if (typeof outerRef === 'function') {\n outerRef(ref)\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('value')) {\n outerRef.value = ref\n }\n },\n\n _resetIsScrollingDebounced () {\n if (this.resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this.resetIsScrollingTimeoutId)\n }\n\n this.resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n )\n },\n\n _resetIsScrolling () {\n this.resetIsScrollingTimeoutId = null\n this.isScrolling = false\n this.$nextTick(() => {\n this.preset.getItemStyleCache(-1, null)\n })\n }\n },\n mounted () {\n const { initialScrollOffset } = this.$props\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = this._outerRef\n if (this.preset.isHorizontal) {\n outerRef.scrollLeft = initialScrollOffset\n } else {\n outerRef.scrollTop = initialScrollOffset\n }\n }\n\n this._callPropsCallbacks()\n },\n updated () {\n this.preset.update(this.$props)\n\n const { scrollOffset, scrollUpdateWasRequested } = this.$data\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n const outerRef = this._outerRef\n\n if (this.preset.isHorizontal) {\n if (this.preset.isRtl) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset\n break\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset\n break\n default: {\n const { clientWidth, scrollWidth } = outerRef\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset\n break\n }\n }\n } else {\n outerRef.scrollLeft = scrollOffset\n }\n } else {\n outerRef.scrollTop = scrollOffset\n }\n }\n\n this._callPropsCallbacks()\n },\n\n beforeDestroy () {\n if (this.resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this.resetIsScrollingTimeoutId)\n }\n },\n\n render () {\n const {\n item,\n direction,\n height,\n innerRef,\n itemCount,\n itemData,\n itemKey = defaultItemKey,\n layout,\n useIsScrolling,\n width\n } = omit(this.$props, ['innerElementType', 'innerTagName', 'itemElementType', 'itemTagName', 'outerElementType', 'outerTagName', 'position'])\n const {\n id,\n isScrolling,\n scrollOffset,\n scrollUpdateWasRequested\n } = this.$data\n\n const isHorizontal = this.preset.isHorizontal\n const placeholderCount = this.preset.placeholderCount\n const onScroll = isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical\n\n const [startIndex, stopIndex] = this._getRangeToRender()\n\n const items = []\n if (itemCount > 0) {\n const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount\n items.push(new Array(prevPlaceholder).fill(-1).map((_, index) => render(\n this.preset.itemTagName, {\n key: itemKey(index + startIndex - prevPlaceholder, itemData),\n style: { display: 'none' }\n }\n )))\n for (let index = startIndex; index <= stopIndex; index++) {\n const style = this.preset.getItemStyle(index)\n items.push(\n render(this.preset.itemTagName, {\n key: itemKey(index, itemData),\n style\n }, [\n render(item, {\n id: `${id}-${index}`,\n props: {\n id: `${id}-${index}`,\n data: itemData,\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined\n }\n })\n ])\n )\n }\n const restCount = itemCount - stopIndex\n const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount\n items.push(new Array(postPlaceholder).fill(-1).map((_, index) => render(\n this.preset.itemTagName, {\n key: itemKey(1 + index + stopIndex, itemData),\n style: { display: 'none' }\n }\n )))\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalSize = convertNumber2PX(this.itemList.getOffsetSize())\n const outerElementProps: any = {\n id,\n ref: this._outerRefSetter,\n layout,\n style: {\n position: 'relative',\n height: convertNumber2PX(height),\n width: convertNumber2PX(width),\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction\n },\n attrs: {\n scrollY: layout === 'vertical',\n scrollX: layout === 'horizontal'\n },\n on: {\n scroll: onScroll\n }\n }\n if (isHorizontal) {\n outerElementProps.scrollLeft = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollLeft\n } else {\n outerElementProps.scrollTop = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollTop\n }\n\n if (this.preset.isRelative) {\n const pre = convertNumber2PX(this.itemList.getOffsetSize(startIndex))\n return render(this.preset.outerTagName, outerElementProps, [\n process.env.FRAMEWORK === 'vue3' ? this.$slots.top?.() : this.$slots.top,\n render(this.preset.itemTagName, {\n key: `${id}-pre`,\n id: `${id}-pre`,\n style: {\n height: isHorizontal ? '100%' : pre,\n width: !isHorizontal ? '100%' : pre\n }\n }),\n render(this.preset.innerTagName, {\n ref: innerRef,\n key: `${id}-inner`,\n id: `${id}-inner`,\n style: {\n pointerEvents: isScrolling ? 'none' : 'auto',\n position: 'relative',\n }\n }, items),\n process.env.FRAMEWORK === 'vue3' ? this.$slots.bottom?.() : this.$slots.bottom,\n ])\n } else {\n return render(this.preset.outerTagName, outerElementProps, [\n process.env.FRAMEWORK === 'vue3' ? this.$slots.top?.() : this.$slots.top,\n render(this.preset.innerTagName, {\n ref: innerRef,\n key: `${id}-inner`,\n id: `${id}-inner`,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : 'auto',\n position: 'relative',\n width: !isHorizontal ? '100%' : estimatedTotalSize\n }\n }, items),\n process.env.FRAMEWORK === 'vue3' ? this.$slots.bottom?.() : this.$slots.bottom,\n ])\n }\n }\n}\n"],"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GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,EAAC,GAAG,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG;AACxE,gBAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;AAC/B,oBAAA,GAAG,EAAE,QAAQ;oBACb,GAAG,EAAE,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA;oBAClB,EAAE,EAAE,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA;AACjB,oBAAA,KAAK,EAAE;wBACL,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,kBAAkB;wBAClD,aAAa,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM;AAC5C,wBAAA,QAAQ,EAAE,UAAU;wBACpB,KAAK,EAAE,CAAC,YAAY,GAAG,MAAM,GAAG,kBAAkB;AACnD,qBAAA;AACF,iBAAA,EAAE,KAAK,CAAC;gBACT,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,MAAM,GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,EAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM;AAC/E,aAAA,CAAC,CAAA;AACH,SAAA;KACF;CACF;;;;"}
@@ -0,0 +1,4 @@
1
+ declare function renderFunc(componentName: string, options?: Record<string, any>, children?: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
2
+ [key: string]: any;
3
+ }>;
4
+ export { renderFunc as default };
@@ -0,0 +1,18 @@
1
+ import { __rest } from 'tslib';
2
+ import { h } from 'vue';
3
+
4
+ function render (componentName, options, children) {
5
+ const { attrs = {}, on = {}, props = {}, slots = {} } = options, el = __rest(options, ["attrs", "on", "props", "slots"]);
6
+ if (process.env.FRAMEWORK === 'vue3') {
7
+ // Events
8
+ Object.keys(on).forEach(key => {
9
+ const name = `on${key.charAt(0).toUpperCase()}${key.slice(1)}`;
10
+ el[name] = on[key];
11
+ });
12
+ return h(componentName, Object.assign(Object.assign(Object.assign(Object.assign({}, attrs), props), slots), el), children);
13
+ }
14
+ return h(componentName, options, children);
15
+ }
16
+
17
+ export { render as default };
18
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sources":["../../../../src/components/virtual-list/vue/render.ts"],"sourcesContent":["import { h } from 'vue'\n\nexport default function (componentName: string, options?: Record<string, any>, children?: any) {\n const { attrs = {}, on = {}, props = {}, slots = {}, ...el } = options\n if (process.env.FRAMEWORK === 'vue3') {\n // Events\n Object.keys(on).forEach(key => {\n const name = `on${key.charAt(0).toUpperCase()}${key.slice(1)}`\n el[name] = on[key]\n })\n return h(componentName, { ...attrs, ...props, ...slots, ... el }, children)\n }\n return h(componentName, options, children)\n}\n"],"names":[],"mappings":";;;AAEc,eAAA,EAAW,aAAqB,EAAE,OAA6B,EAAE,QAAc,EAAA;IAC3F,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAA,GAAY,OAAO,EAAd,EAAE,GAAA,MAAA,CAAK,OAAO,EAAhE,CAAsD,OAAA,EAAA,IAAA,EAAA,OAAA,EAAA,OAAA,CAAA,CAAU,CAAA;AACtE,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,MAAM,EAAE;;QAEpC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,IAAG;YAC5B,MAAM,IAAI,GAAG,CAAK,EAAA,EAAA,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;YAC9D,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACpB,SAAC,CAAC,CAAA;AACF,QAAA,OAAO,CAAC,CAAC,aAAa,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAO,KAAK,CAAK,EAAA,KAAK,CAAK,EAAA,KAAK,CAAM,EAAA,EAAE,CAAI,EAAA,QAAQ,CAAC,CAAA;AAC5E,KAAA;IACD,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;AAC5C;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from "./components/index";
2
+ export * from "./utils/index";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import './components/index.js';
2
+ import './utils/index.js';
3
+ export { VirtualList } from './components/virtual-list/index.js';
4
+ export { convertNumber2PX, convertPX2Int } from './utils/convert.js';
5
+ export { omit } from './utils/lodash.js';
6
+ export { getMiddleNumber, isCosDistributing } from './utils/math.js';
7
+ export { cancelTimeout, requestTimeout } from './utils/timer.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,6 @@
1
+ /** 将距离值根据单位转换为 Number 类型
2
+ * TODO: 未来可以考虑支持更多单位
3
+ */
4
+ declare function convertPX2Int(distance: string | number): string | number;
5
+ declare function convertNumber2PX(styleValue: unknown): unknown;
6
+ export { convertPX2Int, convertNumber2PX };
@@ -0,0 +1,20 @@
1
+ /** 将距离值根据单位转换为 Number 类型
2
+ * TODO: 未来可以考虑支持更多单位
3
+ */
4
+ function convertPX2Int(distance) {
5
+ if (typeof distance === 'string') {
6
+ const str = distance.toLowerCase();
7
+ if (/px$/.test(str)) {
8
+ return Number(str.replace(/px$/, ''));
9
+ }
10
+ }
11
+ return distance;
12
+ }
13
+ function convertNumber2PX(styleValue) {
14
+ if (!styleValue && styleValue !== 0)
15
+ return '';
16
+ return typeof styleValue === 'number' ? styleValue + 'px' : styleValue;
17
+ }
18
+
19
+ export { convertNumber2PX, convertPX2Int };
20
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sources":["../../src/utils/convert.ts"],"sourcesContent":["/** 将距离值根据单位转换为 Number 类型\n * TODO: 未来可以考虑支持更多单位\n */\nexport function convertPX2Int (distance: string | number) {\n if (typeof distance === 'string') {\n const str = distance.toLowerCase()\n if (/px$/.test(str)) {\n return Number(str.replace(/px$/, ''))\n }\n }\n return distance\n}\n\nexport function convertNumber2PX (styleValue: unknown) {\n if (!styleValue && styleValue !== 0) return ''\n return typeof styleValue === 'number' ? styleValue + 'px' : styleValue\n}\n"],"names":[],"mappings":"AAAA;;AAEG;AACG,SAAU,aAAa,CAAE,QAAyB,EAAA;AACtD,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AAChC,QAAA,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAA;AAClC,QAAA,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;AACtC,SAAA;AACF,KAAA;AACD,IAAA,OAAO,QAAQ,CAAA;AACjB,CAAC;AAEK,SAAU,gBAAgB,CAAE,UAAmB,EAAA;AACnD,IAAA,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE,CAAA;AAC9C,IAAA,OAAO,OAAO,UAAU,KAAK,QAAQ,GAAG,UAAU,GAAG,IAAI,GAAG,UAAU,CAAA;AACxE;;;;"}
@@ -0,0 +1,4 @@
1
+ export * from "./convert";
2
+ export * from "./lodash";
3
+ export * from "./math";
4
+ export * from "./timer";
@@ -0,0 +1,5 @@
1
+ export { convertNumber2PX, convertPX2Int } from './convert.js';
2
+ export { omit } from './lodash.js';
3
+ export { getMiddleNumber, isCosDistributing } from './math.js';
4
+ export { cancelTimeout, requestTimeout } from './timer.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,2 @@
1
+ declare function omit<T extends Record<string, unknown> = Record<string, any>, P extends string = ''>(obj?: T, fields?: P[]): Omit<T, P>;
2
+ export { omit };
@@ -0,0 +1,10 @@
1
+ function omit(obj = {}, fields = []) {
2
+ const shallow = Object.assign({}, obj);
3
+ fields.forEach((key) => {
4
+ delete shallow[key];
5
+ });
6
+ return shallow;
7
+ }
8
+
9
+ export { omit };
10
+ //# sourceMappingURL=lodash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lodash.js","sources":["../../src/utils/lodash.ts"],"sourcesContent":["export function omit<\n T extends Record<string, unknown> = Record<string, any>,\n P extends string = ''\n> (obj: T = ({} as T), fields: P[] = []): Omit<T, P> {\n const shallow = { ...obj }\n fields.forEach((key) => {\n delete shallow[key]\n })\n return shallow\n}\n"],"names":[],"mappings":"SAAgB,IAAI,CAGjB,MAAU,EAAQ,EAAE,SAAc,EAAE,EAAA;AACrC,IAAA,MAAM,OAAO,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,GAAG,CAAE,CAAA;AAC1B,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACrB,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;AACrB,KAAC,CAAC,CAAA;AACF,IAAA,OAAO,OAAO,CAAA;AAChB;;;;"}
@@ -0,0 +1,3 @@
1
+ declare function getMiddleNumber(...list: number[]): number;
2
+ declare function isCosDistributing(list: number[], datum?: number): boolean;
3
+ export { getMiddleNumber, isCosDistributing };