@ubnt/store.core 10.20.0-alpha.21 → 10.20.0-alpha.23
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/CHANGELOG.md +8 -0
- package/lib/assets/ai-dome.jpg +0 -0
- package/lib/assets/ai-dome2.jpg +0 -0
- package/lib/assets/ai-dslr.jpg +0 -0
- package/lib/assets/ai-dslr2.jpg +0 -0
- package/lib/assets/ai-lpr.jpg +0 -0
- package/lib/assets/ai-lpr2.jpg +0 -0
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/bullet2.svg +4 -2
- package/lib/assets/bullet3.svg +2 -4
- package/lib/assets/express.jpg +0 -0
- package/lib/assets/express2.jpg +0 -0
- package/lib/assets/g2-reader-pro.jpg +0 -0
- package/lib/assets/g2-reader-pro2.jpg +0 -0
- package/lib/assets/g3-reader.jpg +0 -0
- package/lib/assets/g3-reader2.jpg +0 -0
- package/lib/assets/g3-starter-kit-pro.jpg +0 -0
- package/lib/assets/g3-starter-kit-pro2.jpg +0 -0
- package/lib/assets/g3-starter-kit.jpg +0 -0
- package/lib/assets/g3-starter-kit2.jpg +0 -0
- package/lib/assets/g4-ptz.jpg +0 -0
- package/lib/assets/g4-ptz2.jpg +0 -0
- package/lib/assets/g5-dome-ultra.jpg +0 -0
- package/lib/assets/g5-dome-ultra2.jpg +0 -0
- package/lib/assets/g5-dome.jpg +0 -0
- package/lib/assets/g5-dome2.jpg +0 -0
- package/lib/assets/interior-design.svg +2 -2
- package/lib/assets/interior-design2.svg +2 -2
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/ptz2.svg +2 -2
- package/lib/assets/ptz3.svg +2 -2
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js +5 -0
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs +5 -0
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.js +5 -9
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.mjs +5 -9
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.d.ts +21 -21
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js +7 -5
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs +7 -5
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.js +17 -19
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.mjs +17 -19
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.js +21 -20
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.mjs +21 -20
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/EmptyColumnHeader/EmptyColumnHeader.js +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/EmptyColumnHeader/EmptyColumnHeader.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/EmptyColumnHeader/EmptyColumnHeader.mjs +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/EmptyColumnHeader/EmptyColumnHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/HeaderShadow.js +11 -11
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/HeaderShadow.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/HeaderShadow.mjs +11 -11
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/HeaderShadow.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.js +5 -7
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.mjs +5 -7
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/ProductHeader/ProductHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/PropertyValueGridItem.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/PropertyValueGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridBody.js +6 -6
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridBody.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridBody.mjs +6 -6
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridBody.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.js +9 -9
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.mjs +9 -9
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridItem.d.ts +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridItem.js +5 -5
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridItem.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridItem.mjs +5 -5
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV4/ModelCompareV4.js +18 -9
- package/lib/components/ModelCompareV4/ModelCompareV4.js.map +1 -1
- package/lib/components/ModelCompareV4/ModelCompareV4.mjs +18 -9
- package/lib/components/ModelCompareV4/ModelCompareV4.mjs.map +1 -1
- package/lib/components/ModelCompareV4/ProductList/ProductList.js +11 -7
- package/lib/components/ModelCompareV4/ProductList/ProductList.js.map +1 -1
- package/lib/components/ModelCompareV4/ProductList/ProductList.mjs +12 -8
- package/lib/components/ModelCompareV4/ProductList/ProductList.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-dslr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-dslr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.js +5 -5
- package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Consoles/express.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Consoles/express.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/interior-design.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/interior-design.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-dslr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-dslr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/ptz.svg.mjs +2 -2
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +3 -3
- package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +2 -2
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/aiDome.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiDome.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiDslr.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiDslr.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiLpr.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiLpr.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/express.js +1 -1
- package/lib/constants/modelCompareData/data/products/express.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3Reader.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3Reader.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKitPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5DomeUltra.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5DomeUltra.mjs +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductList.js","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft ?? 0);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const checkIsScrolling = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is tracked in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n };\n\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n checkIsScrolling,\n );\n\n return () => {\n window.removeEventListener(\"resize\", checkIsScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","checkIsScrolling","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,4BAAcV,QAAQ,CAAA;EACtC,MAAAW,sBAAA,GAAyBF,cAAcG,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,aAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,aAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,KAAAA,CAAAA,SAAS,KAAK,CAAA;EACpE,MAAM,CAACC,WAAA,EAAaC,cAAc,CAAA,GAAIF,KAAAA,CAAAA,SAASb,kBAAkB,CAAA;EACjE,MAAM,CAACgB,aAAA,EAAeC,gBAAgB,CAAA,GAAIJ,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAClD,MAAAK,UAAA,GAAaC,uBAAcX,YAAY,CAAA;EAC7C,MAAM,CAACY,UAAA,EAAYC,aAAa,CAAA,GAAIR,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAClD,MAAM,CAACS,cAAA,EAAgBC,iBAAiB,CAAA,GAAIV,KAAA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":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nconst CHECK_FOR_SCROLL_TIMEOUT = 150;\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = useMemo(() => groupProducts(products), [products]);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n let timeoutId: NodeJS.Timeout;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n timeoutId = setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, CHECK_FOR_SCROLL_TIMEOUT);\n }\n\n return () => {\n clearTimeout(timeoutId);\n };\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft ?? 0);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const checkIsScrolling = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is tracked in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, CHECK_FOR_SCROLL_TIMEOUT);\n };\n\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n checkIsScrolling,\n );\n\n return () => {\n window.removeEventListener(\"resize\", checkIsScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, CHECK_FOR_SCROLL_TIMEOUT);\n },\n [containerRef, setPlayAnimation, setActiveGroup],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["CHECK_FOR_SCROLL_TIMEOUT","ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","useMemo","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","timeoutId","setTimeout","currentPosition","clearTimeout","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","checkIsScrolling","window","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,wBAA2B,GAAA,GAAA;AAE1B,MAAMC,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,KAAAA,CAAAA,QAAQ,MAAMC,aAAAA,CAAAA,aAAA,CAAcX,QAAQ,CAAG,EAAA,CAACA,QAAQ,CAAC,CAAA;EACjE,MAAAY,sBAAA,GAAyBH,cAAcI,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,aAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,aAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,KAAAA,CAAAA,SAAS,KAAK,CAAA;EACpE,MAAM,CAACC,WAAA,EAAaC,cAAc,CAAA,GAAIF,KAAAA,CAAAA,SAASd,kBAAkB,CAAA;EACjE,MAAM,CAACiB,aAAA,EAAeC,gBAAgB,CAAA,GAAIJ,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAClD,MAAAK,UAAA,GAAaC,uBAAcX,YAAY,CAAA;EAC7C,MAAM,CAACY,UAAA,EAAYC,aAAa,CAAA,GAAIR,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAClD,MAAM,CAACS,cAAA,EAAgBC,iBAAiB,CAAA,GAAIV,KAAAA,CAAAA,SAAS,IAAI,CAAA;EACzD,MAAM,CAACW,WAAA,EAAaC,cAAc,CAAA,GAAIZ,KAAAA,CAAAA,SAAiB,CAAC,CAAA;EAExDa,QAAA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|
2
|
+
import { useMemo, useRef, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { useHoverDirty, useEffectOnce } from 'react-use';
|
|
4
4
|
import './components/ButtonGroup/index.mjs';
|
|
5
5
|
import { Product } from './components/Product/Product.mjs';
|
|
@@ -10,6 +10,7 @@ import { PRODUCT_CARD_WIDTH, PRODUCT_LIST_GRID_GAP, Wrapper, Container, ProductG
|
|
|
10
10
|
import { useIsAtMaxScroll } from './useIsAtMaxScroll.mjs';
|
|
11
11
|
import { ButtonGroup } from './components/ButtonGroup/ButtonGroup.mjs';
|
|
12
12
|
"use strict";
|
|
13
|
+
const CHECK_FOR_SCROLL_TIMEOUT = 150;
|
|
13
14
|
const ProductList = ({
|
|
14
15
|
products,
|
|
15
16
|
selectedProducts,
|
|
@@ -21,7 +22,7 @@ const ProductList = ({
|
|
|
21
22
|
showProductGroups,
|
|
22
23
|
isOverviewPage
|
|
23
24
|
}) => {
|
|
24
|
-
const groupedGroups = groupProducts(products);
|
|
25
|
+
const groupedGroups = useMemo(() => groupProducts(products), [products]);
|
|
25
26
|
const moreThanOneGroupExists = groupedGroups.length > 1;
|
|
26
27
|
const containerRef = useRef(null);
|
|
27
28
|
const productListRef = useRef(null);
|
|
@@ -32,7 +33,6 @@ const ProductList = ({
|
|
|
32
33
|
const [isDragging, setIsDragging] = useState(false);
|
|
33
34
|
const [overflowExists, setOverflowExists] = useState(true);
|
|
34
35
|
const [endPosition, setEndPosition] = useState(0);
|
|
35
|
-
const checkForScrollTimeout = 150;
|
|
36
36
|
useEffectOnce(() => {
|
|
37
37
|
const refsExist = containerRef.current && productListRef.current;
|
|
38
38
|
if (refsExist && containerRef.current?.getBoundingClientRect().width < productListRef.current?.getBoundingClientRect().width) {
|
|
@@ -51,14 +51,18 @@ const ProductList = ({
|
|
|
51
51
|
}, [hasBeenObserved, setPlayAnimation, showProductGroups]);
|
|
52
52
|
useEffect(() => {
|
|
53
53
|
const productListInitialPosition = productListRef.current?.getBoundingClientRect().left;
|
|
54
|
+
let timeoutId;
|
|
54
55
|
if (hasBeenObserved || buttonHasBeenClick) {
|
|
55
|
-
setTimeout(() => {
|
|
56
|
+
timeoutId = setTimeout(() => {
|
|
56
57
|
const currentPosition = productListRef.current?.getBoundingClientRect().left;
|
|
57
58
|
if (productListInitialPosition === currentPosition) {
|
|
58
59
|
return setPlayAnimation(true);
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
+
}, CHECK_FOR_SCROLL_TIMEOUT);
|
|
61
62
|
}
|
|
63
|
+
return () => {
|
|
64
|
+
clearTimeout(timeoutId);
|
|
65
|
+
};
|
|
62
66
|
}, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);
|
|
63
67
|
const dragStartingPosition = useRef(0);
|
|
64
68
|
const scrollAmount = useRef(0);
|
|
@@ -95,7 +99,7 @@ const ProductList = ({
|
|
|
95
99
|
isScrolling = setTimeout(function () {
|
|
96
100
|
setPlayAnimation(true);
|
|
97
101
|
setEndPosition(containerRef.current?.scrollLeft);
|
|
98
|
-
},
|
|
102
|
+
}, CHECK_FOR_SCROLL_TIMEOUT);
|
|
99
103
|
};
|
|
100
104
|
containerRef.current.addEventListener("scroll", checkIsScrolling);
|
|
101
105
|
return () => {
|
|
@@ -123,8 +127,8 @@ const ProductList = ({
|
|
|
123
127
|
if (checkForScroll()) {
|
|
124
128
|
setPlayAnimation(true);
|
|
125
129
|
}
|
|
126
|
-
},
|
|
127
|
-
}, [containerRef, setPlayAnimation, setActiveGroup
|
|
130
|
+
}, CHECK_FOR_SCROLL_TIMEOUT);
|
|
131
|
+
}, [containerRef, setPlayAnimation, setActiveGroup]);
|
|
128
132
|
const scrollButtonHandler = ({
|
|
129
133
|
isLeftArrow
|
|
130
134
|
}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductList.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = groupProducts(products);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n const checkForScrollTimeout = 150;\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n }\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft ?? 0);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const checkIsScrolling = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is tracked in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, checkForScrollTimeout);\n };\n\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n checkIsScrolling,\n );\n\n return () => {\n window.removeEventListener(\"resize\", checkIsScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, checkForScrollTimeout);\n },\n [containerRef, setPlayAnimation, setActiveGroup, checkForScrollTimeout],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","checkForScrollTimeout","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","setTimeout","currentPosition","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","checkIsScrolling","window","clearTimeout","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;AAgBO,MAAMA,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;E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KsG,OAAQ,CAAAvE,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProductList.mjs","sources":["../../../../src/components/ModelCompareV4/ProductList/ProductList.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useEffectOnce, useHoverDirty } from \"react-use\";\n\nimport type {\n ProductId,\n ProductListGroupId,\n} from \"../../../constants/modelCompareData/types\";\nimport { ButtonGroup } from \"./components/ButtonGroup\";\nimport { Product } from \"./components/Product/Product\";\nimport { groupProducts } from \"./components/ProductGroups/groupProducts\";\nimport { ProductGroups } from \"./components/ProductGroups/ProductGroups\";\nimport { ScrollButton } from \"./components/ScrollButton/ScrollButton\";\nimport * as S from \"./ProductList.styles\";\nimport type { ProductListProps } from \"./ProductList.types\";\nimport { useIsAtMaxScroll } from \"./useIsAtMaxScroll\";\n\nconst CHECK_FOR_SCROLL_TIMEOUT = 150;\n\nexport const ProductList = ({\n products,\n selectedProducts,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n initialActiveGroup,\n setExternalState,\n showProductGroups,\n isOverviewPage,\n}: ProductListProps) => {\n const groupedGroups = useMemo(() => groupProducts(products), [products]);\n const moreThanOneGroupExists = groupedGroups.length > 1;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const productListRef = useRef<HTMLDivElement>(null);\n\n const [buttonHasBeenClick, setButtonHasBeenClicked] = useState(false);\n const [activeGroup, setActiveGroup] = useState(initialActiveGroup);\n const [playAnimation, setPlayAnimation] = useState(false);\n const isHovering = useHoverDirty(containerRef);\n const [isDragging, setIsDragging] = useState(false);\n const [overflowExists, setOverflowExists] = useState(true);\n const [endPosition, setEndPosition] = useState<number>(0);\n\n useEffectOnce(() => {\n const refsExist = containerRef.current && productListRef.current;\n if (\n refsExist &&\n containerRef.current?.getBoundingClientRect().width <\n productListRef.current?.getBoundingClientRect().width\n ) {\n setOverflowExists(true);\n } else {\n setOverflowExists(false);\n }\n });\n\n // TODO: figure out how to remove this TODO. Currently, without this `useEffect` `activeGroup` isn't updating when toggling between different tables (`Section`s).\n // ModelCompareV4 is sometimes used to toggle between sets of data of type Section. In this situation, we need the initial active group to be updated when the new data is passed to ModelCompareV4\n useEffect(() => {\n setActiveGroup(products[0]?.productListGroup?.id as ProductListGroupId);\n }, [products]);\n\n // #############################################################################\n // Scroll-Specific useEffects\n // #############################################################################\n\n // if there aren't any product list group buttons then the ending state of the animations need to exist on the initial render\n useEffect(() => {\n if (!showProductGroups && hasBeenObserved) {\n setPlayAnimation(true);\n }\n }, [hasBeenObserved, setPlayAnimation, showProductGroups]);\n\n // plays animation when no scroll has occurred on the initial observe\n useEffect(() => {\n const productListInitialPosition =\n productListRef.current?.getBoundingClientRect().left;\n\n let timeoutId: NodeJS.Timeout;\n\n if (hasBeenObserved || buttonHasBeenClick) {\n timeoutId = setTimeout(() => {\n const currentPosition =\n productListRef.current?.getBoundingClientRect().left;\n if (productListInitialPosition === currentPosition) {\n return setPlayAnimation(true);\n }\n }, CHECK_FOR_SCROLL_TIMEOUT);\n }\n\n return () => {\n clearTimeout(timeoutId);\n };\n }, [hasBeenObserved, setPlayAnimation, buttonHasBeenClick]);\n\n // #############################################################################\n // Drag Logic\n // #############################################################################\n const dragStartingPosition = useRef(0);\n const scrollAmount = useRef(0);\n\n const dragHandler = useCallback(\n (event: MouseEvent) => {\n scrollAmount.current = dragStartingPosition.current - event.clientX;\n containerRef.current?.scrollTo(endPosition + scrollAmount.current, 0);\n },\n [endPosition],\n );\n\n const mouseUpHandler = useCallback(() => {\n setIsDragging(false);\n setEndPosition(containerRef.current?.scrollLeft ?? 0);\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n }, [dragHandler]);\n\n const mouseDownHandler = useCallback(\n (event: React.MouseEvent<Element, MouseEvent>) => {\n if (event.buttons === 1) {\n dragStartingPosition.current = event.clientX;\n setIsDragging(true);\n document.addEventListener(\"mousemove\", dragHandler);\n document.addEventListener(\"mouseup\", mouseUpHandler);\n }\n },\n [dragHandler, mouseUpHandler],\n );\n\n // Add cleanup for drag handlers on unmount\n useEffect(() => {\n return () => {\n document.removeEventListener(\"mousemove\", dragHandler);\n document.removeEventListener(\"mouseup\", mouseUpHandler);\n };\n }, [dragHandler, mouseUpHandler]);\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) return;\n\n let isScrolling: NodeJS.Timeout;\n\n const checkIsScrolling = () => {\n window.clearTimeout(isScrolling);\n\n // if scrolling occurs, animations are played after scrolling has completed\n // if scrolling occurs, the container's end position is tracked in state after scrolling has completed\n isScrolling = setTimeout(function () {\n setPlayAnimation(true);\n setEndPosition(containerRef.current?.scrollLeft as number);\n }, CHECK_FOR_SCROLL_TIMEOUT);\n };\n\n (containerRef.current as HTMLDivElement).addEventListener(\n \"scroll\",\n checkIsScrolling,\n );\n\n return () => {\n window.removeEventListener(\"resize\", checkIsScrolling);\n };\n }, []); // Empty dependency array since we want this to run once\n\n // #############################################################################\n // Click to Scroll Logic\n // #############################################################################\n\n const tabClickHandler = useCallback(\n ({ groupId }: { groupId: ProductListGroupId }) => {\n const initialScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n const checkForScroll = () => {\n const currentScrollPosition = (containerRef.current as HTMLDivElement)\n .scrollLeft;\n\n return currentScrollPosition === initialScrollPosition;\n };\n\n const element = document.getElementById(groupId) as HTMLDivElement;\n\n setPlayAnimation(false);\n setActiveGroup(groupId);\n setButtonHasBeenClicked(true);\n element?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"start\",\n block: \"nearest\",\n });\n\n // if no scroll occurs animations are played\n setTimeout(() => {\n if (checkForScroll()) {\n setPlayAnimation(true);\n }\n }, CHECK_FOR_SCROLL_TIMEOUT);\n },\n [containerRef, setPlayAnimation, setActiveGroup],\n );\n\n const scrollButtonHandler = ({ isLeftArrow }: { isLeftArrow?: boolean }) => {\n if (containerRef.current) {\n const currentScrollPosition = containerRef.current?.scrollLeft;\n\n const scrollLength = isLeftArrow\n ? currentScrollPosition - S.PRODUCT_CARD_WIDTH - S.PRODUCT_LIST_GRID_GAP\n : currentScrollPosition +\n S.PRODUCT_CARD_WIDTH +\n S.PRODUCT_LIST_GRID_GAP;\n\n containerRef.current?.scrollTo(scrollLength, 0);\n }\n };\n\n const { isMaxLeft, isMaxRight } = useIsAtMaxScroll(containerRef);\n\n return (\n <S.Wrapper>\n {showProductGroups && moreThanOneGroupExists && (\n <ButtonGroup\n items={groupedGroups.map((group) => group.productListGroup)}\n activeButton={activeGroup as string}\n onClick={(id) => {\n tabClickHandler({ groupId: id as ProductListGroupId });\n }}\n />\n )}\n <S.Container\n ref={containerRef}\n $isHovering={isHovering}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n $isDragging={isDragging}\n >\n <S.ProductGroupProductListContainer>\n {moreThanOneGroupExists && (\n <ProductGroups\n products={products}\n activeGroup={activeGroup as ProductListGroupId}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n showProductGroups={showProductGroups}\n />\n )}\n <S.ProductList\n $columns={products.length}\n $isDragging={isDragging}\n $overflowExists={overflowExists}\n $moreThanOneGroupExists={moreThanOneGroupExists}\n onMouseDown={(event) => mouseDownHandler(event)}\n onMouseUp={mouseUpHandler}\n ref={productListRef}\n >\n <ScrollButton\n color=\"white\"\n rotationDegrees={180}\n isVisible={!isMaxLeft}\n onClick={() => scrollButtonHandler({ isLeftArrow: true })}\n />\n <ScrollButton\n color=\"white\"\n rotationDegrees={0}\n isVisible={isMaxRight}\n isRightButton\n onClick={() => scrollButtonHandler({ isLeftArrow: false })}\n />\n {products.map((product, productsArrayIndex) => {\n const groupIsActive =\n product.productListGroup?.id === activeGroup;\n\n const productListGroup = products.filter(\n (product) => activeGroup === product.productListGroup?.id,\n );\n\n const groupIndex = productListGroup.findIndex(\n (item) => item.id === product.id,\n );\n\n return (\n <Product\n onClick={() =>\n setActiveGroup(\n product.productListGroup?.id as ProductListGroupId,\n )\n }\n key={product.id}\n groupIndex={groupIndex}\n groupLength={productListGroup.length}\n id={product?.id as ProductId}\n groupId={product.productListGroup?.id as ProductListGroupId}\n image={product.image ?? { src: \"\", width: 0, height: 0 }}\n name={product.title}\n description={product.description}\n selectedProducts={selectedProducts}\n setSelectedProducts={setSelectedProducts}\n setExternalState={setExternalState}\n groupIsActive={groupIsActive}\n playAnimation={playAnimation}\n canPlayAniimation={hasBeenObserved || buttonHasBeenClick}\n selectedProductsLimit={selectedProductsLimit}\n showProductGroups={showProductGroups}\n isStaticProduct={productsArrayIndex === 0}\n isOverviewPage={isOverviewPage}\n />\n );\n })}\n </S.ProductList>\n </S.ProductGroupProductListContainer>\n </S.Container>\n </S.Wrapper>\n );\n};\n"],"names":["CHECK_FOR_SCROLL_TIMEOUT","ProductList","products","selectedProducts","setSelectedProducts","hasBeenObserved","selectedProductsLimit","initialActiveGroup","setExternalState","showProductGroups","isOverviewPage","groupedGroups","useMemo","groupProducts","moreThanOneGroupExists","length","containerRef","useRef","productListRef","buttonHasBeenClick","setButtonHasBeenClicked","useState","activeGroup","setActiveGroup","playAnimation","setPlayAnimation","isHovering","useHoverDirty","isDragging","setIsDragging","overflowExists","setOverflowExists","endPosition","setEndPosition","useEffectOnce","refsExist","current","getBoundingClientRect","width","useEffect","productListGroup","id","productListInitialPosition","left","timeoutId","setTimeout","currentPosition","clearTimeout","dragStartingPosition","scrollAmount","dragHandler","useCallback","event","clientX","scrollTo","mouseUpHandler","scrollLeft","document","removeEventListener","mouseDownHandler","buttons","addEventListener","container","isScrolling","checkIsScrolling","window","tabClickHandler","groupId","initialScrollPosition","checkForScroll","currentScrollPosition","element","getElementById","scrollIntoView","behavior","inline","block","scrollButtonHandler","isLeftArrow","scrollLength","S.PRODUCT_CARD_WIDTH","S.PRODUCT_LIST_GRID_GAP","isMaxLeft","isMaxRight","useIsAtMaxScroll","jsxs","S.Wrapper","children","jsx","ButtonGroup","items","map","group","activeButton","onClick","S.Container","ref","$isHovering","$moreThanOneGroupExists","$isDragging","S.ProductGroupProductListContainer","ProductGroups","canPlayAniimation","S.ProductList","$columns","$overflowExists","onMouseDown","onMouseUp","ScrollButton","color","rotationDegrees","isVisible","isRightButton","product","productsArrayIndex","groupIsActive","filter","groupIndex","findIndex","item","Product","groupLength","image","src","height","name","title","description","isStaticProduct"],"mappings":";;;;;;;;;;;;AAgBA,MAAMA,wBAA2B,GAAA,GAAA;AAE1B,MAAMC,cAAcA,CAAC;EAC1BC,QAAA;EACAC,gBAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,kBAAA;EACAC,gBAAA;EACAC,iBAAA;EACAC;AACF,CAAwB,KAAA;EAChB,MAAAC,aAAA,GAAgBC,QAAQ,MAAMC,aAAA,CAAcX,QAAQ,CAAG,EAAA,CAACA,QAAQ,CAAC,CAAA;EACjE,MAAAY,sBAAA,GAAyBH,cAAcI,MAAS,GAAA,CAAA;EAEhD,MAAAC,YAAA,GAAeC,OAAuB,IAAI,CAAA;EAC1C,MAAAC,cAAA,GAAiBD,OAAuB,IAAI,CAAA;EAElD,MAAM,CAACE,kBAAA,EAAoBC,uBAAuB,CAAA,GAAIC,SAAS,KAAK,CAAA;EACpE,MAAM,CAACC,WAAA,EAAaC,cAAc,CAAA,GAAIF,SAASd,kBAAkB,CAAA;EACjE,MAAM,CAACiB,aAAA,EAAeC,gBAAgB,CAAA,GAAIJ,SAAS,KAAK,CAAA;EAClD,MAAAK,UAAA,GAAaC,cAAcX,YAAY,CAAA;EAC7C,MAAM,CAACY,UAAA,EAAYC,aAAa,CAAA,GAAIR,SAAS,KAAK,CAAA;EAClD,MAAM,CAACS,cAAA,EAAgBC,iBAAiB,CAAA,GAAIV,SAAS,IAAI,CAAA;EACzD,MAAM,CAACW,WAAA,EAAaC,cAAc,CAAA,GAAIZ,SAAiB,CAAC,CAAA;EAExDa,aAA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E,gBAAkB,EAAAC,EAC5B,CAAA;cAGF4E,UAAA;cACAI,aAAajF,gBAAiB,CAAAzB,MAAA;cAC9B0B,IAAIwE,OAAS,EAAAxE,EAAA;cACb0B,OAAA,EAAS8C,QAAQzE,gBAAkB,EAAAC,EAAA;cACnCiF,KAAA,EAAOT,QAAQS,KAAS,IAAA;gBAAEC,KAAK,EAAI;gBAAArF,KAAA,EAAO,CAAG;gBAAAsF,MAAA,EAAQ;cAAE,CAAA;cACvDC,MAAMZ,OAAQ,CAAAa,KAAA;cACdC,aAAad,OAAQ,CAAAc,WAAA;cACrB5H,gBAAA;cACAC,mBAAA;cACAI,gBAAA;cACA2G,aAAA;cACA3F,aAAA;cACA8E,mBAAmBjG,eAAmB,IAAAc,kBAAA;cACtCb,qBAAA;cACAG,iBAAA;cACAuH,iBAAiBd,kBAAuB,KAAA,CAAA;cACxCxG;YAAA,CAAA,EAjBKuG,OAAQ,CAAAxE,EAkBf,CAAA;UAEH,CAAA,CAAA;QAAA,CAAA,CAAA;MAEL,CAAA;IAAA,CAAA,CAAA;GAEJ,CAAA;AAEJ,CAAA;"}
|
|
@@ -12,7 +12,7 @@ require('./assets/attention.svg.js');
|
|
|
12
12
|
var InputCard_styles = require('./InputCard.styles.js');
|
|
13
13
|
require('./InputSections/index.js');
|
|
14
14
|
var CustomImage = require('../../../../CustomImage/CustomImage.js');
|
|
15
|
-
var attentionIcon = require("../../../../../assets/
|
|
15
|
+
var attentionIcon = require("../../../../../assets/attention2.svg");
|
|
16
16
|
var OptionSelectSection = require('./InputSections/OptionSelectSection.js');
|
|
17
17
|
var SliderSection = require('./InputSections/SliderSection.js');
|
|
18
18
|
var CounterSection = require('./InputSections/CounterSection.js');
|
|
@@ -10,7 +10,7 @@ import './assets/attention.svg.mjs';
|
|
|
10
10
|
import { Card, Header, HeaderHeadingSection, HeadingIcon, HeadingTitle, HeaderActionSection, SubduedInfo, OverlayFilter, NotAvailableNoteWrap, NotAvailableNoteIcon, InputBody, InputSectionSpacing, Footer, FooterContent, FooterNote } from './InputCard.styles.mjs';
|
|
11
11
|
import './InputSections/index.mjs';
|
|
12
12
|
import { CustomImage } from '../../../../CustomImage/CustomImage.mjs';
|
|
13
|
-
import attentionIcon__default from "../../../../../assets/
|
|
13
|
+
import attentionIcon__default from "../../../../../assets/attention2.svg";
|
|
14
14
|
import { OptionSelectSection } from './InputSections/OptionSelectSection.mjs';
|
|
15
15
|
import { SliderSection } from './InputSections/SliderSection.mjs';
|
|
16
16
|
import { CounterSection } from './InputSections/CounterSection.mjs';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention2.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention2.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention2.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -6,7 +6,7 @@ var asset = require('../../../../../utils/asset.js');
|
|
|
6
6
|
require('./assets/attention.svg.js');
|
|
7
7
|
var Part = require('./Part.js');
|
|
8
8
|
var ProgressBarChart_styles = require('./ProgressBarChart.styles.js');
|
|
9
|
-
var attentionIcon = require("../../../../../assets/
|
|
9
|
+
var attentionIcon = require("../../../../../assets/attention.svg");
|
|
10
10
|
function _interopDefault(e) {
|
|
11
11
|
return e && e.__esModule ? e : {
|
|
12
12
|
default: e
|
|
@@ -4,7 +4,7 @@ import { imageSrc } from '../../../../../utils/asset.mjs';
|
|
|
4
4
|
import './assets/attention.svg.mjs';
|
|
5
5
|
import { PART_GAP_PX, PART_WIDTH_PX, Part } from './Part.mjs';
|
|
6
6
|
import { ProgressBarChartContainer, ProgressBarChartHeader, ProgressBarChartTitle, ProgressBarWrapper, ProgressBarPartsContainer, ProgressBarAttentionLabel, ProgressBarAttentionLabelIcon } from './ProgressBarChart.styles.mjs';
|
|
7
|
-
import attentionIcon__default from "../../../../../assets/
|
|
7
|
+
import attentionIcon__default from "../../../../../assets/attention.svg";
|
|
8
8
|
"use strict";
|
|
9
9
|
const ProgressBarChart = ({
|
|
10
10
|
title,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -14,7 +14,7 @@ require('./assets/volume-on.svg.js');
|
|
|
14
14
|
var VideoPlayer_styles = require('./VideoPlayer.styles.js');
|
|
15
15
|
var CloseIcon = require("../../assets/close2.svg");
|
|
16
16
|
var BackIcon = require("../../assets/back.svg");
|
|
17
|
-
var PauseIcon = require("../../assets/
|
|
17
|
+
var PauseIcon = require("../../assets/pause.svg");
|
|
18
18
|
var PlayIcon = require("../../assets/play.svg");
|
|
19
19
|
var VolumeOffIcon = require("../../assets/volume-off.svg");
|
|
20
20
|
var VolumeOnIcon = require("../../assets/volume-on.svg");
|
|
@@ -12,7 +12,7 @@ import './assets/volume-on.svg.mjs';
|
|
|
12
12
|
import { Wrap, IconWrap, Icon, Video, ControlWrap, TimelineWrap, Timeline, Controls, LeftSide, IconButton, VolumeWrap, VolumeSliderWrap, VolumeSlider, Time, Center, RightSide } from './VideoPlayer.styles.mjs';
|
|
13
13
|
import CloseIcon__default from "../../assets/close2.svg";
|
|
14
14
|
import BackIcon__default from "../../assets/back.svg";
|
|
15
|
-
import PauseIcon__default from "../../assets/
|
|
15
|
+
import PauseIcon__default from "../../assets/pause.svg";
|
|
16
16
|
import PlayIcon__default from "../../assets/play.svg";
|
|
17
17
|
import VolumeOffIcon__default from "../../assets/volume-off.svg";
|
|
18
18
|
import VolumeOnIcon__default from "../../assets/volume-on.svg";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/pause.svg";
|
|
2
|
+
export { default } from "../../../assets/pause.svg";
|
|
3
3
|
//# sourceMappingURL=pause.svg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/ai-
|
|
2
|
-
export { default } from "../../../../assets/ai-
|
|
1
|
+
export * from "../../../../assets/ai-dslr2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/ai-dslr2.jpg";
|
|
3
3
|
//# sourceMappingURL=ai-dslr.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/ai-
|
|
2
|
-
export { default } from "../../../../assets/ai-
|
|
1
|
+
export * from "../../../../assets/ai-lpr2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/ai-lpr2.jpg";
|
|
3
3
|
//# sourceMappingURL=ai-lpr.jpg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var BulletIcon = require("../../../../assets/
|
|
6
|
+
var BulletIcon = require("../../../../assets/bullet2.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/
|
|
2
|
-
export { default } from "../../../../assets/
|
|
1
|
+
export * from "../../../../assets/bullet2.svg";
|
|
2
|
+
export { default } from "../../../../assets/bullet2.svg";
|
|
3
3
|
//# sourceMappingURL=bullet.svg.mjs.map
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_msA$CRRe = require("../../../../../assets/express2.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_msA$CRRe__default = /*#__PURE__*/_interopDefault(_externalAssets_msA$CRRe);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_msA$CRRe__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_msA$CRRe).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_msA$CRRe[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../assets/
|
|
1
|
+
export * from "../../../../../assets/express2.jpg";
|
|
2
|
+
export { default } from "../../../../../assets/express2.jpg";
|
|
3
3
|
//# sourceMappingURL=express.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/
|
|
2
|
-
export { default } from "../../../../assets/
|
|
1
|
+
export * from "../../../../assets/express.jpg";
|
|
2
|
+
export { default } from "../../../../assets/express.jpg";
|
|
3
3
|
//# sourceMappingURL=express.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/ai-
|
|
2
|
-
export { default } from "../../../../assets/ai-
|
|
1
|
+
export * from "../../../../assets/ai-dome.jpg";
|
|
2
|
+
export { default } from "../../../../assets/ai-dome.jpg";
|
|
3
3
|
//# sourceMappingURL=ai-dome.jpg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var v3Image = require("../../../../assets/g5-dome-
|
|
6
|
+
var v3Image = require("../../../../assets/g5-dome-ultra.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/g5-dome-
|
|
2
|
-
export { default } from "../../../../assets/g5-dome-
|
|
1
|
+
export * from "../../../../assets/g5-dome-ultra.jpg";
|
|
2
|
+
export { default } from "../../../../assets/g5-dome-ultra.jpg";
|
|
3
3
|
//# sourceMappingURL=g5-dome-ultra.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/g5-
|
|
2
|
-
export { default } from "../../../../assets/g5-
|
|
1
|
+
export * from "../../../../assets/g5-dome2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/g5-dome2.jpg";
|
|
3
3
|
//# sourceMappingURL=g5-dome.jpg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var v3Image = require("../../../../assets/g2-reader-
|
|
6
|
+
var v3Image = require("../../../../assets/g2-reader-pro.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/g2-reader-
|
|
2
|
-
export { default } from "../../../../assets/g2-reader-
|
|
1
|
+
export * from "../../../../assets/g2-reader-pro.jpg";
|
|
2
|
+
export { default } from "../../../../assets/g2-reader-pro.jpg";
|
|
3
3
|
//# sourceMappingURL=g2-reader-pro.jpg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var v3Image = require("../../../../assets/g3-
|
|
6
|
+
var v3Image = require("../../../../assets/g3-reader2.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/g3-
|
|
2
|
-
export { default } from "../../../../assets/g3-
|
|
1
|
+
export * from "../../../../assets/g3-reader2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/g3-reader2.jpg";
|
|
3
3
|
//# sourceMappingURL=g3-reader.jpg.mjs.map
|