@tarojs/components-advanced 4.1.4-beta.1 → 4.1.4-beta.2
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/components/virtual-list/dom-helpers.js.map +1 -1
- package/dist/components/virtual-list/list-set.js.map +1 -1
- package/dist/components/virtual-list/preset.js.map +1 -1
- package/dist/components/virtual-list/react/index.js.map +1 -1
- package/dist/components/virtual-list/react/list.js.map +1 -1
- package/dist/components/virtual-list/react/validate.js.map +1 -1
- package/dist/components/virtual-list/react/wrapper.js.map +1 -1
- package/dist/components/virtual-list/utils.js.map +1 -1
- package/dist/components/virtual-list/vue/list.js.map +1 -1
- package/dist/components/virtual-waterfall/index.js.map +1 -1
- package/dist/components/virtual-waterfall/list-map.js.map +1 -1
- package/dist/components/virtual-waterfall/preset.js.map +1 -1
- package/dist/components/virtual-waterfall/react/index.js.map +1 -1
- package/dist/components/virtual-waterfall/react/waterfall.js.map +1 -1
- package/dist/components/virtual-waterfall/react/wrapper.js.map +1 -1
- package/dist/components/virtual-waterfall/vue/waterfall.js.map +1 -1
- package/dist/components/water-flow/flow-item.js.map +1 -1
- package/dist/components/water-flow/flow-section.js.map +1 -1
- package/dist/components/water-flow/node.js.map +1 -1
- package/dist/components/water-flow/root.js +1 -1
- package/dist/components/water-flow/root.js.map +1 -1
- package/dist/components/water-flow/section.js.map +1 -1
- package/dist/components/water-flow/stateful-event-bus.js.map +1 -1
- package/dist/components/water-flow/use-observed-attr.js.map +1 -1
- package/dist/components/water-flow/utils.js.map +1 -1
- package/dist/components/water-flow/water-flow.js.map +1 -1
- package/dist/utils/dom.js.map +1 -1
- package/dist/utils/math.js.map +1 -1
- package/dist/utils/vue-render.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-helpers.js","sources":["../../../src/components/virtual-list/dom-helpers.ts"],"sourcesContent":["// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nlet cachedRTLResult = null\n\nexport function getRTLOffsetType (recalculate = false) {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n outerDiv.appendChild(innerDiv)\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending'\n } else {\n outerDiv.scrollLeft = 1\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative'\n } else {\n cachedRTLResult = 'positive-ascending'\n }\n }\n\n document.body.removeChild(outerDiv)\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAI,eAAe,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"dom-helpers.js","sources":["../../../src/components/virtual-list/dom-helpers.ts"],"sourcesContent":["// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nlet cachedRTLResult = null\n\nexport function getRTLOffsetType (recalculate = false) {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n outerDiv.appendChild(innerDiv)\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending'\n } else {\n outerDiv.scrollLeft = 1\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative'\n } else {\n cachedRTLResult = 'positive-ascending'\n }\n }\n\n document.body.removeChild(outerDiv)\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAI,eAAe,GAAG,IAAI;AAEpB,SAAU,gBAAgB,CAAE,WAAW,GAAG,KAAK,EAAA;AACnD,IAAA,IAAI,eAAe,KAAK,IAAI,IAAI,WAAW,EAAE;QAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC9C,QAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK;AACjC,QAAA,UAAU,CAAC,KAAK,GAAG,MAAM;AACzB,QAAA,UAAU,CAAC,MAAM,GAAG,MAAM;AAC1B,QAAA,UAAU,CAAC,QAAQ,GAAG,QAAQ;AAC9B,QAAA,UAAU,CAAC,SAAS,GAAG,KAAK;QAC5B,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC9C,QAAA,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK;AACjC,QAAA,UAAU,CAAC,KAAK,GAAG,OAAO;AAC1B,QAAA,UAAU,CAAC,MAAM,GAAG,OAAO;AAC3B,QAAA,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC;AAC9B,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;AAEnC,QAAA,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,EAAE;YAC3B,eAAe,GAAG,qBAAqB;;aAClC;AACL,YAAA,QAAQ,CAAC,UAAU,GAAG,CAAC;AAEvB,YAAA,IAAI,QAAQ,CAAC,UAAU,KAAK,CAAC,EAAE;gBAC7B,eAAe,GAAG,UAAU;;iBACvB;gBACL,eAAe,GAAG,oBAAoB;;;AAI1C,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;AACnC,QAAA,OAAO,eAAe;;AAGxB,IAAA,OAAO,eAAe;AACxB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-set.js","sources":["../../../src/components/virtual-list/list-set.ts"],"sourcesContent":["import { isFunction } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\n\nimport { getOffsetForIndexAndAlignment } from '../../utils'\nimport { isHorizontalFunc } from './utils'\n\nimport type { IProps } from './preset'\n\ntype TProps = Pick<IProps, 'width' | 'height' | 'unlimitedSize' | 'itemCount' | 'itemData' | 'itemSize' | 'overscanCount' | 'direction' | 'layout'>\n\nexport default class ListSet {\n list: number[] = []\n mode?: 'normal' | 'function' | 'unlimited'\n defaultSize = 1\n\n wrapperHeight = 0\n wrapperWidth = 0\n\n refreshCounter = 0\n\n constructor (protected props: TProps, protected refresh?: TFunc) {\n this.update(props)\n\n // Note: 不考虑列表模式切换情况,可能会导致列表抖动体验过差\n if (this.props.unlimitedSize) {\n this.mode = 'unlimited'\n } else if (isFunction(this.props.itemSize)) {\n this.mode = 'function'\n } else {\n this.mode = 'normal'\n }\n\n this.defaultSize = (isFunction(this.props.itemSize) ? this.props.itemSize() : this.props.itemSize) || 1\n\n if (!this.isNormalMode) {\n this.list = new Array(this.length).fill(-1)\n }\n }\n\n get isNormalMode () {\n return this.mode === 'normal'\n }\n\n get isFunctionMode () {\n return this.mode === 'function'\n }\n\n get isUnlimitedMode () {\n return this.mode === 'unlimited'\n }\n\n get length () {\n return this.props.itemCount || 100\n }\n\n get overscan () {\n return this.props.overscanCount || 0\n }\n\n get wrapperSize () {\n return isHorizontalFunc(this.props) ? this.wrapperWidth : this.wrapperHeight\n }\n\n update (props: TProps) {\n this.props = props\n\n if (this.length > this.list.length) {\n const arr = new Array(this.length - this.list.length).fill(-1)\n this.list.push(...arr)\n } else if (this.length < this.list.length) {\n this.list.length = this.length\n }\n }\n\n setSize (i = 0, size = this.defaultSize) {\n this.list[i] = size\n this.refresh?.()\n this.refreshCounter++\n }\n\n getSize (i = 0) {\n const size = this.props.itemSize\n const item = this.list[i]\n if (item >= 0) return item\n\n if (this.isFunctionMode && isFunction(size)) {\n const itemSize = size(i, this.props.itemData)\n this.setSize(i, itemSize)\n return itemSize\n }\n return this.defaultSize\n }\n\n getOffsetSize (i = this.list.length) {\n if (this.isNormalMode) return i * this.defaultSize\n return this.list.slice(0, i).reduce((sum, _, idx) => sum + this.getSize(idx), 0)\n }\n\n getOffsetSizeCache = memoizeOne((i = this.list.length, _flag = this.refreshCounter) => {\n return this.getOffsetSize(i)\n })\n\n getSizeCount (offset = 0) {\n if (offset === 0) return 0\n // if (this.isNormalMode) {\n // return Math.min(this.length - 1, Math.floor(offset / this.length))\n // }\n let offsetSize = 0\n const count = this.list.reduce((sum, _, idx) => {\n if (offsetSize < offset) {\n offsetSize += this.getSize(idx)\n return ++sum\n }\n return sum\n }, 0)\n return count - 1\n }\n\n getStartIndex (scrollOffset = 0) {\n return Math.max(0, this.getSizeCount(scrollOffset) - 1)\n }\n\n getStopIndex (wrapperSize = 0, scrollOffset = 0, startIndex = 0) {\n // const visibleOffset = this.getOffsetSizeCache(startIndex)\n // if (this.isNormalMode) {\n // const numVisibleItems = Math.ceil((wrapperSize + scrollOffset - visibleOffset) / this.length)\n // /** -1 is because stop index is inclusive */\n // return Math.max(startIndex, Math.min(this.length - 1, startIndex + numVisibleItems - 1))\n // }\n return Math.max(startIndex, Math.min(this.length - 1, this.getSizeCount(wrapperSize + scrollOffset)))\n }\n\n getRangeToRender (direction: 'forward' | 'backward', scrollOffset = 0, block = false) {\n if (this.length === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = this.getStartIndex(scrollOffset)\n const stopIndex = this.getStopIndex(this.wrapperSize, scrollOffset, startIndex)\n\n // Overscan by one item in each direction so that tab/focus works. If there isn't at least one extra item, tab loops back around.\n const overscanBackward = !block || direction === 'backward' ? Math.max(1, this.overscan) : 1\n const overscanForward = !block || direction === 'forward' ? Math.max(1, this.overscan) : 1\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(this.length - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex\n ]\n }\n\n getOffsetForIndexAndAlignment (index: number, align: string, scrollOffset: number) {\n return getOffsetForIndexAndAlignment({\n align,\n containerSize: this.wrapperSize,\n currentOffset: scrollOffset,\n scrollSize: this.getOffsetSizeCache(this.length),\n slideSize: this.getSize(index),\n targetOffset: this.getOffsetSizeCache(index),\n })\n }\n\n compareSize (i = 0, size = this.defaultSize) {\n if (this.isNormalMode) return true\n return this.getSize(i) === size\n }\n}\n"],"names":[],"mappings":";;;;;;AAUc,MAAO,OAAO,CAAA;IAU1B,WAAuB,CAAA,KAAa,EAAY,OAAe,EAAA;QAAxC,IAAK,CAAA,KAAA,GAAL,KAAK;QAAoB,IAAO,CAAA,OAAA,GAAP,OAAO;QATvD,IAAI,CAAA,IAAA,GAAa,EAAE;QAEnB,IAAW,CAAA,WAAA,GAAG,CAAC;QAEf,IAAa,CAAA,aAAA,GAAG,CAAC;QACjB,IAAY,CAAA,YAAA,GAAG,CAAC;QAEhB,IAAc,CAAA,cAAA,GAAG,CAAC;AAgFlB,QAAA,IAAA,CAAA,kBAAkB,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAAC,cAAc,KAAI;AACpF,YAAA,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;AAC9B,SAAC,CAAC;AA/EA,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;;AA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,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;AAC7C,SAAA,CAAC;;IAGJ,WAAW,CAAE,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,WAAW,EAAA;QACzC,IAAI,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,IAAI;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI;;AAElC;;;;"}
|
|
1
|
+
{"version":3,"file":"list-set.js","sources":["../../../src/components/virtual-list/list-set.ts"],"sourcesContent":["import { isFunction } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\n\nimport { getOffsetForIndexAndAlignment } from '../../utils'\nimport { isHorizontalFunc } from './utils'\n\nimport type { IProps } from './preset'\n\ntype TProps = Pick<IProps, 'width' | 'height' | 'unlimitedSize' | 'itemCount' | 'itemData' | 'itemSize' | 'overscanCount' | 'direction' | 'layout'>\n\nexport default class ListSet {\n list: number[] = []\n mode?: 'normal' | 'function' | 'unlimited'\n defaultSize = 1\n\n wrapperHeight = 0\n wrapperWidth = 0\n\n refreshCounter = 0\n\n constructor (protected props: TProps, protected refresh?: TFunc) {\n this.update(props)\n\n // Note: 不考虑列表模式切换情况,可能会导致列表抖动体验过差\n if (this.props.unlimitedSize) {\n this.mode = 'unlimited'\n } else if (isFunction(this.props.itemSize)) {\n this.mode = 'function'\n } else {\n this.mode = 'normal'\n }\n\n this.defaultSize = (isFunction(this.props.itemSize) ? this.props.itemSize() : this.props.itemSize) || 1\n\n if (!this.isNormalMode) {\n this.list = new Array(this.length).fill(-1)\n }\n }\n\n get isNormalMode () {\n return this.mode === 'normal'\n }\n\n get isFunctionMode () {\n return this.mode === 'function'\n }\n\n get isUnlimitedMode () {\n return this.mode === 'unlimited'\n }\n\n get length () {\n return this.props.itemCount || 100\n }\n\n get overscan () {\n return this.props.overscanCount || 0\n }\n\n get wrapperSize () {\n return isHorizontalFunc(this.props) ? this.wrapperWidth : this.wrapperHeight\n }\n\n update (props: TProps) {\n this.props = props\n\n if (this.length > this.list.length) {\n const arr = new Array(this.length - this.list.length).fill(-1)\n this.list.push(...arr)\n } else if (this.length < this.list.length) {\n this.list.length = this.length\n }\n }\n\n setSize (i = 0, size = this.defaultSize) {\n this.list[i] = size\n this.refresh?.()\n this.refreshCounter++\n }\n\n getSize (i = 0) {\n const size = this.props.itemSize\n const item = this.list[i]\n if (item >= 0) return item\n\n if (this.isFunctionMode && isFunction(size)) {\n const itemSize = size(i, this.props.itemData)\n this.setSize(i, itemSize)\n return itemSize\n }\n return this.defaultSize\n }\n\n getOffsetSize (i = this.list.length) {\n if (this.isNormalMode) return i * this.defaultSize\n return this.list.slice(0, i).reduce((sum, _, idx) => sum + this.getSize(idx), 0)\n }\n\n getOffsetSizeCache = memoizeOne((i = this.list.length, _flag = this.refreshCounter) => {\n return this.getOffsetSize(i)\n })\n\n getSizeCount (offset = 0) {\n if (offset === 0) return 0\n // if (this.isNormalMode) {\n // return Math.min(this.length - 1, Math.floor(offset / this.length))\n // }\n let offsetSize = 0\n const count = this.list.reduce((sum, _, idx) => {\n if (offsetSize < offset) {\n offsetSize += this.getSize(idx)\n return ++sum\n }\n return sum\n }, 0)\n return count - 1\n }\n\n getStartIndex (scrollOffset = 0) {\n return Math.max(0, this.getSizeCount(scrollOffset) - 1)\n }\n\n getStopIndex (wrapperSize = 0, scrollOffset = 0, startIndex = 0) {\n // const visibleOffset = this.getOffsetSizeCache(startIndex)\n // if (this.isNormalMode) {\n // const numVisibleItems = Math.ceil((wrapperSize + scrollOffset - visibleOffset) / this.length)\n // /** -1 is because stop index is inclusive */\n // return Math.max(startIndex, Math.min(this.length - 1, startIndex + numVisibleItems - 1))\n // }\n return Math.max(startIndex, Math.min(this.length - 1, this.getSizeCount(wrapperSize + scrollOffset)))\n }\n\n getRangeToRender (direction: 'forward' | 'backward', scrollOffset = 0, block = false) {\n if (this.length === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = this.getStartIndex(scrollOffset)\n const stopIndex = this.getStopIndex(this.wrapperSize, scrollOffset, startIndex)\n\n // Overscan by one item in each direction so that tab/focus works. If there isn't at least one extra item, tab loops back around.\n const overscanBackward = !block || direction === 'backward' ? Math.max(1, this.overscan) : 1\n const overscanForward = !block || direction === 'forward' ? Math.max(1, this.overscan) : 1\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(this.length - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex\n ]\n }\n\n getOffsetForIndexAndAlignment (index: number, align: string, scrollOffset: number) {\n return getOffsetForIndexAndAlignment({\n align,\n containerSize: this.wrapperSize,\n currentOffset: scrollOffset,\n scrollSize: this.getOffsetSizeCache(this.length),\n slideSize: this.getSize(index),\n targetOffset: this.getOffsetSizeCache(index),\n })\n }\n\n compareSize (i = 0, size = this.defaultSize) {\n if (this.isNormalMode) return true\n return this.getSize(i) === size\n }\n}\n"],"names":[],"mappings":";;;;;;AAUc,MAAO,OAAO,CAAA;IAU1B,WAAA,CAAuB,KAAa,EAAY,OAAe,EAAA;QAAxC,IAAA,CAAA,KAAK,GAAL,KAAK;QAAoB,IAAA,CAAA,OAAO,GAAP,OAAO;QATvD,IAAA,CAAA,IAAI,GAAa,EAAE;QAEnB,IAAA,CAAA,WAAW,GAAG,CAAC;QAEf,IAAA,CAAA,aAAa,GAAG,CAAC;QACjB,IAAA,CAAA,YAAY,GAAG,CAAC;QAEhB,IAAA,CAAA,cAAc,GAAG,CAAC;AAgFlB,QAAA,IAAA,CAAA,kBAAkB,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAAC,cAAc,KAAI;AACpF,YAAA,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;AAC9B,SAAC,CAAC;AA/EA,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;;AAGlB,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;AA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7C,SAAA,CAAC;;IAGJ,WAAW,CAAE,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,WAAW,EAAA;QACzC,IAAI,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,IAAI;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI;;AAElC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.js","sources":["../../../src/components/virtual-list/preset.ts"],"sourcesContent":["import { type IntersectionObserver, createIntersectionObserver, createSelectorQuery, getCurrentInstance } from '@tarojs/taro'\nimport * as CSS from 'csstype'\nimport memoizeOne from 'memoize-one'\n\nimport { convertNumber2PX, defaultItemKey, getRectSizeSync, isCosDistributing, throttle } from '../../utils'\nimport ListSet from './list-set'\nimport { isHorizontalFunc, isRtlFunc } from './utils'\n\nimport type { VirtualListProps } from './'\n\nlet INSTANCE_ID = 0\n\nexport interface IProps extends Partial<VirtualListProps> {\n children?: VirtualListProps['item']\n direction?: 'ltr' | 'rtl' | 'horizontal' | 'vertical'\n itemKey?: typeof defaultItemKey\n itemTagName?: string\n innerTagName?: string\n outerTagName?: string\n innerRef?: React.Ref<HTMLElement> | string\n outerRef?: React.Ref<HTMLElement> | string\n onItemsRendered?: TFunc\n shouldResetStyleCacheOnItemSizeChange?: boolean\n outerWrapper?: React.FC\n}\n\nexport default class Preset {\n itemList: ListSet\n _id: string\n _observer: Record<string, IntersectionObserver> = {}\n\n constructor (protected props: IProps, protected refresh?: TFunc) {\n this.init(this.props)\n this.itemList = new ListSet(props, refresh)\n }\n\n wrapperField = {\n scrollLeft: 0,\n scrollTop: 0,\n scrollHeight: 0,\n scrollWidth: 0,\n clientHeight: 0,\n clientWidth: 0,\n diffOffset: 0\n }\n\n diffList: number[] = [0, 0, 0]\n\n init (props: IProps) {\n this.props = props\n }\n\n update (props: IProps) {\n this.props = props\n this.itemList.update(props)\n }\n\n async updateWrapper (id: string) {\n this.id = id\n const { width = 0, height = 0 } = this.props\n const validWidth = typeof width === 'number' && width > 0\n const validHeight = typeof height === 'number' && height > 0\n if (validWidth) {\n this.itemList.wrapperWidth = width\n }\n if (validHeight) {\n this.itemList.wrapperHeight = height\n }\n\n if (!validHeight || !validWidth) {\n const res = await getRectSizeSync(`#${id}`, 100)\n this.itemList.wrapperWidth ||= res.width\n this.itemList.wrapperHeight ||= res.height\n this.refresh?.()\n }\n\n this.itemList.update(this.props)\n }\n\n set id (id: string) {\n this._id = id\n }\n\n get id () {\n this._id ||= `virtual-waterfall-${INSTANCE_ID++}`\n return this._id\n }\n\n get isHorizontal () {\n return isHorizontalFunc(this.props)\n }\n\n get isRtl () {\n return isRtlFunc(this.props)\n }\n\n get isRelative () {\n return this.props.position && this.props.position !== 'absolute'\n }\n\n get isBrick () {\n return this.props.position === 'brick'\n }\n\n get placeholderCount () {\n return this.props.placeholderCount >= 0 ? this.props.placeholderCount : this.props.overscanCount\n }\n\n get outerElement () {\n return this.props.outerElementType || this.props.outerTagName || 'div'\n }\n\n get innerElement () {\n return this.props.innerElementType || this.props.innerTagName || 'div'\n }\n\n get itemElement () {\n return this.props.itemElementType || this.props.itemTagName || 'div'\n }\n\n get field () {\n return this.wrapperField\n }\n\n set field (o: Record<string, number>) {\n Object.assign(this.wrapperField, o)\n // Object.keys(o).forEach(key => {\n // if (typeof o[key] === 'number' && typeof this.wrapperField[key] === 'number') {\n // this.wrapperField[key] = o[key]\n // }\n // })\n }\n\n get enhanced () {\n return this.props.enhanced || true\n }\n\n isShaking (diff?: number) {\n if (process.env.TARO_PLATFORM === 'web' || this.props.enhanced) return false\n const list = this.diffList.slice(-3)\n this.diffList.push(diff)\n return list.findIndex(e => Math.abs(e) === Math.abs(diff)) !== -1 || isCosDistributing(this.diffList.slice(-4))\n }\n\n resetCache () {\n this.itemList.refreshCounter++\n }\n\n getItemStyleCache = memoizeOne((\n itemIndex?: number,\n itemSize?: IProps['itemSize'] | false,\n _flag = this.itemList.refreshCounter\n ) => {\n itemSize = itemSize || this.itemList.getSize(itemIndex)\n const style: CSS.Properties<string | number> = this.isRelative ? {} : {\n position: 'absolute',\n }\n const offset = convertNumber2PX(this.itemList.getOffsetSizeCache(itemIndex))\n const size = convertNumber2PX(this.itemList.getSize(itemIndex))\n const isHorizontal = this.isHorizontal\n const isRtl = this.isRtl\n style.height = !isHorizontal ? size : '100%'\n style.width = isHorizontal ? size : '100%'\n if (!this.isRelative) {\n const offsetHorizontal = isHorizontal ? offset : 0\n style.top = !isHorizontal ? offset : 0\n if (isRtl) {\n style.right = offsetHorizontal\n } else {\n style.left = offsetHorizontal\n }\n }\n\n return style\n })\n\n getItemStyle (index: number) {\n const {\n shouldResetStyleCacheOnItemSizeChange\n } = this.props\n\n return this.getItemStyleCache(\n index,\n shouldResetStyleCacheOnItemSizeChange ? this.itemList.getSize(index) : false,\n )\n }\n\n boundaryDetection () {\n if ([typeof this.props.onScrollToUpper, typeof this.props.onScrollToLower].every(e => e !== 'function')) return\n\n createSelectorQuery().select(`#${this.id}`).node().exec(() => {\n const upperObserver = this.boundaryDetectionHelper({\n event: typeof this.props.onScrollToUpper === 'function' ? () => {\n if (this.field.diffOffset >= 0) this.props.onScrollToUpper()\n } : undefined,\n id: `${this.id}-${this.isHorizontal ? this.isRtl ? 'right' : 'left' : 'top'}`,\n })\n if (upperObserver) {\n this._observer.top = upperObserver\n }\n\n const lowerObserver = this.boundaryDetectionHelper({\n event: typeof this.props.onScrollToLower === 'function' ? () => {\n if (this.field.diffOffset <= 0) this.props.onScrollToLower()\n } : undefined,\n id: `${this.id}-${this.isHorizontal ? this.isRtl ? 'left' : 'right' : 'bottom'}`,\n })\n if (lowerObserver) {\n this._observer.bottom = lowerObserver\n }\n })\n }\n\n boundaryDetectionHelper ({\n component,\n event,\n id,\n }: {\n component?: TaroGeneral.IAnyObject\n event?: () => void\n id: string\n }) {\n if (typeof event !== 'function') return\n const eventFunc = throttle(event)\n\n component ||= getCurrentInstance().page\n const observer = createIntersectionObserver(component, {\n thresholds: [0.4],\n })\n\n observer\n .relativeTo(`#${this.id}`, {\n top: typeof this.props.lowerThreshold === 'number' ? this.props.lowerThreshold : 50,\n bottom: typeof this.props.upperThreshold === 'number' ? this.props.upperThreshold : 50,\n })\n .observe(`#${id}`, eventFunc)\n\n return observer\n }\n\n dispose () {\n Object.values(this._observer).forEach(e => e.disconnect?.())\n this._observer = {}\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAUA,IAAI,WAAW,GAAG,CAAC;AAgBL,MAAO,MAAM,CAAA;IAKzB,WAAuB,CAAA,KAAa,EAAY,OAAe,EAAA;QAAxC,IAAK,CAAA,KAAA,GAAL,KAAK;QAAoB,IAAO,CAAA,OAAA,GAAP,OAAO;QAFvD,IAAS,CAAA,SAAA,GAAyC,EAAE;AAOpD,QAAA,IAAA,CAAA,YAAY,GAAG;AACb,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,YAAY,EAAE,CAAC;AACf,YAAA,WAAW,EAAE,CAAC;AACd,YAAA,YAAY,EAAE,CAAC;AACf,YAAA,WAAW,EAAE,CAAC;AACd,YAAA,UAAU,EAAE;SACb;QAED,IAAQ,CAAA,QAAA,GAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAsG9B,QAAA,IAAA,CAAA,iBAAiB,GAAG,UAAU,CAAC,CAC7B,SAAkB,EAClB,QAAqC,EACrC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,KAClC;YACF,QAAQ,GAAG,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC;YACvD,MAAM,KAAK,GAAoC,IAAI,CAAC,UAAU,GAAG,EAAE,GAAG;AACpE,gBAAA,QAAQ,EAAE,UAAU;aACrB;AACD,YAAA,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAC5E,YAAA,MAAM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ClB,SAAA,CAAC;QAEF;AACG,aAAA,UAAU,CAAC,CAAI,CAAA,EAAA,IAAI,CAAC,EAAE,EAAE,EAAE;YACzB,GAAG,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,EAAE;YACnF,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,EAAE;SACvF;AACA,aAAA,OAAO,CAAC,CAAI,CAAA,EAAA,EAAE,EAAE,EAAE,SAAS,CAAC;AAE/B,QAAA,OAAO,QAAQ;;IAGjB,OAAO,GAAA;QACL,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,IAAG,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAA,CAAC,CAAC,UAAU,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAC;AAC5D,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;;AAEtB;;;;"}
|
|
1
|
+
{"version":3,"file":"preset.js","sources":["../../../src/components/virtual-list/preset.ts"],"sourcesContent":["import { type IntersectionObserver, createIntersectionObserver, createSelectorQuery, getCurrentInstance } from '@tarojs/taro'\nimport * as CSS from 'csstype'\nimport memoizeOne from 'memoize-one'\n\nimport { convertNumber2PX, defaultItemKey, getRectSizeSync, isCosDistributing, throttle } from '../../utils'\nimport ListSet from './list-set'\nimport { isHorizontalFunc, isRtlFunc } from './utils'\n\nimport type { VirtualListProps } from './'\n\nlet INSTANCE_ID = 0\n\nexport interface IProps extends Partial<VirtualListProps> {\n children?: VirtualListProps['item']\n direction?: 'ltr' | 'rtl' | 'horizontal' | 'vertical'\n itemKey?: typeof defaultItemKey\n itemTagName?: string\n innerTagName?: string\n outerTagName?: string\n innerRef?: React.Ref<HTMLElement> | string\n outerRef?: React.Ref<HTMLElement> | string\n onItemsRendered?: TFunc\n shouldResetStyleCacheOnItemSizeChange?: boolean\n outerWrapper?: React.FC\n}\n\nexport default class Preset {\n itemList: ListSet\n _id: string\n _observer: Record<string, IntersectionObserver> = {}\n\n constructor (protected props: IProps, protected refresh?: TFunc) {\n this.init(this.props)\n this.itemList = new ListSet(props, refresh)\n }\n\n wrapperField = {\n scrollLeft: 0,\n scrollTop: 0,\n scrollHeight: 0,\n scrollWidth: 0,\n clientHeight: 0,\n clientWidth: 0,\n diffOffset: 0\n }\n\n diffList: number[] = [0, 0, 0]\n\n init (props: IProps) {\n this.props = props\n }\n\n update (props: IProps) {\n this.props = props\n this.itemList.update(props)\n }\n\n async updateWrapper (id: string) {\n this.id = id\n const { width = 0, height = 0 } = this.props\n const validWidth = typeof width === 'number' && width > 0\n const validHeight = typeof height === 'number' && height > 0\n if (validWidth) {\n this.itemList.wrapperWidth = width\n }\n if (validHeight) {\n this.itemList.wrapperHeight = height\n }\n\n if (!validHeight || !validWidth) {\n const res = await getRectSizeSync(`#${id}`, 100)\n this.itemList.wrapperWidth ||= res.width\n this.itemList.wrapperHeight ||= res.height\n this.refresh?.()\n }\n\n this.itemList.update(this.props)\n }\n\n set id (id: string) {\n this._id = id\n }\n\n get id () {\n this._id ||= `virtual-waterfall-${INSTANCE_ID++}`\n return this._id\n }\n\n get isHorizontal () {\n return isHorizontalFunc(this.props)\n }\n\n get isRtl () {\n return isRtlFunc(this.props)\n }\n\n get isRelative () {\n return this.props.position && this.props.position !== 'absolute'\n }\n\n get isBrick () {\n return this.props.position === 'brick'\n }\n\n get placeholderCount () {\n return this.props.placeholderCount >= 0 ? this.props.placeholderCount : this.props.overscanCount\n }\n\n get outerElement () {\n return this.props.outerElementType || this.props.outerTagName || 'div'\n }\n\n get innerElement () {\n return this.props.innerElementType || this.props.innerTagName || 'div'\n }\n\n get itemElement () {\n return this.props.itemElementType || this.props.itemTagName || 'div'\n }\n\n get field () {\n return this.wrapperField\n }\n\n set field (o: Record<string, number>) {\n Object.assign(this.wrapperField, o)\n // Object.keys(o).forEach(key => {\n // if (typeof o[key] === 'number' && typeof this.wrapperField[key] === 'number') {\n // this.wrapperField[key] = o[key]\n // }\n // })\n }\n\n get enhanced () {\n return this.props.enhanced || true\n }\n\n isShaking (diff?: number) {\n if (process.env.TARO_PLATFORM === 'web' || this.props.enhanced) return false\n const list = this.diffList.slice(-3)\n this.diffList.push(diff)\n return list.findIndex(e => Math.abs(e) === Math.abs(diff)) !== -1 || isCosDistributing(this.diffList.slice(-4))\n }\n\n resetCache () {\n this.itemList.refreshCounter++\n }\n\n getItemStyleCache = memoizeOne((\n itemIndex?: number,\n itemSize?: IProps['itemSize'] | false,\n _flag = this.itemList.refreshCounter\n ) => {\n itemSize = itemSize || this.itemList.getSize(itemIndex)\n const style: CSS.Properties<string | number> = this.isRelative ? {} : {\n position: 'absolute',\n }\n const offset = convertNumber2PX(this.itemList.getOffsetSizeCache(itemIndex))\n const size = convertNumber2PX(this.itemList.getSize(itemIndex))\n const isHorizontal = this.isHorizontal\n const isRtl = this.isRtl\n style.height = !isHorizontal ? size : '100%'\n style.width = isHorizontal ? size : '100%'\n if (!this.isRelative) {\n const offsetHorizontal = isHorizontal ? offset : 0\n style.top = !isHorizontal ? offset : 0\n if (isRtl) {\n style.right = offsetHorizontal\n } else {\n style.left = offsetHorizontal\n }\n }\n\n return style\n })\n\n getItemStyle (index: number) {\n const {\n shouldResetStyleCacheOnItemSizeChange\n } = this.props\n\n return this.getItemStyleCache(\n index,\n shouldResetStyleCacheOnItemSizeChange ? this.itemList.getSize(index) : false,\n )\n }\n\n boundaryDetection () {\n if ([typeof this.props.onScrollToUpper, typeof this.props.onScrollToLower].every(e => e !== 'function')) return\n\n createSelectorQuery().select(`#${this.id}`).node().exec(() => {\n const upperObserver = this.boundaryDetectionHelper({\n event: typeof this.props.onScrollToUpper === 'function' ? () => {\n if (this.field.diffOffset >= 0) this.props.onScrollToUpper()\n } : undefined,\n id: `${this.id}-${this.isHorizontal ? this.isRtl ? 'right' : 'left' : 'top'}`,\n })\n if (upperObserver) {\n this._observer.top = upperObserver\n }\n\n const lowerObserver = this.boundaryDetectionHelper({\n event: typeof this.props.onScrollToLower === 'function' ? () => {\n if (this.field.diffOffset <= 0) this.props.onScrollToLower()\n } : undefined,\n id: `${this.id}-${this.isHorizontal ? this.isRtl ? 'left' : 'right' : 'bottom'}`,\n })\n if (lowerObserver) {\n this._observer.bottom = lowerObserver\n }\n })\n }\n\n boundaryDetectionHelper ({\n component,\n event,\n id,\n }: {\n component?: TaroGeneral.IAnyObject\n event?: () => void\n id: string\n }) {\n if (typeof event !== 'function') return\n const eventFunc = throttle(event)\n\n component ||= getCurrentInstance().page\n const observer = createIntersectionObserver(component, {\n thresholds: [0.4],\n })\n\n observer\n .relativeTo(`#${this.id}`, {\n top: typeof this.props.lowerThreshold === 'number' ? this.props.lowerThreshold : 50,\n bottom: typeof this.props.upperThreshold === 'number' ? this.props.upperThreshold : 50,\n })\n .observe(`#${id}`, eventFunc)\n\n return observer\n }\n\n dispose () {\n Object.values(this._observer).forEach(e => e.disconnect?.())\n this._observer = {}\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAUA,IAAI,WAAW,GAAG,CAAC;AAgBL,MAAO,MAAM,CAAA;IAKzB,WAAA,CAAuB,KAAa,EAAY,OAAe,EAAA;QAAxC,IAAA,CAAA,KAAK,GAAL,KAAK;QAAoB,IAAA,CAAA,OAAO,GAAP,OAAO;QAFvD,IAAA,CAAA,SAAS,GAAyC,EAAE;AAOpD,QAAA,IAAA,CAAA,YAAY,GAAG;AACb,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,YAAY,EAAE,CAAC;AACf,YAAA,WAAW,EAAE,CAAC;AACd,YAAA,YAAY,EAAE,CAAC;AACf,YAAA,WAAW,EAAE,CAAC;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A,CAAI,CAAA,EAAA,CAAC;AAC5D,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;;AAEtB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/virtual-list/react/index.ts"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport React from 'react'\n\nimport List from './list'\nimport outerWrapper from './wrapper'\n\nimport type { VirtualListProps } from '../'\nimport type { IProps } from '../preset'\n\nconst VirtualList = React.forwardRef(function VirtualList (props: VirtualListProps, ref) {\n const {\n direction = 'ltr',\n outerElementType = ScrollView,\n innerElementType = View,\n itemElementType = View,\n initialScrollOffset = 0,\n overscanCount = 1,\n queryPrefix = '',\n ...rest\n } = props as IProps\n\n if ('children' in rest) {\n console.warn('Taro(VirtualList): children props have been deprecated. ' + 'Please use the item props instead.')\n rest.item = rest.children as IProps['item']\n }\n if (rest.item instanceof Array) {\n console.warn('Taro(VirtualList): item should not be an array')\n rest.item = rest.item[0]\n }\n return React.createElement(List, {\n ref,\n ...rest,\n outerElementType,\n itemElementType,\n innerElementType,\n direction,\n initialScrollOffset,\n overscanCount,\n queryPrefix,\n outerWrapper,\n })\n})\n\nexport default VirtualList\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/virtual-list/react/index.ts"],"sourcesContent":["import { ScrollView, View } from '@tarojs/components'\nimport React from 'react'\n\nimport List from './list'\nimport outerWrapper from './wrapper'\n\nimport type { VirtualListProps } from '../'\nimport type { IProps } from '../preset'\n\nconst VirtualList = React.forwardRef(function VirtualList (props: VirtualListProps, ref) {\n const {\n direction = 'ltr',\n outerElementType = ScrollView,\n innerElementType = View,\n itemElementType = View,\n initialScrollOffset = 0,\n overscanCount = 1,\n queryPrefix = '',\n ...rest\n } = props as IProps\n\n if ('children' in rest) {\n console.warn('Taro(VirtualList): children props have been deprecated. ' + 'Please use the item props instead.')\n rest.item = rest.children as IProps['item']\n }\n if (rest.item instanceof Array) {\n console.warn('Taro(VirtualList): item should not be an array')\n rest.item = rest.item[0]\n }\n return React.createElement(List, {\n ref,\n ...rest,\n outerElementType,\n itemElementType,\n innerElementType,\n direction,\n initialScrollOffset,\n overscanCount,\n queryPrefix,\n outerWrapper,\n })\n})\n\nexport default VirtualList\n"],"names":[],"mappings":";;;;;;AASA,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,WAAW,CAAE,KAAuB,EAAE,GAAG,EAAA;AACrF,IAAA,MAAM,KASF,KAAe,EATb,EACJ,SAAS,GAAG,KAAK,EACjB,gBAAgB,GAAG,UAAU,EAC7B,gBAAgB,GAAG,IAAI,EACvB,eAAe,GAAG,IAAI,EACtB,mBAAmB,GAAG,CAAC,EACvB,aAAa,GAAG,CAAC,EACjB,WAAW,GAAG,EAAE,EAAA,GAAA,EAEC,EADd,IAAI,GAAA,MAAA,CAAA,EAAA,EARH,CAAA,WAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,aAAA,CASL,CAAkB;AAEnB,IAAA,IAAI,UAAU,IAAI,IAAI,EAAE;AACtB,QAAA,OAAO,CAAC,IAAI,CAAC,0DAA0D,GAAG,oCAAoC,CAAC;AAC/G,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAA0B;;AAE7C,IAAA,IAAI,IAAI,CAAC,IAAI,YAAY,KAAK,EAAE;AAC9B,QAAA,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;;IAE1B,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,gCAC7B,GAAG,EAAA,EACA,IAAI,CAAA,EAAA,EACP,gBAAgB;QAChB,eAAe;QACf,gBAAgB;QAChB,SAAS;QACT,mBAAmB;QACnB,aAAa;QACb,WAAW;AACX,QAAA,YAAY,IACZ;AACJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../src/components/virtual-list/react/list.ts"],"sourcesContent":["import { isNumber } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\nimport React from 'react'\n\nimport { cancelTimeout, convertNumber2PX, defaultItemKey, getRectSizeSync, getScrollViewContextNode, omit, requestTimeout } from '../../../utils'\nimport { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants'\nimport { getRTLOffsetType } from '../dom-helpers'\nimport ListSet from '../list-set'\nimport Preset from '../preset'\nimport { validateListProps } from './validate'\n\nimport type { IProps } from '../preset'\n\nexport interface IState {\n instance: List\n isScrolling: boolean\n scrollDirection: 'forward' | 'backward'\n scrollOffset: number\n scrollUpdateWasRequested: boolean\n refreshCount: number\n}\n\nexport default class List extends React.PureComponent<IProps, IState> {\n static defaultProps: IProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false,\n shouldResetStyleCacheOnItemSizeChange: true\n }\n\n static getDerivedStateFromProps (nextProps: IProps, prevState: IState) {\n return validateListProps(nextProps, prevState)\n }\n\n itemList: ListSet\n preset: Preset\n\n constructor (props: IProps) {\n super(props)\n\n this.preset = new Preset(\n props,\n this.refresh,\n )\n this.itemList = this.preset.itemList\n const id = this.props.id || this.preset.id\n this.preset.updateWrapper(id)\n\n this.state = {\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 refreshCount: 0,\n }\n }\n\n refresh = () => {\n if (process.env.FRAMEWORK === 'preact') {\n this.forceUpdate()\n } else {\n this.setState(({ refreshCount }) => ({\n refreshCount: ++refreshCount\n }))\n }\n }\n\n _outerRef = undefined\n\n _resetIsScrollingTimeoutId = null\n\n _callOnItemsRendered = memoizeOne((overscanStartIndex, overscanStopIndex, startIndex, stopIndex) => this.props.onItemsRendered({\n overscanStartIndex,\n overscanStopIndex,\n startIndex,\n stopIndex\n }))\n\n _callOnScroll = memoizeOne((scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) => this.props.onScroll({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n } as any))\n\n _callPropsCallbacks (prevProps: any = {}, prevState: any = {}) {\n if (typeof this.props.onItemsRendered === 'function') {\n if (this.props.itemCount > 0) {\n if (prevProps && prevProps.itemCount !== this.props.itemCount) {\n const [overscanStartIndex, overscanStopIndex, startIndex, stopIndex] = this._getRangeToRender()\n\n this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, startIndex, stopIndex)\n }\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n if (!prevState ||\n prevState.scrollDirection !== this.state.scrollDirection ||\n prevState.scrollOffset !== this.state.scrollOffset ||\n prevState.scrollUpdateWasRequested !== this.state.scrollUpdateWasRequested\n ) {\n this._callOnScroll(\n this.state.scrollDirection,\n this.state.scrollOffset,\n this.state.scrollUpdateWasRequested,\n this.preset.field\n )\n }\n }\n\n if (this.itemList.isUnlimitedMode) {\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\n _getSizeUploadSync = (index: number, isHorizontal: boolean) => {\n return new Promise((resolve) => {\n if (index >= 0 && index < this.props.itemCount) {\n const times = this.itemList.compareSize(index) ? 3 : 0\n getRectSizeSync(`${this.props.queryPrefix}#${this.preset.id}-${index}`, 100, times).then(({ width, height }) => {\n const size = isHorizontal ? width : height\n if (typeof size === 'number' && size > 0 && !this.itemList.compareSize(index, size)) {\n this.itemList.setSize(index, size)\n resolve(this.itemList.getSize(index))\n }\n })\n }\n })\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getRangeToRender () {\n return this.itemList.getRangeToRender(\n this.state.scrollDirection,\n this.state.scrollOffset,\n this.state.isScrolling\n )\n }\n\n _onScrollHorizontal = event => {\n const {\n scrollHeight,\n scrollWidth = this.itemList.getOffsetSizeCache(),\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientWidth = this.itemList.wrapperSize\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop,\n scrollLeft,\n clientHeight: scrollHeight,\n clientWidth: scrollWidth\n }\n this.setState((prevState: any) => {\n const diffOffset = this.preset.field.scrollLeft - scrollLeft\n if (prevState.scrollOffset === scrollLeft || this.preset.isShaking(diffOffset)) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null\n }\n\n let scrollOffset = scrollLeft\n\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\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft\n break\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n this.preset.field = {\n scrollWidth: scrollOffset,\n }\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false\n }\n }, this._resetIsScrollingDebounced)\n }\n\n _onScrollVertical = event => {\n const {\n scrollHeight = this.itemList.getOffsetSizeCache(),\n scrollWidth,\n scrollTop,\n scrollLeft\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientHeight = this.itemList.wrapperSize\n this.setState((prevState: IState) => {\n const diffOffset = this.preset.field.scrollTop - scrollTop\n if (prevState.scrollOffset === scrollTop || this.preset.isShaking(diffOffset)) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null\n }\n // FIXME preact 中使用时,该组件会出现触底滚动事件重复触发导致的抖动问题,后续修复\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight))\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop: scrollOffset,\n scrollLeft,\n clientHeight,\n clientWidth: scrollWidth,\n diffOffset: this.preset.field.scrollTop - scrollOffset,\n }\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false\n }\n }, 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('current')) {\n // @ts-ignore\n outerRef.current = ref\n }\n }\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId)\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL)\n }\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null\n this.setState({\n isScrolling: false\n }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this.preset.resetCache()\n })\n }\n\n public scrollTo (scrollOffset = 0, enhanced = this.preset.enhanced) {\n scrollOffset = Math.max(0, scrollOffset)\n if (this.state.scrollOffset === scrollOffset) return\n\n if (enhanced) {\n const isHorizontal = this.preset.isHorizontal\n const option: any = {\n animated: true,\n duration: 300,\n }\n if (isHorizontal) {\n option.left = scrollOffset\n } else {\n option.top = scrollOffset\n }\n return getScrollViewContextNode(`${this.props.queryPrefix}#${this.preset.id}`).then((node: any) => node.scrollTo(option))\n }\n\n this.setState((prevState: IState) => {\n if (prevState.scrollOffset === scrollOffset) {\n return null\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: true\n }\n }, this._resetIsScrollingDebounced)\n }\n\n public scrollToItem (index: number, align = 'auto', enhanced = this.preset.enhanced) {\n const { itemCount } = this.props\n const { scrollOffset } = this.state\n index = Math.max(0, Math.min(index, itemCount - 1))\n this.scrollTo(this.itemList.getOffsetForIndexAndAlignment(index, align, scrollOffset), enhanced)\n }\n\n componentDidMount () {\n const { initialScrollOffset } = this.props\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = this._outerRef\n\n if (this.preset.isHorizontal) {\n outerRef.scrollLeft = initialScrollOffset\n } else {\n outerRef.scrollTop = initialScrollOffset\n }\n }\n\n this._callPropsCallbacks()\n this.preset.boundaryDetection()\n }\n\n componentDidUpdate (prevProps: IProps, prevState: IState) {\n const { scrollOffset, scrollUpdateWasRequested } = this.state\n\n this.preset.update(this.props)\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\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset\n break\n\n default:\n outerRef.scrollLeft = outerRef.scrollWidth - outerRef.clientWidth - scrollOffset\n break\n }\n } else {\n outerRef.scrollLeft = scrollOffset\n }\n } else {\n outerRef.scrollTop = scrollOffset\n }\n }\n\n this._callPropsCallbacks(prevProps, prevState)\n }\n\n componentWillUnmount () {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId)\n }\n this.preset.dispose()\n }\n\n getRenderItemNode (index: number, type: 'node' | 'placeholder' = 'node') {\n const { item, itemData, itemKey = defaultItemKey, useIsScrolling } = this.props\n const { isScrolling } = this.state\n const key = itemKey(index, itemData)\n\n const style = this.preset.getItemStyle(index)\n if (type === 'placeholder') {\n return React.createElement<any>(this.preset.itemElement, {\n key,\n id: `${this.preset.id}-${index}-wrapper`,\n style: this.preset.isBrick ? style : { display: 'none' }\n })\n }\n\n return React.createElement<any>(this.preset.itemElement, {\n key: itemKey(index, itemData),\n id: `${this.preset.id}-${index}-wrapper`,\n style\n }, React.createElement(item, {\n id: `${this.preset.id}-${index}`,\n data: itemData,\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined\n }))\n }\n\n getRenderColumnNode () {\n const { isScrolling } = this.state\n const { innerRef, itemCount } = this.props\n const isHorizontal = this.preset.isHorizontal\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 columnProps: any = {\n ref: innerRef,\n key: `${this.preset.id}-inner`,\n id: `${this.preset.id}-inner`,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n width: !isHorizontal ? '100%' : estimatedTotalSize,\n position: 'relative',\n pointerEvents: isScrolling ? 'none' : 'auto',\n }\n }\n\n const [startIndex, stopIndex] = this._getRangeToRender()\n const items = []\n\n if (this.preset.isRelative && !this.preset.isBrick) {\n const pre = convertNumber2PX(this.itemList.getOffsetSizeCache(startIndex))\n items.push(\n React.createElement<any>(this.preset.itemElement, {\n key: `${this.preset.id}-pre`,\n id: `${this.preset.id}-pre`,\n style: {\n height: isHorizontal ? '100%' : pre,\n width: !isHorizontal ? '100%' : pre\n }\n })\n )\n }\n\n const placeholderCount = this.preset.placeholderCount\n const restCount = itemCount - stopIndex\n const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount\n const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount\n\n for (let itemIndex = 0; itemIndex < stopIndex + postPlaceholder; itemIndex++) {\n if (!this.preset.isBrick) {\n if (itemIndex < startIndex - prevPlaceholder) {\n itemIndex = startIndex - prevPlaceholder\n continue\n }\n }\n\n if (itemIndex < startIndex || itemIndex > stopIndex) {\n items.push(this.getRenderItemNode(itemIndex, 'placeholder'))\n } else {\n items.push(this.getRenderItemNode(itemIndex))\n }\n }\n return React.createElement<any>(this.preset.innerElement, columnProps, items)\n }\n\n render () {\n const {\n className,\n direction,\n height,\n layout,\n style,\n width,\n enhanced = false,\n outerWrapper,\n renderTop,\n renderBottom,\n ...rest\n } = omit(this.props, [\n 'item', 'itemCount', 'itemData', 'itemKey', 'useIsScrolling',\n 'innerElementType', 'innerTagName', 'itemElementType', 'itemTagName',\n 'outerElementType', 'outerTagName', 'onScrollToLower', 'onScrollToUpper',\n 'upperThreshold', 'lowerThreshold',\n 'position', 'innerRef',\n ])\n const {\n scrollOffset,\n scrollUpdateWasRequested\n } = this.state\n\n const isHorizontal = this.preset.isHorizontal\n\n const outerProps: any = {\n ...rest,\n id: this.preset.id,\n className,\n onScroll: isHorizontal ? this._onScrollHorizontal : this._onScrollVertical,\n ref: this._outerRefSetter,\n layout,\n enhanced,\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 ...style\n },\n outerElementType: this.preset.outerElement,\n innerElementType: this.preset.innerElement,\n renderTop,\n renderBottom,\n }\n\n if (!enhanced) {\n if (isHorizontal) {\n outerProps.scrollLeft = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollLeft\n } else {\n outerProps.scrollTop = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollTop\n }\n }\n\n return React.createElement(\n outerWrapper || this.preset.outerElement,\n outerProps,\n this.getRenderColumnNode(),\n )\n }\n}\n\n// NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAqB,IAAK,SAAQ,KAAK,CAAC,aAA6B,CAAA;AAUnE,IAAA,OAAO,wBAAwB,CAAE,SAAiB,EAAE,SAAiB,EAAA;AACnE,QAAA,OAAO,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC;;AAMhD,IAAA,WAAA,CAAa,KAAa,EAAA;QACxB,KAAK,CAAC,KAAK,CAAC;QAuBd,IAAO,CAAA,OAAA,GAAG,MAAK;YACb,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,QAAQ,EAAE;gBACtC,IAAI,CAAC,WAAW,EAAE;;iBACb;gBACL,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM;oBACnC,YAAY,EAAE,EAAE;AACjB,iBAAA,CAAC,CAAC;;AAEP,SAAC;QAED,IAAS,CAAA,SAAA,GAAG,SAAS;QAErB,IAA0B,CAAA,0BAAA,GAAG,IAAI;AAEjC,QAAA,IAAA,CAAA,oBAAoB,GAAG,UAAU,CAAC,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;YAC7H,kBAAkB;YAClB,iBAAiB;YACjB,UAAU;YACV;AACD,SAAA,CAAC,CAAC;AAEH,QAAA,IAAA,CAAA,aAAa,GAAG,UAAU,CAAC,CAAC,eAAe,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YAClH,eAAe;YACf,YAAY;YACZ,wBAAwB;YACxB;AACM,SAAA,CAAC,CAAC;AAuCV,QAAA,IAAA,CAAA,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AACT,YAAA,YAAY,GACb;QAED,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,YAAY,EAAE;AAChB,gBAAA,UAAU,CAAC,UAAU,GAAG,wBAAwB,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU;;iBACzF;AACL,gBAAA,UAAU,CAAC,SAAS,GAAG,wBAAwB,GAAG,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS;;;AAIhG,QAAA,OAAO,KAAK,CAAC,aAAa,CACxB,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EACxC,UAAU,EACV,IAAI,CAAC,mBAAmB,EAAE,CAC3B;;;AAzfI,IAAA,CAAA,YAAY,GAAW;AAC5B,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,qCAAqC,EAAE;AACxC,CAPkB;AA6frB;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../src/components/virtual-list/react/list.ts"],"sourcesContent":["import { isNumber } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\nimport React from 'react'\n\nimport { cancelTimeout, convertNumber2PX, defaultItemKey, getRectSizeSync, getScrollViewContextNode, omit, requestTimeout } from '../../../utils'\nimport { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants'\nimport { getRTLOffsetType } from '../dom-helpers'\nimport ListSet from '../list-set'\nimport Preset from '../preset'\nimport { validateListProps } from './validate'\n\nimport type { IProps } from '../preset'\n\nexport interface IState {\n instance: List\n isScrolling: boolean\n scrollDirection: 'forward' | 'backward'\n scrollOffset: number\n scrollUpdateWasRequested: boolean\n refreshCount: number\n}\n\nexport default class List extends React.PureComponent<IProps, IState> {\n static defaultProps: IProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false,\n shouldResetStyleCacheOnItemSizeChange: true\n }\n\n static getDerivedStateFromProps (nextProps: IProps, prevState: IState) {\n return validateListProps(nextProps, prevState)\n }\n\n itemList: ListSet\n preset: Preset\n\n constructor (props: IProps) {\n super(props)\n\n this.preset = new Preset(\n props,\n this.refresh,\n )\n this.itemList = this.preset.itemList\n const id = this.props.id || this.preset.id\n this.preset.updateWrapper(id)\n\n this.state = {\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 refreshCount: 0,\n }\n }\n\n refresh = () => {\n if (process.env.FRAMEWORK === 'preact') {\n this.forceUpdate()\n } else {\n this.setState(({ refreshCount }) => ({\n refreshCount: ++refreshCount\n }))\n }\n }\n\n _outerRef = undefined\n\n _resetIsScrollingTimeoutId = null\n\n _callOnItemsRendered = memoizeOne((overscanStartIndex, overscanStopIndex, startIndex, stopIndex) => this.props.onItemsRendered({\n overscanStartIndex,\n overscanStopIndex,\n startIndex,\n stopIndex\n }))\n\n _callOnScroll = memoizeOne((scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) => this.props.onScroll({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n } as any))\n\n _callPropsCallbacks (prevProps: any = {}, prevState: any = {}) {\n if (typeof this.props.onItemsRendered === 'function') {\n if (this.props.itemCount > 0) {\n if (prevProps && prevProps.itemCount !== this.props.itemCount) {\n const [overscanStartIndex, overscanStopIndex, startIndex, stopIndex] = this._getRangeToRender()\n\n this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, startIndex, stopIndex)\n }\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n if (!prevState ||\n prevState.scrollDirection !== this.state.scrollDirection ||\n prevState.scrollOffset !== this.state.scrollOffset ||\n prevState.scrollUpdateWasRequested !== this.state.scrollUpdateWasRequested\n ) {\n this._callOnScroll(\n this.state.scrollDirection,\n this.state.scrollOffset,\n this.state.scrollUpdateWasRequested,\n this.preset.field\n )\n }\n }\n\n if (this.itemList.isUnlimitedMode) {\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\n _getSizeUploadSync = (index: number, isHorizontal: boolean) => {\n return new Promise((resolve) => {\n if (index >= 0 && index < this.props.itemCount) {\n const times = this.itemList.compareSize(index) ? 3 : 0\n getRectSizeSync(`${this.props.queryPrefix}#${this.preset.id}-${index}`, 100, times).then(({ width, height }) => {\n const size = isHorizontal ? width : height\n if (typeof size === 'number' && size > 0 && !this.itemList.compareSize(index, size)) {\n this.itemList.setSize(index, size)\n resolve(this.itemList.getSize(index))\n }\n })\n }\n })\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getRangeToRender () {\n return this.itemList.getRangeToRender(\n this.state.scrollDirection,\n this.state.scrollOffset,\n this.state.isScrolling\n )\n }\n\n _onScrollHorizontal = event => {\n const {\n scrollHeight,\n scrollWidth = this.itemList.getOffsetSizeCache(),\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientWidth = this.itemList.wrapperSize\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop,\n scrollLeft,\n clientHeight: scrollHeight,\n clientWidth: scrollWidth\n }\n this.setState((prevState: any) => {\n const diffOffset = this.preset.field.scrollLeft - scrollLeft\n if (prevState.scrollOffset === scrollLeft || this.preset.isShaking(diffOffset)) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null\n }\n\n let scrollOffset = scrollLeft\n\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\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft\n break\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n this.preset.field = {\n scrollWidth: scrollOffset,\n }\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false\n }\n }, this._resetIsScrollingDebounced)\n }\n\n _onScrollVertical = event => {\n const {\n scrollHeight = this.itemList.getOffsetSizeCache(),\n scrollWidth,\n scrollTop,\n scrollLeft\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientHeight = this.itemList.wrapperSize\n this.setState((prevState: IState) => {\n const diffOffset = this.preset.field.scrollTop - scrollTop\n if (prevState.scrollOffset === scrollTop || this.preset.isShaking(diffOffset)) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null\n }\n // FIXME preact 中使用时,该组件会出现触底滚动事件重复触发导致的抖动问题,后续修复\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight))\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop: scrollOffset,\n scrollLeft,\n clientHeight,\n clientWidth: scrollWidth,\n diffOffset: this.preset.field.scrollTop - scrollOffset,\n }\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false\n }\n }, 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('current')) {\n // @ts-ignore\n outerRef.current = ref\n }\n }\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId)\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL)\n }\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null\n this.setState({\n isScrolling: false\n }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this.preset.resetCache()\n })\n }\n\n public scrollTo (scrollOffset = 0, enhanced = this.preset.enhanced) {\n scrollOffset = Math.max(0, scrollOffset)\n if (this.state.scrollOffset === scrollOffset) return\n\n if (enhanced) {\n const isHorizontal = this.preset.isHorizontal\n const option: any = {\n animated: true,\n duration: 300,\n }\n if (isHorizontal) {\n option.left = scrollOffset\n } else {\n option.top = scrollOffset\n }\n return getScrollViewContextNode(`${this.props.queryPrefix}#${this.preset.id}`).then((node: any) => node.scrollTo(option))\n }\n\n this.setState((prevState: IState) => {\n if (prevState.scrollOffset === scrollOffset) {\n return null\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: true\n }\n }, this._resetIsScrollingDebounced)\n }\n\n public scrollToItem (index: number, align = 'auto', enhanced = this.preset.enhanced) {\n const { itemCount } = this.props\n const { scrollOffset } = this.state\n index = Math.max(0, Math.min(index, itemCount - 1))\n this.scrollTo(this.itemList.getOffsetForIndexAndAlignment(index, align, scrollOffset), enhanced)\n }\n\n componentDidMount () {\n const { initialScrollOffset } = this.props\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = this._outerRef\n\n if (this.preset.isHorizontal) {\n outerRef.scrollLeft = initialScrollOffset\n } else {\n outerRef.scrollTop = initialScrollOffset\n }\n }\n\n this._callPropsCallbacks()\n this.preset.boundaryDetection()\n }\n\n componentDidUpdate (prevProps: IProps, prevState: IState) {\n const { scrollOffset, scrollUpdateWasRequested } = this.state\n\n this.preset.update(this.props)\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\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset\n break\n\n default:\n outerRef.scrollLeft = outerRef.scrollWidth - outerRef.clientWidth - scrollOffset\n break\n }\n } else {\n outerRef.scrollLeft = scrollOffset\n }\n } else {\n outerRef.scrollTop = scrollOffset\n }\n }\n\n this._callPropsCallbacks(prevProps, prevState)\n }\n\n componentWillUnmount () {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId)\n }\n this.preset.dispose()\n }\n\n getRenderItemNode (index: number, type: 'node' | 'placeholder' = 'node') {\n const { item, itemData, itemKey = defaultItemKey, useIsScrolling } = this.props\n const { isScrolling } = this.state\n const key = itemKey(index, itemData)\n\n const style = this.preset.getItemStyle(index)\n if (type === 'placeholder') {\n return React.createElement<any>(this.preset.itemElement, {\n key,\n id: `${this.preset.id}-${index}-wrapper`,\n style: this.preset.isBrick ? style : { display: 'none' }\n })\n }\n\n return React.createElement<any>(this.preset.itemElement, {\n key: itemKey(index, itemData),\n id: `${this.preset.id}-${index}-wrapper`,\n style\n }, React.createElement(item, {\n id: `${this.preset.id}-${index}`,\n data: itemData,\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined\n }))\n }\n\n getRenderColumnNode () {\n const { isScrolling } = this.state\n const { innerRef, itemCount } = this.props\n const isHorizontal = this.preset.isHorizontal\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 columnProps: any = {\n ref: innerRef,\n key: `${this.preset.id}-inner`,\n id: `${this.preset.id}-inner`,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n width: !isHorizontal ? '100%' : estimatedTotalSize,\n position: 'relative',\n pointerEvents: isScrolling ? 'none' : 'auto',\n }\n }\n\n const [startIndex, stopIndex] = this._getRangeToRender()\n const items = []\n\n if (this.preset.isRelative && !this.preset.isBrick) {\n const pre = convertNumber2PX(this.itemList.getOffsetSizeCache(startIndex))\n items.push(\n React.createElement<any>(this.preset.itemElement, {\n key: `${this.preset.id}-pre`,\n id: `${this.preset.id}-pre`,\n style: {\n height: isHorizontal ? '100%' : pre,\n width: !isHorizontal ? '100%' : pre\n }\n })\n )\n }\n\n const placeholderCount = this.preset.placeholderCount\n const restCount = itemCount - stopIndex\n const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount\n const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount\n\n for (let itemIndex = 0; itemIndex < stopIndex + postPlaceholder; itemIndex++) {\n if (!this.preset.isBrick) {\n if (itemIndex < startIndex - prevPlaceholder) {\n itemIndex = startIndex - prevPlaceholder\n continue\n }\n }\n\n if (itemIndex < startIndex || itemIndex > stopIndex) {\n items.push(this.getRenderItemNode(itemIndex, 'placeholder'))\n } else {\n items.push(this.getRenderItemNode(itemIndex))\n }\n }\n return React.createElement<any>(this.preset.innerElement, columnProps, items)\n }\n\n render () {\n const {\n className,\n direction,\n height,\n layout,\n style,\n width,\n enhanced = false,\n outerWrapper,\n renderTop,\n renderBottom,\n ...rest\n } = omit(this.props, [\n 'item', 'itemCount', 'itemData', 'itemKey', 'useIsScrolling',\n 'innerElementType', 'innerTagName', 'itemElementType', 'itemTagName',\n 'outerElementType', 'outerTagName', 'onScrollToLower', 'onScrollToUpper',\n 'upperThreshold', 'lowerThreshold',\n 'position', 'innerRef',\n ])\n const {\n scrollOffset,\n scrollUpdateWasRequested\n } = this.state\n\n const isHorizontal = this.preset.isHorizontal\n\n const outerProps: any = {\n ...rest,\n id: this.preset.id,\n className,\n onScroll: isHorizontal ? this._onScrollHorizontal : this._onScrollVertical,\n ref: this._outerRefSetter,\n layout,\n enhanced,\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 ...style\n },\n outerElementType: this.preset.outerElement,\n innerElementType: this.preset.innerElement,\n renderTop,\n renderBottom,\n }\n\n if (!enhanced) {\n if (isHorizontal) {\n outerProps.scrollLeft = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollLeft\n } else {\n outerProps.scrollTop = scrollUpdateWasRequested ? scrollOffset : this.preset.field.scrollTop\n }\n }\n\n return React.createElement(\n outerWrapper || this.preset.outerElement,\n outerProps,\n this.getRenderColumnNode(),\n )\n }\n}\n\n// NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAqB,IAAK,SAAQ,KAAK,CAAC,aAA6B,CAAA;AAUnE,IAAA,OAAO,wBAAwB,CAAE,SAAiB,EAAE,SAAiB,EAAA;AACnE,QAAA,OAAO,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC;;AAMhD,IAAA,WAAA,CAAa,KAAa,EAAA;QACxB,KAAK,CAAC,KAAK,CAAC;QAuBd,IAAA,CAAA,OAAO,GAAG,MAAK;YACb,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,QAAQ,EAAE;gBACtC,IAAI,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AAClB,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,qCAAqC,EAAE;AACxC,CAPkB;AA6frB;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sources":["../../../../src/components/virtual-list/react/validate.ts"],"sourcesContent":["import type { IProps } from '../preset'\nimport type { IState } from './list'\n\nlet devWarningsDirection = null\nlet devWarningsTagName = null\n\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /* #__PURE__ */ new WeakSet()\n devWarningsTagName = /* #__PURE__ */ new WeakSet()\n }\n}\n\nexport const validateListProps = ({\n item,\n direction,\n layout,\n itemTagName,\n innerTagName,\n outerTagName,\n itemSize\n}: IProps, {\n instance,\n}: IState) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!['number', 'function'].includes(typeof itemSize)) {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number or function. ' + `\"${itemSize === null ? 'null' : typeof itemSize}\" was specified.`)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null || itemTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance)\n console.warn('The itemTagName、innerTagName and outerTagName props have been deprecated. ' + 'Please use the itemElementType、innerElementType and outerElementType props instead.')\n }\n }\n\n switch (direction as string) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance)\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.')\n }\n\n break\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + `\"${direction}\" was specified.`)\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + `\"${layout}\" was specified.`)\n }\n\n if (item == null) {\n throw Error('An invalid \"item\" prop has been specified. ' + 'Value should be a React component. ' + `\"${item === null ? 'null' : typeof item}\" was specified.`)\n }\n\n // if (isHorizontal && typeof width !== 'number') {\n // throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + `\"${width === null ? 'null' : typeof width}\" was specified.`)\n // } else if (!isHorizontal && typeof height !== 'number') {\n // throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + `\"${height === null ? 'null' : typeof height}\" was specified.`)\n // }\n }\n\n return null\n}\n"],"names":[],"mappings":"AAGA,IAAI,oBAAoB,GAAG,IAAI;AAC/B,IAAI,kBAAkB,GAAG,IAAI;AAE7B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AACzC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,WAAW,EAAE;AAC1E,QAAA,oBAAoB,mBAAmB,IAAI,OAAO,EAAE;AACpD,QAAA,kBAAkB,mBAAmB,IAAI,OAAO,EAAE;;AAEtD;
|
|
1
|
+
{"version":3,"file":"validate.js","sources":["../../../../src/components/virtual-list/react/validate.ts"],"sourcesContent":["import type { IProps } from '../preset'\nimport type { IState } from './list'\n\nlet devWarningsDirection = null\nlet devWarningsTagName = null\n\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /* #__PURE__ */ new WeakSet()\n devWarningsTagName = /* #__PURE__ */ new WeakSet()\n }\n}\n\nexport const validateListProps = ({\n item,\n direction,\n layout,\n itemTagName,\n innerTagName,\n outerTagName,\n itemSize\n}: IProps, {\n instance,\n}: IState) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!['number', 'function'].includes(typeof itemSize)) {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number or function. ' + `\"${itemSize === null ? 'null' : typeof itemSize}\" was specified.`)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null || itemTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance)\n console.warn('The itemTagName、innerTagName and outerTagName props have been deprecated. ' + 'Please use the itemElementType、innerElementType and outerElementType props instead.')\n }\n }\n\n switch (direction as string) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance)\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.')\n }\n\n break\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + `\"${direction}\" was specified.`)\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + `\"${layout}\" was specified.`)\n }\n\n if (item == null) {\n throw Error('An invalid \"item\" prop has been specified. ' + 'Value should be a React component. ' + `\"${item === null ? 'null' : typeof item}\" was specified.`)\n }\n\n // if (isHorizontal && typeof width !== 'number') {\n // throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + `\"${width === null ? 'null' : typeof width}\" was specified.`)\n // } else if (!isHorizontal && typeof height !== 'number') {\n // throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + `\"${height === null ? 'null' : typeof height}\" was specified.`)\n // }\n }\n\n return null\n}\n"],"names":[],"mappings":"AAGA,IAAI,oBAAoB,GAAG,IAAI;AAC/B,IAAI,kBAAkB,GAA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BAAA,oBAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC;AAClC,oBAAA,OAAO,CAAC,IAAI,CAAC,gEAAgE,GAAG,yFAAyF,CAAC;;gBAG5K;AAEF,YAAA,KAAK,KAAK;AACV,YAAA,KAAK,KAAK;;gBAER;AAEF,YAAA;gBACE,MAAM,KAAK,CAAC,kDAAkD,GAAG,yCAAyC,GAAG,CAAA,CAAA,EAAI,SAAS,CAAA,gBAAA,CAAkB,CAAC;;QAGjJ,QAAQ,MAAM;AACZ,YAAA,KAAK,YAAY;AACjB,YAAA,KAAK,UAAU;;gBAEb;AAEF,YAAA;gBACE,MAAM,KAAK,CAAC,+CAA+C,GAAG,qDAAqD,GAAG,CAAA,CAAA,EAAI,MAAM,CAAA,gBAAA,CAAkB,CAAC;;AAGvJ,QAAA,IAAI,IAAI,IAAI,IAAI,EAAE;YAChB,MAAM,KAAK,CAAC,6CAA6C,GAAG,qCAAqC,GAAG,CAAA,CAAA,EAAI,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,IAAI,CAAA,gBAAA,CAAkB,CAAC;;;;;;;;AAUnK,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.js","sources":["../../../../src/components/virtual-list/react/wrapper.ts"],"sourcesContent":["import React, { PropsWithChildren } from 'react'\n\nimport { convertPX2Int } from '../../../utils'\n\nimport type { BaseEventOrig } from '@tarojs/components'\nimport type { VirtualListProps } from '..'\nimport type { IProps } from '../preset'\n\nfunction getRenderExpandNodes ({\n direction,\n isHorizontal,\n isRtl,\n id: sid,\n innerElement,\n renderExpand,\n}: {\n direction: 'top' | 'bottom' | 'left' | 'right'\n isHorizontal: boolean\n isRtl: boolean\n id: string\n innerElement: VirtualListProps['innerElementType']\n renderExpand?: VirtualListProps['renderTop'] | VirtualListProps['renderBottom']\n}) {\n const id = `${sid}-${direction}`\n const props: any = {\n key: id,\n id,\n style: {\n visibility: 'hidden',\n height: isHorizontal ? '100%' : 100,\n width: isHorizontal ? 100 : '100%',\n [isHorizontal ? isRtl ? 'marginRight' : 'marginLeft' : 'marginTop']: -100,\n zIndex: -1,\n }\n }\n const expands = [renderExpand, React.createElement(\n innerElement!,\n props,\n )]\n if (isHorizontal ? isRtl ? direction === 'right' : direction === 'left' : direction === 'top') {\n expands.reverse()\n }\n return expands\n}\n\nconst outerWrapper = React.forwardRef(\n function OuterWrapper (props, ref) {\n const {\n id = '', className, style = {}, children,\n outerElementType, innerElementType,\n onScroll, onScrollNative,\n renderTop, renderBottom,\n layout, direction,\n ...rest\n } = props as PropsWithChildren<IProps>\n const handleScroll = (event: BaseEventOrig<VirtualListProps.IVirtualListEventDetail>) => {\n onScroll?.({\n ...event as any,\n currentTarget: {\n ...event.detail,\n clientWidth: convertPX2Int(style.width),\n clientHeight: convertPX2Int(style.height)\n } as any\n })\n\n if (typeof onScrollNative === 'function') {\n onScrollNative(event)\n }\n }\n const isHorizontal = layout === 'horizontal'\n const isRtl = direction === 'rtl'\n\n return React.createElement<any>(outerElementType!, {\n ref,\n id,\n className,\n style,\n scrollY: !isHorizontal,\n scrollX: isHorizontal,\n onScroll: handleScroll,\n ...rest\n }, [\n getRenderExpandNodes({\n direction: isHorizontal ? isRtl ? 'right' : 'left' : 'top',\n isHorizontal,\n isRtl,\n id,\n innerElement: innerElementType,\n renderExpand: renderTop,\n }),\n children,\n getRenderExpandNodes({\n direction: isHorizontal ? isRtl ? 'left' : 'right' : 'bottom',\n isHorizontal,\n isRtl,\n id,\n innerElement: innerElementType,\n renderExpand: renderBottom,\n }),\n ])\n }\n)\n\nexport default outerWrapper\n"],"names":[],"mappings":";;;;;AAQA,SAAS,oBAAoB,CAAE,EAC7B,SAAS,EACT,YAAY,EACZ,KAAK,EACL,EAAE,EAAE,GAAG,EACP,YAAY,EACZ,YAAY,GAQb,EAAA;AACC,IAAA,MAAM,EAAE,GAAG,CAAA,EAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"wrapper.js","sources":["../../../../src/components/virtual-list/react/wrapper.ts"],"sourcesContent":["import React, { PropsWithChildren } from 'react'\n\nimport { convertPX2Int } from '../../../utils'\n\nimport type { BaseEventOrig } from '@tarojs/components'\nimport type { VirtualListProps } from '..'\nimport type { IProps } from '../preset'\n\nfunction getRenderExpandNodes ({\n direction,\n isHorizontal,\n isRtl,\n id: sid,\n innerElement,\n renderExpand,\n}: {\n direction: 'top' | 'bottom' | 'left' | 'right'\n isHorizontal: boolean\n isRtl: boolean\n id: string\n innerElement: VirtualListProps['innerElementType']\n renderExpand?: VirtualListProps['renderTop'] | VirtualListProps['renderBottom']\n}) {\n const id = `${sid}-${direction}`\n const props: any = {\n key: id,\n id,\n style: {\n visibility: 'hidden',\n height: isHorizontal ? '100%' : 100,\n width: isHorizontal ? 100 : '100%',\n [isHorizontal ? isRtl ? 'marginRight' : 'marginLeft' : 'marginTop']: -100,\n zIndex: -1,\n }\n }\n const expands = [renderExpand, React.createElement(\n innerElement!,\n props,\n )]\n if (isHorizontal ? isRtl ? direction === 'right' : direction === 'left' : direction === 'top') {\n expands.reverse()\n }\n return expands\n}\n\nconst outerWrapper = React.forwardRef(\n function OuterWrapper (props, ref) {\n const {\n id = '', className, style = {}, children,\n outerElementType, innerElementType,\n onScroll, onScrollNative,\n renderTop, renderBottom,\n layout, direction,\n ...rest\n } = props as PropsWithChildren<IProps>\n const handleScroll = (event: BaseEventOrig<VirtualListProps.IVirtualListEventDetail>) => {\n onScroll?.({\n ...event as any,\n currentTarget: {\n ...event.detail,\n clientWidth: convertPX2Int(style.width),\n clientHeight: convertPX2Int(style.height)\n } as any\n })\n\n if (typeof onScrollNative === 'function') {\n onScrollNative(event)\n }\n }\n const isHorizontal = layout === 'horizontal'\n const isRtl = direction === 'rtl'\n\n return React.createElement<any>(outerElementType!, {\n ref,\n id,\n className,\n style,\n scrollY: !isHorizontal,\n scrollX: isHorizontal,\n onScroll: handleScroll,\n ...rest\n }, [\n getRenderExpandNodes({\n direction: isHorizontal ? isRtl ? 'right' : 'left' : 'top',\n isHorizontal,\n isRtl,\n id,\n innerElement: innerElementType,\n renderExpand: renderTop,\n }),\n children,\n getRenderExpandNodes({\n direction: isHorizontal ? isRtl ? 'left' : 'right' : 'bottom',\n isHorizontal,\n isRtl,\n id,\n innerElement: innerElementType,\n renderExpand: renderBottom,\n }),\n ])\n }\n)\n\nexport default outerWrapper\n"],"names":[],"mappings":";;;;;AAQA,SAAS,oBAAoB,CAAE,EAC7B,SAAS,EACT,YAAY,EACZ,KAAK,EACL,EAAE,EAAE,GAAG,EACP,YAAY,EACZ,YAAY,GAQb,EAAA;AACC,IAAA,MAAM,EAAE,GAAG,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,SAAS,EAAE;AAChC,IAAA,MAAM,KAAK,GAAQ;AACjB,QAAA,GAAG,EAAE,EAAE;QACP,EAAE;AACF,QAAA,KAAK,EAAE;AACL,YAAA,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,GAAG;YACnC,KAAK,EAAE,YAAY,GAAG,GAAG,GAAG,MAAM;YAClC,CAAC,YAAY,GAAG,KAAK,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,CAAC,GAAG;YACzE,MAAM,EAAE,CAAC,CAAC;AACX;KACF;AACD,IAAA,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,CAChD,YAAa,EACb,KAAK,CACN,CAAC;IACF,IAAI,YAAY,GAAG,KAAK,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,KAAK,KAAK,EAAE;QAC7F,OAAO,CAAC,OAAO,EAAE;;AAEnB,IAAA,OAAO,OAAO;AAChB;AAEA,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,SAAS,YAAY,CAAE,KAAK,EAAE,GAAG,EAAA;AAC/B,IAAA,MAAM,KAOF,KAAkC,EAPhC,EACJ,EAAE,GAAG,EAAE,EA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AO,GAAG,MAAM,GAAG,KAAK;YAC1D,YAAY;YACZ,KAAK;YACL,EAAE;AACF,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,YAAY,EAAE,SAAS;SACxB,CAAC;QACF,QAAQ;AACR,QAAA,oBAAoB,CAAC;AACnB,YAAA,SAAS,EAAE,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ;YAC7D,YAAY;YACZ,KAAK;YACL,EAAE;AACF,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,YAAY,EAAE,YAAY;SAC3B,CAAC;AACH,KAAA,CAAC;AACJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/components/virtual-list/utils.ts"],"sourcesContent":["interface IHorizontal {\n direction?: string\n layout?: string\n}\nexport function isHorizontalFunc ({ direction, layout }: IHorizontal) {\n return direction === 'horizontal' || layout === 'horizontal'\n}\ninterface IRrl {\n direction?: string\n}\nexport function isRtlFunc ({ direction }: IRrl) {\n return direction === 'rtl'\n}\n"],"names":[],"mappings":"SAIgB,gBAAgB,CAAE,EAAE,SAAS,EAAE,MAAM,EAAe,EAAA;AAClE,IAAA,OAAO,SAAS,KAAK,YAAY,IAAI,MAAM,KAAK,YAAY;AAC9D;
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/components/virtual-list/utils.ts"],"sourcesContent":["interface IHorizontal {\n direction?: string\n layout?: string\n}\nexport function isHorizontalFunc ({ direction, layout }: IHorizontal) {\n return direction === 'horizontal' || layout === 'horizontal'\n}\ninterface IRrl {\n direction?: string\n}\nexport function isRtlFunc ({ direction }: IRrl) {\n return direction === 'rtl'\n}\n"],"names":[],"mappings":"SAIgB,gBAAgB,CAAE,EAAE,SAAS,EAAE,MAAM,EAAe,EAAA;AAClE,IAAA,OAAO,SAAS,KAAK,YAAY,IAAI,MAAM,KAAK,YAAY;AAC9D;AAIM,SAAU,SAAS,CAAE,EAAE,SAAS,EAAQ,EAAA;IAC5C,OAAO,SAAS,KAAK,KAAK;AAC5B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../src/components/virtual-list/vue/list.ts"],"sourcesContent":["import { isNumber } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\nimport { defineComponent } from 'vue'\n\nimport { cancelTimeout, convertNumber2PX, defaultItemKey, getRectSizeSync, getScrollViewContextNode, omit, requestTimeout } from '../../../utils'\nimport render from '../../../utils/vue-render'\nimport { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants'\nimport { getRTLOffsetType } from '../dom-helpers'\nimport Preset, { type IProps } from '../preset'\n\nexport default defineComponent({\n props: {\n id: String,\n height: {\n type: [String, Number],\n required: true\n },\n width: {\n type: [String, Number],\n required: true\n },\n item: {\n required: true\n },\n itemCount: {\n type: Number,\n required: true\n },\n itemData: {\n type: Array,\n required: true\n },\n itemKey: Function,\n itemSize: {\n type: [Number, Function],\n required: true\n },\n queryPrefix: {\n type: String,\n default: ''\n },\n unlimitedSize: {\n type: Boolean,\n default: false\n },\n position: {\n type: String,\n default: 'absolute'\n },\n direction: {\n type: String,\n default: 'ltr'\n },\n layout: {\n type: String,\n default: 'vertical'\n },\n initialScrollOffset: {\n type: Number,\n default: 0\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 enhanced: {\n type: Boolean,\n default: false\n },\n shouldResetStyleCacheOnItemSizeChange: {\n type: Boolean,\n default: true\n },\n outerElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-scroll-view-core' : 'scroll-view'\n },\n innerElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-view-core' : 'view'\n },\n itemElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-view-core' : 'view'\n },\n outerTagName: String,\n innerTagName: String,\n itemTagName: String,\n outerRef: String,\n innerRef: String,\n onScrollNative: Function,\n onItemsRendered: Function,\n },\n data () {\n const preset = new Preset(this.$props as IProps, this.refresh as TFunc)\n const id = this.$props.id || preset.id\n preset.updateWrapper(id)\n\n return {\n itemList: preset.itemList,\n preset,\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 = 0, enhanced = this.preset.enhanced) {\n scrollOffset = Math.max(0, scrollOffset)\n if (this.scrollOffset === scrollOffset) return\n\n if (enhanced) {\n const isHorizontal = this.preset.isHorizontal\n const option: any = {\n animated: true,\n duration: 300,\n }\n if (isHorizontal) {\n option.left = scrollOffset\n } else {\n option.top = scrollOffset\n }\n return getScrollViewContextNode(`${this.$props.queryPrefix}#${this.preset.id}`).then((node: any) => node.scrollTo(option))\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: number, align = 'auto', enhanced = this.preset.enhanced) {\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 index,\n align,\n scrollOffset\n ),\n enhanced,\n )\n },\n\n _callOnItemsRendered: memoizeOne(function (overscanStartIndex, overscanStopIndex, startIndex, stopIndex) {\n return this.$props.onItemsRendered({\n overscanStartIndex,\n overscanStopIndex,\n startIndex,\n stopIndex\n })\n }),\n\n _callOnScroll: memoizeOne(function (scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) {\n this.$emit('scroll', {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n })\n }),\n\n _callPropsCallbacks () {\n if (typeof this.$props.onItemsRendered === 'function') {\n if (this.$props.itemCount > 0) {\n const [overscanStartIndex, overscanStopIndex, startIndex, stopIndex] = this._getRangeToRender()\n this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, startIndex, stopIndex)\n }\n }\n\n if (typeof this.$props.onScroll === 'function') {\n this._callOnScroll(\n this.scrollDirection,\n this.scrollOffset,\n this.scrollUpdateWasRequested,\n this.preset.field\n )\n }\n\n if (this.itemList.isUnlimitedMode) {\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\n _getSizeUploadSync (index: number, isHorizontal: boolean) {\n return new Promise((resolve) => {\n if (index >= 0 && index < this.$props.itemCount) {\n const times = this.itemList.compareSize(index) ? 0 : 2\n getRectSizeSync(`${this.$props.queryPrefix}#${this.preset.id}-${index}`, 100, times).then(({ width, height }) => {\n const size = isHorizontal ? width : height\n if (typeof size === 'number' && size > 0 && !this.itemList.compareSize(index, size)) {\n this.itemList.setSize(index, size)\n resolve(this.itemList.getSize(index))\n }\n })\n }\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 scrollHeight,\n scrollWidth = this.itemList.getOffsetSizeCache(),\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientWidth = this.itemList.wrapperSize\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop,\n 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 scrollHeight = this.itemList.getOffsetSizeCache(),\n scrollWidth,\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientHeight = this.itemList.wrapperSize\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(0, Math.min(scrollTop, scrollHeight - clientHeight))\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop: scrollOffset,\n scrollLeft,\n 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 { outerRef } = 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(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL)\n },\n\n _resetIsScrolling () {\n this.resetIsScrollingTimeoutId = null\n this.isScrolling = false\n this.$nextTick(() => {\n this.preset.resetCache()\n })\n },\n\n getRenderItemNode (index: number, type: 'node' | 'placeholder' = 'node') {\n const { item, itemData, itemKey = defaultItemKey, useIsScrolling } = this.$props\n const { isScrolling } = this.$data\n const key = itemKey(index, itemData)\n\n const style = this.preset.getItemStyle(index)\n if (type === 'placeholder') {\n return render(this.preset.itemElement, {\n key,\n id: `${this.preset.id}-${index}-wrapper`,\n style: this.preset.isBrick ? style : { display: 'none' }\n })\n }\n\n return render(this.preset.itemElement, {\n key: itemKey(index, itemData),\n id: `${this.preset.id}-${index}-wrapper`,\n style\n }, render(item, {\n id: `${this.preset.id}-${index}`,\n data: itemData,\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined\n }))\n },\n\n getRenderColumnNode () {\n const { isScrolling } = this.$data\n const { innerRef, itemCount } = this.$props\n const isHorizontal = this.preset.isHorizontal\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 columnProps: any = {\n ref: innerRef,\n key: `${this.preset.id}-inner`,\n id: `${this.preset.id}-inner`,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n width: !isHorizontal ? '100%' : estimatedTotalSize,\n position: 'relative',\n pointerEvents: isScrolling ? 'none' : 'auto',\n }\n }\n\n const [startIndex, stopIndex] = this._getRangeToRender()\n const items = []\n\n if (this.preset.isRelative && !this.preset.isBrick) {\n const pre = convertNumber2PX(this.itemList.getOffsetSizeCache(startIndex))\n items.push(\n render(this.preset.itemElement, {\n key: `${this.preset.id}-pre`,\n id: `${this.preset.id}-pre`,\n style: {\n height: isHorizontal ? '100%' : pre,\n width: !isHorizontal ? '100%' : pre\n }\n })\n )\n }\n\n const placeholderCount = this.preset.placeholderCount\n const restCount = itemCount - stopIndex\n const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount\n const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount\n\n for (let itemIndex = 0; itemIndex < stopIndex + postPlaceholder; itemIndex++) {\n if (!this.preset.isBrick) {\n if (itemIndex < startIndex - prevPlaceholder) {\n itemIndex = startIndex - prevPlaceholder\n continue\n }\n }\n\n if (itemIndex < startIndex || itemIndex > stopIndex) {\n items.push(this.getRenderItemNode(itemIndex, 'placeholder'))\n } else {\n items.push(this.getRenderItemNode(itemIndex))\n }\n }\n return render(this.preset.innerElement, columnProps, items)\n },\n getRenderExpandNodes (direction: 'top' | 'bottom' | 'left' | 'right') {\n const isHorizontal = this.preset.isHorizontal\n const isRtl = this.preset.isRtl\n const props: any = {\n id: `${this.preset.id}-${direction}`,\n style: {\n visibility: 'hidden',\n height: isHorizontal ? '100%' : 100,\n width: isHorizontal ? 100 : '100%',\n [isHorizontal ? isRtl ? 'marginRight' : 'marginLeft' : 'marginTop']: -100,\n zIndex: -1,\n }\n }\n return render(this.preset.innerElement, props)\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 this.preset.boundaryDetection()\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 this.preset.dispose()\n },\n\n render () {\n const {\n direction,\n height,\n layout,\n width,\n enhanced = false\n } = omit(this.$props, [\n 'item', 'itemCount', 'itemData', 'itemKey', 'useIsScrolling',\n 'innerElementType', 'innerTagName', 'itemElementType', 'itemTagName',\n 'outerElementType', 'outerTagName', 'onScrollToLower', 'onScrollToUpper',\n 'upperThreshold', 'lowerThreshold',\n 'position', 'innerRef',\n ])\n const {\n scrollOffset,\n scrollUpdateWasRequested\n } = this.$data\n\n const isHorizontal = this.preset.isHorizontal\n const isRtl = this.preset.isRtl\n const outerElementProps: any = {\n id: this.preset.id,\n ref: this._outerRefSetter,\n layout,\n enhanced,\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: !this.preset.isHorizontal,\n scrollX: this.preset.isHorizontal\n },\n on: {\n scroll: isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical\n }\n }\n\n if (!enhanced) {\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\n return render(this.preset.outerElement, outerElementProps, [\n this.getRenderExpandNodes(isHorizontal ? isRtl ? 'right' : 'left' : 'top'),\n this.$slots.top?.(),\n this.getRenderColumnNode(),\n this.$slots.bottom?.(),\n this.getRenderExpandNodes(isHorizontal ? isRtl ? 'left' : 'right' : 'bottom'),\n ])\n }\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,WAAe,eAAe,CAAC;AAC7B,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,MAAM;AACV,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACtB,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACtB,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,OAAO,EAAE,QAAQ;AACjB,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AACxB,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE;AACV,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,OAAO;AAC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YACzD,IAAI,CAAC,oBAAoB,CAAC,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAC1E,YAAA,CAAA,EAAA,GAAA,MAAA,IAAI,CAAC,MAAM,EAAC,GAAG,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA;YACnB,IAAI,CAAC,mBAAmB,EAAE;AAC1B,YAAA,CAAA,EAAA,GAAA,MAAA,IAAI,CAAC,MAAM,EAAC,MAAM,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA;YACtB,IAAI,CAAC,oBAAoB,CAAC,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC9E,SAAA,CAAC;;AAEL,CAAA,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../src/components/virtual-list/vue/list.ts"],"sourcesContent":["import { isNumber } from '@tarojs/shared'\nimport memoizeOne from 'memoize-one'\nimport { defineComponent } from 'vue'\n\nimport { cancelTimeout, convertNumber2PX, defaultItemKey, getRectSizeSync, getScrollViewContextNode, omit, requestTimeout } from '../../../utils'\nimport render from '../../../utils/vue-render'\nimport { IS_SCROLLING_DEBOUNCE_INTERVAL } from '../constants'\nimport { getRTLOffsetType } from '../dom-helpers'\nimport Preset, { type IProps } from '../preset'\n\nexport default defineComponent({\n props: {\n id: String,\n height: {\n type: [String, Number],\n required: true\n },\n width: {\n type: [String, Number],\n required: true\n },\n item: {\n required: true\n },\n itemCount: {\n type: Number,\n required: true\n },\n itemData: {\n type: Array,\n required: true\n },\n itemKey: Function,\n itemSize: {\n type: [Number, Function],\n required: true\n },\n queryPrefix: {\n type: String,\n default: ''\n },\n unlimitedSize: {\n type: Boolean,\n default: false\n },\n position: {\n type: String,\n default: 'absolute'\n },\n direction: {\n type: String,\n default: 'ltr'\n },\n layout: {\n type: String,\n default: 'vertical'\n },\n initialScrollOffset: {\n type: Number,\n default: 0\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 enhanced: {\n type: Boolean,\n default: false\n },\n shouldResetStyleCacheOnItemSizeChange: {\n type: Boolean,\n default: true\n },\n outerElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-scroll-view-core' : 'scroll-view'\n },\n innerElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-view-core' : 'view'\n },\n itemElementType: {\n type: String,\n default: process.env.TARO_PLATFORM === 'web' ? 'taro-view-core' : 'view'\n },\n outerTagName: String,\n innerTagName: String,\n itemTagName: String,\n outerRef: String,\n innerRef: String,\n onScrollNative: Function,\n onItemsRendered: Function,\n },\n data () {\n const preset = new Preset(this.$props as IProps, this.refresh as TFunc)\n const id = this.$props.id || preset.id\n preset.updateWrapper(id)\n\n return {\n itemList: preset.itemList,\n preset,\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 = 0, enhanced = this.preset.enhanced) {\n scrollOffset = Math.max(0, scrollOffset)\n if (this.scrollOffset === scrollOffset) return\n\n if (enhanced) {\n const isHorizontal = this.preset.isHorizontal\n const option: any = {\n animated: true,\n duration: 300,\n }\n if (isHorizontal) {\n option.left = scrollOffset\n } else {\n option.top = scrollOffset\n }\n return getScrollViewContextNode(`${this.$props.queryPrefix}#${this.preset.id}`).then((node: any) => node.scrollTo(option))\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: number, align = 'auto', enhanced = this.preset.enhanced) {\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 index,\n align,\n scrollOffset\n ),\n enhanced,\n )\n },\n\n _callOnItemsRendered: memoizeOne(function (overscanStartIndex, overscanStopIndex, startIndex, stopIndex) {\n return this.$props.onItemsRendered({\n overscanStartIndex,\n overscanStopIndex,\n startIndex,\n stopIndex\n })\n }),\n\n _callOnScroll: memoizeOne(function (scrollDirection, scrollOffset, scrollUpdateWasRequested, detail) {\n this.$emit('scroll', {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n detail\n })\n }),\n\n _callPropsCallbacks () {\n if (typeof this.$props.onItemsRendered === 'function') {\n if (this.$props.itemCount > 0) {\n const [overscanStartIndex, overscanStopIndex, startIndex, stopIndex] = this._getRangeToRender()\n this._callOnItemsRendered(overscanStartIndex, overscanStopIndex, startIndex, stopIndex)\n }\n }\n\n if (typeof this.$props.onScroll === 'function') {\n this._callOnScroll(\n this.scrollDirection,\n this.scrollOffset,\n this.scrollUpdateWasRequested,\n this.preset.field\n )\n }\n\n if (this.itemList.isUnlimitedMode) {\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\n _getSizeUploadSync (index: number, isHorizontal: boolean) {\n return new Promise((resolve) => {\n if (index >= 0 && index < this.$props.itemCount) {\n const times = this.itemList.compareSize(index) ? 0 : 2\n getRectSizeSync(`${this.$props.queryPrefix}#${this.preset.id}-${index}`, 100, times).then(({ width, height }) => {\n const size = isHorizontal ? width : height\n if (typeof size === 'number' && size > 0 && !this.itemList.compareSize(index, size)) {\n this.itemList.setSize(index, size)\n resolve(this.itemList.getSize(index))\n }\n })\n }\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 scrollHeight,\n scrollWidth = this.itemList.getOffsetSizeCache(),\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientWidth = this.itemList.wrapperSize\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop,\n 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 scrollHeight = this.itemList.getOffsetSizeCache(),\n scrollWidth,\n scrollTop,\n scrollLeft,\n } = event.currentTarget\n if (!isNumber(scrollHeight) || !isNumber(scrollWidth)) return\n const clientHeight = this.itemList.wrapperSize\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(0, Math.min(scrollTop, scrollHeight - clientHeight))\n this.preset.field = {\n scrollHeight,\n scrollWidth,\n scrollTop: scrollOffset,\n scrollLeft,\n 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 { outerRef } = 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(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL)\n },\n\n _resetIsScrolling () {\n this.resetIsScrollingTimeoutId = null\n this.isScrolling = false\n this.$nextTick(() => {\n this.preset.resetCache()\n })\n },\n\n getRenderItemNode (index: number, type: 'node' | 'placeholder' = 'node') {\n const { item, itemData, itemKey = defaultItemKey, useIsScrolling } = this.$props\n const { isScrolling } = this.$data\n const key = itemKey(index, itemData)\n\n const style = this.preset.getItemStyle(index)\n if (type === 'placeholder') {\n return render(this.preset.itemElement, {\n key,\n id: `${this.preset.id}-${index}-wrapper`,\n style: this.preset.isBrick ? style : { display: 'none' }\n })\n }\n\n return render(this.preset.itemElement, {\n key: itemKey(index, itemData),\n id: `${this.preset.id}-${index}-wrapper`,\n style\n }, render(item, {\n id: `${this.preset.id}-${index}`,\n data: itemData,\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined\n }))\n },\n\n getRenderColumnNode () {\n const { isScrolling } = this.$data\n const { innerRef, itemCount } = this.$props\n const isHorizontal = this.preset.isHorizontal\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 columnProps: any = {\n ref: innerRef,\n key: `${this.preset.id}-inner`,\n id: `${this.preset.id}-inner`,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n width: !isHorizontal ? '100%' : estimatedTotalSize,\n position: 'relative',\n pointerEvents: isScrolling ? 'none' : 'auto',\n }\n }\n\n const [startIndex, stopIndex] = this._getRangeToRender()\n const items = []\n\n if (this.preset.isRelative && !this.preset.isBrick) {\n const pre = convertNumber2PX(this.itemList.getOffsetSizeCache(startIndex))\n items.push(\n render(this.preset.itemElement, {\n key: `${this.preset.id}-pre`,\n id: `${this.preset.id}-pre`,\n style: {\n height: isHorizontal ? '100%' : pre,\n width: !isHorizontal ? '100%' : pre\n }\n })\n )\n }\n\n const placeholderCount = this.preset.placeholderCount\n const restCount = itemCount - stopIndex\n const prevPlaceholder = startIndex < placeholderCount ? startIndex : placeholderCount\n const postPlaceholder = restCount < placeholderCount ? restCount : placeholderCount\n\n for (let itemIndex = 0; itemIndex < stopIndex + postPlaceholder; itemIndex++) {\n if (!this.preset.isBrick) {\n if (itemIndex < startIndex - prevPlaceholder) {\n itemIndex = startIndex - prevPlaceholder\n continue\n }\n }\n\n if (itemIndex < startIndex || itemIndex > stopIndex) {\n items.push(this.getRenderItemNode(itemIndex, 'placeholder'))\n } else {\n items.push(this.getRenderItemNode(itemIndex))\n }\n }\n return render(this.preset.innerElement, columnProps, items)\n },\n getRenderExpandNodes (direction: 'top' | 'bottom' | 'left' | 'right') {\n const isHorizontal = this.preset.isHorizontal\n const isRtl = this.preset.isRtl\n const props: any = {\n id: `${this.preset.id}-${direction}`,\n style: {\n visibility: 'hidden',\n height: isHorizontal ? '100%' : 100,\n width: isHorizontal ? 100 : '100%',\n [isHorizontal ? isRtl ? 'marginRight' : 'marginLeft' : 'marginTop']: -100,\n zIndex: -1,\n }\n }\n return render(this.preset.innerElement, props)\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 this.preset.boundaryDetection()\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 this.preset.dispose()\n },\n\n render () {\n const {\n direction,\n height,\n layout,\n width,\n enhanced = false\n } = omit(this.$props, [\n 'item', 'itemCount', 'itemData', 'itemKey', 'useIsScrolling',\n 'innerElementType', 'innerTagName', 'itemElementType', 'itemTagName',\n 'outerElementType', 'outerTagName', 'onScrollToLower', 'onScrollToUpper',\n 'upperThreshold', 'lowerThreshold',\n 'position', 'innerRef',\n ])\n const {\n scrollOffset,\n scrollUpdateWasRequested\n } = this.$data\n\n const isHorizontal = this.preset.isHorizontal\n const isRtl = this.preset.isRtl\n const outerElementProps: any = {\n id: this.preset.id,\n ref: this._outerRefSetter,\n layout,\n enhanced,\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: !this.preset.isHorizontal,\n scrollX: this.preset.isHorizontal\n },\n on: {\n scroll: isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical\n }\n }\n\n if (!enhanced) {\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\n return render(this.preset.outerElement, outerElementProps, [\n this.getRenderExpandNodes(isHorizontal ? isRtl ? 'right' : 'left' : 'top'),\n this.$slots.top?.(),\n this.getRenderColumnNode(),\n this.$slots.bottom?.(),\n this.getRenderExpandNodes(isHorizontal ? isRtl ? 'left' : 'right' : 'bottom'),\n ])\n }\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,WAAe,eAAe,CAAC;AAC7B,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE,MAAM;AACV,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACtB,YAAA,QAAQ,EAAE;AACX,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACtB,YAAA,QAAQ,EAAE;AACX,SAAA;AAC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