@elliemae/ds-virtual-list 3.2.1-rc.0 → 3.2.1-rc.3
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/cjs/VirtualList.js +1 -0
- package/dist/cjs/VirtualList.js.map +1 -1
- package/dist/cjs/VirtualListDataTestID.js +1 -0
- package/dist/cjs/VirtualListDataTestID.js.map +1 -1
- package/dist/cjs/hooks/useVirtualList.js +1 -0
- package/dist/cjs/hooks/useVirtualList.js.map +1 -1
- package/dist/cjs/index.d.js +1 -0
- package/dist/cjs/index.d.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parts/List.js +1 -0
- package/dist/cjs/parts/List.js.map +1 -1
- package/dist/cjs/props.js +1 -0
- package/dist/cjs/props.js.map +1 -1
- package/dist/cjs/styled.js +1 -0
- package/dist/cjs/styled.js.map +1 -1
- package/dist/esm/VirtualList.js +1 -0
- package/dist/esm/VirtualList.js.map +1 -1
- package/dist/esm/VirtualListDataTestID.js +1 -0
- package/dist/esm/VirtualListDataTestID.js.map +1 -1
- package/dist/esm/hooks/useVirtualList.js +1 -0
- package/dist/esm/hooks/useVirtualList.js.map +1 -1
- package/dist/esm/index.d.js +1 -0
- package/dist/esm/index.d.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parts/List.js +1 -0
- package/dist/esm/parts/List.js.map +1 -1
- package/dist/esm/props.js +1 -0
- package/dist/esm/props.js.map +1 -1
- package/dist/esm/styled.js +1 -0
- package/dist/esm/styled.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/VirtualList.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/VirtualList.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-utilities';\nimport { List } from './parts/List';\nimport { DSVirtualListSchema, defaultProps } from './props';\nimport { DSVirtualListProps } from './index.d';\n\n\nconst DSVirtualList: React.ComponentType<DSVirtualListProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSVirtualListSchema);\n\n return <List {...propsWithDefault} />;\n};\n\nDSVirtualList.propTypes = DSVirtualListSchema;\nDSVirtualList.displayName = 'DSVirtualList';\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListSchema;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAA6E;AAC7E,2BAAyB;AACzB,kBAAqB;AACrB,mBAAkD;AAIlD,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,sDAA6B,OAAO,yBAAY;AACzE,0DAA+B,kBAAkB,gCAAmB;AAEpE,SAAO,mDAAC,qCAAS,iBAAkB;AACrC;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,mCAAS,aAAa,EAAE,YAAY,eAAe;AACnF,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/VirtualListDataTestID.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const LIST_DATA_TESTID = {\n CONTAINER: 'virtual-list-container',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useVirtualList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { useVirtual, VirtualItem } from 'react-virtual';\nimport { DSVirtualListProps } from '../index.d';\n\nexport const useVirtualList = (\n config: DSVirtualListProps,\n): {\n parentRef: React.MutableRefObject<HTMLDivElement>;\n virtualItems: VirtualItem[];\n filteredChildren: React.ReactNode[];\n totalSize: number;\n} => {\n const { children, actionRef } = config;\n const parentRef = React.useRef<HTMLDivElement>();\n const filteredChildren = React.useMemo(\n () => React.Children.toArray(children).filter((child) => child),\n [children],\n ) as React.ReactNode[];\n const useVirtualHelpers = useVirtual({\n size: filteredChildren.length,\n parentRef,\n overscan: 15,\n });\n React.useEffect(() => {\n if (actionRef) {\n actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;\n }\n }, [actionRef, useVirtualHelpers]);\n\n return {\n parentRef,\n virtualItems: useVirtualHelpers.virtualItems,\n filteredChildren,\n totalSize: useVirtualHelpers.totalSize,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,2BAAwC;AAGjC,MAAM,iBAAiB,CAC5B,WAMG;AACH,QAAM,EAAE,UAAU,cAAc;AAChC,QAAM,YAAY,qBAAM,OAAuB;AAC/C,QAAM,mBAAmB,qBAAM,QAC7B,MAAM,qBAAM,SAAS,QAAQ,QAAQ,EAAE,OAAO,CAAC,UAAU,KAAK,GAC9D,CAAC,QAAQ,CACX;AACA,QAAM,oBAAoB,qCAAW;AAAA,IACnC,MAAM,iBAAiB;AAAA,IACvB;AAAA,IACA,UAAU;AAAA,EACZ,CAAC;AACD,uBAAM,UAAU,MAAM;AACpB,QAAI,WAAW;AACb,gBAAU,QAAQ,WAAW,kBAAkB;AAAA,IACjD;AAAA,EACF,GAAG,CAAC,WAAW,iBAAiB,CAAC;AAEjC,SAAO;AAAA,IACL;AAAA,IACA,cAAc,kBAAkB;AAAA,IAChC;AAAA,IACA,WAAW,kBAAkB;AAAA,EAC/B;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.d.js
CHANGED
package/dist/cjs/index.d.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\n\nexport interface DSVirtualListProps {\n children: React.ReactNode[];\n actionRef: React.MutableRefObject<any>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './VirtualList';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,0BAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/parts/List.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/List.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { uid } from 'uid';\nimport { VirtualItemStyled, StyledContainerContentList, StyledVirtualList } from '../styled';\n\nimport { LIST_DATA_TESTID } from '../VirtualListDataTestID';\n\nimport { DSVirtualListProps } from '../index.d';\nimport { useVirtualList } from '../hooks/useVirtualList';\n\n/**\n * List component: renders a list of items\n * Accessibility: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/List_role\n *\n * @param {DSVirtualListProps} props\n * @returns JSX\n */\nexport const List: React.FC<DSVirtualListProps> = (props: DSVirtualListProps) => {\n const { parentRef, virtualItems, filteredChildren, totalSize } = useVirtualList(props);\n const [dynamicRerenderWorkaround, setDynamicRerenderWorkaround] = React.useState(uid(6));\n const virtualChildren = React.useMemo(\n () =>\n virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const style = {\n transform: `translateY(${start}px)`,\n };\n return (\n <VirtualItemStyled ref={measureRef} style={style} role=\"listitem\" key={`ds-virtual-list-item-${uid(6)}`}>\n {filteredChildren[index]}\n </VirtualItemStyled>\n );\n }),\n [filteredChildren, virtualItems],\n );\n React.useEffect(() => {\n setDynamicRerenderWorkaround(uid(6));\n }, [filteredChildren]);\n return (\n <StyledContainerContentList\n key={`ds-virtual-list-${dynamicRerenderWorkaround}`}\n ref={parentRef}\n data-testid={LIST_DATA_TESTID.CONTAINER}\n role=\"list\"\n >\n <StyledVirtualList height={`${totalSize}px`}>{virtualChildren}</StyledVirtualList>\n </StyledContainerContentList>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,iBAAoB;AACpB,oBAAiF;AAEjF,mCAAiC;AAGjC,4BAA+B;AASxB,MAAM,OAAqC,CAAC,UAA8B;AAC/E,QAAM,EAAE,WAAW,cAAc,kBAAkB,cAAc,0CAAe,KAAK;AACrF,QAAM,CAAC,2BAA2B,gCAAgC,qBAAM,SAAS,oBAAI,CAAC,CAAC;AACvF,QAAM,kBAAkB,qBAAM,QAC5B,MACE,aAAa,IAAI,CAAC,gBAAgB;AAChC,UAAM,EAAE,OAAO,YAAY,UAAU;AACrC,UAAM,QAAQ;AAAA,MACZ,WAAW,cAAc;AAAA,IAC3B;AACA,WACE,mDAAC;AAAA,MAAkB,KAAK;AAAA,MAAY;AAAA,MAAc,MAAK;AAAA,MAAW,KAAK,wBAAwB,oBAAI,CAAC;AAAA,OACjG,iBAAiB,MACpB;AAAA,EAEJ,CAAC,GACH,CAAC,kBAAkB,YAAY,CACjC;AACA,uBAAM,UAAU,MAAM;AACpB,iCAA6B,oBAAI,CAAC,CAAC;AAAA,EACrC,GAAG,CAAC,gBAAgB,CAAC;AACrB,SACE,mDAAC;AAAA,IACC,KAAK,mBAAmB;AAAA,IACxB,KAAK;AAAA,IACL,eAAa,8CAAiB;AAAA,IAC9B,MAAK;AAAA,KAEL,mDAAC;AAAA,IAAkB,QAAQ,GAAG;AAAA,KAAgB,eAAgB,CAChE;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/props.js
CHANGED
package/dist/cjs/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { noop } from 'lodash';\nimport { PropTypes } from '@elliemae/ds-utilities';\n\nconst actionRef = {\n scrollTo: PropTypes.func.description('Scroll to a index inside the list'),\n};\nexport const DSVirtualListSchema = {\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').defaultValue([]),\n actionRef: PropTypes.shape({\n current: PropTypes.shape(actionRef),\n }).description(`Action reference\n \nscrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void\n `),\n};\n\nexport const defaultProps = {\n children: [],\n actionRef: {\n current: {\n scrollTo: noop,\n },\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAqB;AACrB,0BAA0B;AAE1B,MAAM,YAAY;AAAA,EAChB,UAAU,8BAAU,KAAK,YAAY,mCAAmC;AAC1E;AACO,MAAM,sBAAsB;AAAA,EACjC,UAAU,8BAAU,QAAQ,8BAAU,IAAI,EAAE,YAAY,eAAe,EAAE,aAAa,CAAC,CAAC;AAAA,EACxF,WAAW,8BAAU,MAAM;AAAA,IACzB,SAAS,8BAAU,MAAM,SAAS;AAAA,EACpC,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA,GAGd;AACH;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,IACT,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
package/dist/cjs/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\nexport const StyledContainerContentList = styled.div`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\nexport const StyledVirtualList = styled.div<{ height: string }>`\n width: 100%;\n height: ${(props) => props.height};\n position: relative;\n`;\nexport const VirtualItemStyled = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAEhB,MAAM,6BAA6B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO1C,MAAM,oBAAoB,wBAAO;AAAA;AAAA,YAE5B,CAAC,UAAU,MAAM;AAAA;AAAA;AAGtB,MAAM,oBAAoB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/VirtualList.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/VirtualList.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { describe } from '@elliemae/ds-utilities';\nimport { List } from './parts/List';\nimport { DSVirtualListSchema, defaultProps } from './props';\nimport { DSVirtualListProps } from './index.d';\n\n\nconst DSVirtualList: React.ComponentType<DSVirtualListProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSVirtualListSchema);\n\n return <List {...propsWithDefault} />;\n};\n\nDSVirtualList.propTypes = DSVirtualListSchema;\nDSVirtualList.displayName = 'DSVirtualList';\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListSchema;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAIA,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,mBAAmB;AAEpE,SAAO,qCAAC,yBAAS,iBAAkB;AACrC;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa,EAAE,YAAY,eAAe;AACnF,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/VirtualListDataTestID.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const LIST_DATA_TESTID = {\n CONTAINER: 'virtual-list-container',\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAO,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
|
|
5
|
+
"mappings": ";AAAA;ACAO,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useVirtualList.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useVirtual, VirtualItem } from 'react-virtual';\nimport { DSVirtualListProps } from '../index.d';\n\nexport const useVirtualList = (\n config: DSVirtualListProps,\n): {\n parentRef: React.MutableRefObject<HTMLDivElement>;\n virtualItems: VirtualItem[];\n filteredChildren: React.ReactNode[];\n totalSize: number;\n} => {\n const { children, actionRef } = config;\n const parentRef = React.useRef<HTMLDivElement>();\n const filteredChildren = React.useMemo(\n () => React.Children.toArray(children).filter((child) => child),\n [children],\n ) as React.ReactNode[];\n const useVirtualHelpers = useVirtual({\n size: filteredChildren.length,\n parentRef,\n overscan: 15,\n });\n React.useEffect(() => {\n if (actionRef) {\n actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;\n }\n }, [actionRef, useVirtualHelpers]);\n\n return {\n parentRef,\n virtualItems: useVirtualHelpers.virtualItems,\n filteredChildren,\n totalSize: useVirtualHelpers.totalSize,\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAGO,MAAM,iBAAiB,CAC5B,WAMG;AACH,QAAM,EAAE,UAAU,cAAc;AAChC,QAAM,YAAY,OAAM,OAAuB;AAC/C,QAAM,mBAAmB,OAAM,QAC7B,MAAM,OAAM,SAAS,QAAQ,QAAQ,EAAE,OAAO,CAAC,UAAU,KAAK,GAC9D,CAAC,QAAQ,CACX;AACA,QAAM,oBAAoB,WAAW;AAAA,IACnC,MAAM,iBAAiB;AAAA,IACvB;AAAA,IACA,UAAU;AAAA,EACZ,CAAC;AACD,SAAM,UAAU,MAAM;AACpB,QAAI,WAAW;AACb,gBAAU,QAAQ,WAAW,kBAAkB;AAAA,IACjD;AAAA,EACF,GAAG,CAAC,WAAW,iBAAiB,CAAC;AAEjC,SAAO;AAAA,IACL;AAAA,IACA,cAAc,kBAAkB;AAAA,IAChC;AAAA,IACA,WAAW,kBAAkB;AAAA,EAC/B;AACF;",
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AAGO,MAAM,iBAAiB,CAC5B,WAMG;AACH,QAAM,EAAE,UAAU,cAAc;AAChC,QAAM,YAAY,OAAM,OAAuB;AAC/C,QAAM,mBAAmB,OAAM,QAC7B,MAAM,OAAM,SAAS,QAAQ,QAAQ,EAAE,OAAO,CAAC,UAAU,KAAK,GAC9D,CAAC,QAAQ,CACX;AACA,QAAM,oBAAoB,WAAW;AAAA,IACnC,MAAM,iBAAiB;AAAA,IACvB;AAAA,IACA,UAAU;AAAA,EACZ,CAAC;AACD,SAAM,UAAU,MAAM;AACpB,QAAI,WAAW;AACb,gBAAU,QAAQ,WAAW,kBAAkB;AAAA,IACjD;AAAA,EACF,GAAG,CAAC,WAAW,iBAAiB,CAAC;AAEjC,SAAO;AAAA,IACL;AAAA,IACA,cAAc,kBAAkB;AAAA,IAChC;AAAA,IACA,WAAW,kBAAkB;AAAA,EAC/B;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.d.js
CHANGED
package/dist/esm/index.d.js.map
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './VirtualList';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;",
|
|
5
|
+
"mappings": ";AAAA;ACAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/parts/List.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/List.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { uid } from 'uid';\nimport { VirtualItemStyled, StyledContainerContentList, StyledVirtualList } from '../styled';\n\nimport { LIST_DATA_TESTID } from '../VirtualListDataTestID';\n\nimport { DSVirtualListProps } from '../index.d';\nimport { useVirtualList } from '../hooks/useVirtualList';\n\n/**\n * List component: renders a list of items\n * Accessibility: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/List_role\n *\n * @param {DSVirtualListProps} props\n * @returns JSX\n */\nexport const List: React.FC<DSVirtualListProps> = (props: DSVirtualListProps) => {\n const { parentRef, virtualItems, filteredChildren, totalSize } = useVirtualList(props);\n const [dynamicRerenderWorkaround, setDynamicRerenderWorkaround] = React.useState(uid(6));\n const virtualChildren = React.useMemo(\n () =>\n virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const style = {\n transform: `translateY(${start}px)`,\n };\n return (\n <VirtualItemStyled ref={measureRef} style={style} role=\"listitem\" key={`ds-virtual-list-item-${uid(6)}`}>\n {filteredChildren[index]}\n </VirtualItemStyled>\n );\n }),\n [filteredChildren, virtualItems],\n );\n React.useEffect(() => {\n setDynamicRerenderWorkaround(uid(6));\n }, [filteredChildren]);\n return (\n <StyledContainerContentList\n key={`ds-virtual-list-${dynamicRerenderWorkaround}`}\n ref={parentRef}\n data-testid={LIST_DATA_TESTID.CONTAINER}\n role=\"list\"\n >\n <StyledVirtualList height={`${totalSize}px`}>{virtualChildren}</StyledVirtualList>\n </StyledContainerContentList>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEA;AAGA;AASO,MAAM,OAAqC,CAAC,UAA8B;AAC/E,QAAM,EAAE,WAAW,cAAc,kBAAkB,cAAc,eAAe,KAAK;AACrF,QAAM,CAAC,2BAA2B,gCAAgC,OAAM,SAAS,IAAI,CAAC,CAAC;AACvF,QAAM,kBAAkB,OAAM,QAC5B,MACE,aAAa,IAAI,CAAC,gBAAgB;AAChC,UAAM,EAAE,OAAO,YAAY,UAAU;AACrC,UAAM,QAAQ;AAAA,MACZ,WAAW,cAAc;AAAA,IAC3B;AACA,WACE,qCAAC;AAAA,MAAkB,KAAK;AAAA,MAAY;AAAA,MAAc,MAAK;AAAA,MAAW,KAAK,wBAAwB,IAAI,CAAC;AAAA,OACjG,iBAAiB,MACpB;AAAA,EAEJ,CAAC,GACH,CAAC,kBAAkB,YAAY,CACjC;AACA,SAAM,UAAU,MAAM;AACpB,iCAA6B,IAAI,CAAC,CAAC;AAAA,EACrC,GAAG,CAAC,gBAAgB,CAAC;AACrB,SACE,qCAAC;AAAA,IACC,KAAK,mBAAmB;AAAA,IACxB,KAAK;AAAA,IACL,eAAa,iBAAiB;AAAA,IAC9B,MAAK;AAAA,KAEL,qCAAC;AAAA,IAAkB,QAAQ,GAAG;AAAA,KAAgB,eAAgB,CAChE;AAEJ;",
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AAEA;AAGA;AASO,MAAM,OAAqC,CAAC,UAA8B;AAC/E,QAAM,EAAE,WAAW,cAAc,kBAAkB,cAAc,eAAe,KAAK;AACrF,QAAM,CAAC,2BAA2B,gCAAgC,OAAM,SAAS,IAAI,CAAC,CAAC;AACvF,QAAM,kBAAkB,OAAM,QAC5B,MACE,aAAa,IAAI,CAAC,gBAAgB;AAChC,UAAM,EAAE,OAAO,YAAY,UAAU;AACrC,UAAM,QAAQ;AAAA,MACZ,WAAW,cAAc;AAAA,IAC3B;AACA,WACE,qCAAC;AAAA,MAAkB,KAAK;AAAA,MAAY;AAAA,MAAc,MAAK;AAAA,MAAW,KAAK,wBAAwB,IAAI,CAAC;AAAA,OACjG,iBAAiB,MACpB;AAAA,EAEJ,CAAC,GACH,CAAC,kBAAkB,YAAY,CACjC;AACA,SAAM,UAAU,MAAM;AACpB,iCAA6B,IAAI,CAAC,CAAC;AAAA,EACrC,GAAG,CAAC,gBAAgB,CAAC;AACrB,SACE,qCAAC;AAAA,IACC,KAAK,mBAAmB;AAAA,IACxB,KAAK;AAAA,IACL,eAAa,iBAAiB;AAAA,IAC9B,MAAK;AAAA,KAEL,qCAAC;AAAA,IAAkB,QAAQ,GAAG;AAAA,KAAgB,eAAgB,CAChE;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/props.js
CHANGED
package/dist/esm/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { noop } from 'lodash';\nimport { PropTypes } from '@elliemae/ds-utilities';\n\nconst actionRef = {\n scrollTo: PropTypes.func.description('Scroll to a index inside the list'),\n};\nexport const DSVirtualListSchema = {\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').defaultValue([]),\n actionRef: PropTypes.shape({\n current: PropTypes.shape(actionRef),\n }).description(`Action reference\n \nscrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void\n `),\n};\n\nexport const defaultProps = {\n children: [],\n actionRef: {\n current: {\n scrollTo: noop,\n },\n },\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,YAAY;AAAA,EAChB,UAAU,UAAU,KAAK,YAAY,mCAAmC;AAC1E;AACO,MAAM,sBAAsB;AAAA,EACjC,UAAU,UAAU,QAAQ,UAAU,IAAI,EAAE,YAAY,eAAe,EAAE,aAAa,CAAC,CAAC;AAAA,EACxF,WAAW,UAAU,MAAM;AAAA,IACzB,SAAS,UAAU,MAAM,SAAS;AAAA,EACpC,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA,GAGd;AACH;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,IACT,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF;",
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AAEA,MAAM,YAAY;AAAA,EAChB,UAAU,UAAU,KAAK,YAAY,mCAAmC;AAC1E;AACO,MAAM,sBAAsB;AAAA,EACjC,UAAU,UAAU,QAAQ,UAAU,IAAI,EAAE,YAAY,eAAe,EAAE,aAAa,CAAC,CAAC;AAAA,EACxF,WAAW,UAAU,MAAM;AAAA,IACzB,SAAS,UAAU,MAAM,SAAS;AAAA,EACpC,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA,GAGd;AACH;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,IACT,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
package/dist/esm/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\n\nexport const StyledContainerContentList = styled.div`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\nexport const StyledVirtualList = styled.div<{ height: string }>`\n width: 100%;\n height: ${(props) => props.height};\n position: relative;\n`;\nexport const VirtualItemStyled = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEO,MAAM,6BAA6B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO1C,MAAM,oBAAoB,OAAO;AAAA;AAAA,YAE5B,CAAC,UAAU,MAAM;AAAA;AAAA;AAGtB,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
5
|
+
"mappings": ";AAAA;ACAA;AAEO,MAAM,6BAA6B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO1C,MAAM,oBAAoB,OAAO;AAAA;AAAA,YAE5B,CAAC,UAAU,MAAM;AAAA;AAAA;AAGtB,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-virtual-list",
|
|
3
|
-
"version": "3.2.1-rc.
|
|
3
|
+
"version": "3.2.1-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Virtual List",
|
|
6
6
|
"files": [
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"indent": 4
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@elliemae/ds-system": "3.2.1-rc.
|
|
63
|
-
"@elliemae/ds-utilities": "3.2.1-rc.
|
|
62
|
+
"@elliemae/ds-system": "3.2.1-rc.3",
|
|
63
|
+
"@elliemae/ds-utilities": "3.2.1-rc.3",
|
|
64
64
|
"react-virtual": "~2.10.4",
|
|
65
65
|
"uid": "^2.0.0"
|
|
66
66
|
},
|