{"version":3,"sources":["webpack:///./React/components/PVWebstore/PVProductCategory/Shared/PVListingToolbar.js","webpack:///./React/components/PVWebstore/PVProductCategory/PVProductList/index.js","webpack:///./React/redux/menus/functions.js"],"names":["PVListingToolbar","props","titleProduct","sortOptions","pagingOptions","layoutOptions","className","use","onChange","e","changeFunc","target","value","opts","map","option","key","id","display","htmlFor","fieldName","name","defaultValue","selectedVal","find","x","type","title","onClick","propTypes","PropTypes","string","shape","arrayOf","number","func","bool","label","diplay","oneOf","defaultProps","getPosition","pageSize","displayPage","PVListingProduct","loadable","fallback","PVProductList","match","products","apiGetCategory","category","categoryIsReady","getLeftMenu","isCategoryDataInvalid","dealerKey","history","useHistory","isMounted","useRef","useState","leftMenu","setLeftMenu","setDisplayPage","numProducts","setNumProducts","activeProducts","setActiveProducts","displaySliceId","setDisplaySliceId","showPage","setShowPage","showLoading","setShowLoading","params","TotalProducts","ParentName","Name","WebDescription","useEffect","current","getDisplaySlice","n","page","section","position","take","length","slice","breadcrumbs","sortOrder","linkTarget","linkText","categoryName","replace","items","subcategory","notBlanks","filter","ItemID","Fragment","heading","menu","categorypath","newNumber","Number","sectionLength","getDisplayLength","product","currentPage","totalRecords","handleClick","p","window","scrollTo","Math","max","setCurrentPage","object","ReactRouterPropTypes","isRequired","mapStateToProps","state","ownProps","selectorOptions","parent","selectors","selectSubcategory","selectSubcategoryReady","selectSubcategoryProducts","selectCategorySliceInvalid","selectActiveDealerKey","mapDispatchToProps","dispatch","parentCategory","api","getProductsForCategory","getShopMenu","connect","_dispatch","getState"],"mappings":"sXAGMA,EAAmB,SAACC,GAAU,IACxBC,EAA4DD,EAA5DC,aAAcC,EAA8CF,EAA9CE,YAAaC,EAAiCH,EAAjCG,cAAeC,EAAkBJ,EAAlBI,cAClD,OACI,yBAAKC,UAAU,oBACX,wBAAIA,UAAU,iBAAiBJ,GAC/B,yBAAKI,UAAU,kBACVH,GAAeA,EAAYI,IACxB,yBAAKD,UAAU,gBACX,4BACIA,UAAU,4CAC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U,GACVE,SAAU,GACVC,iBAAiB,GAGrB,I,IAAMqE,EAAkB,SAACC,EAAOC,GAC5B,IAAMjD,EAASiD,EAAS3E,MAAM0B,QAAU,GAClCkD,EAAkB,CAAEC,OAAQnD,EAAOmB,aAAcG,YAAatB,EAAOsB,aAC3E,MAAO,CACH7C,SAAU2E,IAAUC,kBAAkBL,EAAOE,GAC7CxE,gBAAiB0E,IAAUE,uBAAuBN,EAAOE,GACzD3E,SAAU6E,IAAUG,0BAA0BP,EAAOE,GACrDtE,sBAAuBwE,IAAUI,2BAA2BR,GAC5DnE,UAAW4E,gCAAsBT,KAGnCU,EAAqB,SAACC,GACxB,MAAO,CAEHnF,eAAgB,SAACoF,EAAgBtC,EAAahC,EAAamB,GAEvDkD,EAASE,IAAIC,uBAAuBF,EAAgBtC,EAAa,IAAK,KAE1E3C,YAAa,SAACwC,GAAD,OAAkBwC,EAASI,YAAY5C,O,EAI7C6C,YAAQjB,EAAiBW,EAAzBM,CAA6C3F,GAA7C,a,6FArPTN,E,sIACe,G,uIACfG,E,2IAGAG,E,wIA0NA0E,E,0IAWAW,E,inBCtPAK,EAAc,SAAC5C,GACjB,OAAO,SAAC8C,EAAWC,GAEf,OADcd,IAAiCc,IAAY/C,K,EAKpD4C,EAAA,O,6FAPTA,E","file":"bundle.39.2694f20f.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst PVListingToolbar = (props) => {\n const { titleProduct, sortOptions, pagingOptions, layoutOptions } = props;\n return (\n
\n

{titleProduct}

\n
\n {sortOptions && sortOptions.use ? (\n
\n sortOptions.changeFunc(e.target.value)}\n >\n {sortOptions && sortOptions.use\n ? sortOptions.opts.map((option) => {\n return (\n \n );\n })\n : ''}\n \n
\n ) : (\n ''\n )}\n {pagingOptions && pagingOptions.use ? (\n
\n \n
\n ) : (\n ''\n )}\n {layoutOptions && layoutOptions.use ? (\n
\n layoutOptions.changeFunc('grid')}\n >\n \n Grid\n \n layoutOptions.changeFunc('list')}\n >\n \n List\n \n
\n ) : (\n ''\n )}\n
\n
\n );\n};\n\nPVListingToolbar.propTypes = {\n titleProduct: PropTypes.string,\n sortOptions: PropTypes.shape({\n opts: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n display: PropTypes.string,\n value: PropTypes.string,\n })\n ),\n selectedVal: PropTypes.string,\n changeFunc: PropTypes.func,\n use: PropTypes.bool,\n label: PropTypes.string,\n }),\n pagingOptions: PropTypes.shape({\n opts: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number,\n diplay: PropTypes.string,\n value: PropTypes.number,\n })\n ),\n selectedVal: PropTypes.number,\n changeFunc: PropTypes.func,\n use: PropTypes.bool,\n label: PropTypes.string,\n fieldName: PropTypes.string,\n }),\n layoutOptions: PropTypes.shape({\n selectedVal: PropTypes.oneOf(['grid', 'list']),\n changeFunc: PropTypes.func,\n use: PropTypes.bool,\n }),\n};\nPVListingToolbar.defaultProps = {\n titleProduct: '',\n sortOptions: {},\n pagingOptions: {\n opts: [\n { id: 0, value: 5, display: '5' },\n { id: 1, value: 10, display: '10' },\n { id: 2, value: 20, display: '20' },\n { id: 3, value: 50, display: '50' },\n { id: 4, value: 100, display: '100' },\n { id: 5, value: 0, display: 'All' },\n ],\n selectedVal: 10,\n changeFunc: () => {},\n use: true,\n fieldName: 'productPaging',\n },\n layoutOptions: {},\n};\n\nexport default PVListingToolbar;\n","import React, { useEffect, useState, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { useHistory } from 'react-router-dom';\nimport ReactRouterPropTypes from 'react-router-prop-types';\nimport { connect } from 'react-redux';\nimport loadable from '@loadable/component';\nimport { api, selectors } from '../../../../redux/products/category';\nimport PVShopWrapper from '../../PVShopWrapper';\nimport getShopMenu from '../../../../redux/menus/functions';\nimport PVPaging from '../../../Shared/PVPaging';\nimport PVListingToolbar from '../Shared/PVListingToolbar';\nimport '../Shared/style.css';\nimport { selectActiveDealerKey } from '../../../../redux/userProfile/selectors';\n\nconst getPosition = (pageSize, displayPage) => pageSize * (displayPage - 1);\nconst categoryPath = '';\nconst PVListingProduct = loadable(() => import('../Shared/PVListingProduct'), {\n fallback:
,\n});\nconst PVProductList = (props) => {\n const {\n match,\n products,\n apiGetCategory,\n category,\n categoryIsReady,\n getLeftMenu,\n isCategoryDataInvalid,\n dealerKey,\n } = props;\n const history = useHistory();\n const isMounted = useRef(null);\n\n const [leftMenu, setLeftMenu] = useState([]);\n const [displayPage, setDisplayPage] = useState(1);\n const [numProducts, setNumProducts] = useState(10);\n const [activeProducts, setActiveProducts] = useState([]);\n const [displaySliceId, setDisplaySliceId] = useState(0);\n const [showPage, setShowPage] = useState(false);\n const [showLoading, setShowLoading] = useState(true);\n\n const params = match.params || {};\n const { TotalProducts, Name, ParentName, WebDescription } = category;\n\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n const getDisplaySlice = (n, page) => {\n let section = [...products];\n const position = getPosition(n, page);\n let take = n;\n if (page > 1 && page * n >= TotalProducts) {\n take = products.length - position;\n }\n section = section.slice(position, take + position);\n return section;\n };\n\n const getDisplayLength = (n, page) => {\n const len = (products.length % n) * page === 0 ? n : (products.length % n) * page;\n return len;\n };\n\n const breadcrumbs = [\n {\n sortOrder: 18,\n linkTarget: '/',\n linkText: 'Home',\n },\n {\n sortOrder: 19,\n linkTarget: `/Shop/Category/${category.categoryName}`,\n linkText: category.ParentName,\n },\n {\n sortOrder: 20,\n linkTarget: '#',\n linkText: category.Name,\n },\n ];\n\n useEffect(() => {\n /* Effect to show proper page status */\n if (categoryIsReady && category.Name && isMounted.current) {\n setShowLoading(false);\n setShowPage(true);\n }\n if (categoryIsReady && !category.Name) {\n history.replace('/Error/404');\n }\n if (!categoryIsReady && isMounted.current) {\n setShowLoading(true);\n setShowPage(false);\n }\n }, [categoryIsReady]);\n\n useEffect(() => {\n if (ParentName && isMounted.current) {\n /*Effect to get menus in redux once we know the display name*/\n const items = getLeftMenu(ParentName);\n setLeftMenu(items);\n }\n }, [ParentName]);\n\n useEffect(() => {\n /*Effect to retrieve products on display page on first visits)*/\n /*And to reset vars when changing routes*/\n //if (\n // !products ||\n // ((products.length === 0 || products.length < TotalProducts) && displayPage === 1)\n //) {\n if (isMounted.current) {\n setActiveProducts([]);\n setDisplaySliceId(1);\n setDisplayPage(1);\n apiGetCategory(match.params.categoryName, match.params.subcategory, numProducts, 0);\n }\n //}\n }, [match, dealerKey]);\n\n useEffect(() => {\n /*Effect to retrieve products on page change*/\n const productsLen = products.length || 0;\n if ((productsLen < TotalProducts && displayPage !== 1) || isCategoryDataInvalid) {\n if (isCategoryDataInvalid && displayPage !== 1) {\n apiGetCategory(params.categoryName, params.subcategory, numProducts, 0);\n }\n apiGetCategory(params.categoryName, params.subcategory, numProducts, displayPage - 1);\n }\n }, [displayPage]);\n\n useEffect(() => {\n const section = getDisplaySlice(numProducts, displayPage);\n const notBlanks = section.filter((x) => ((x || {}).ItemID || '').length > 0);\n if (notBlanks.length > 0 && isMounted.current) {\n setActiveProducts(notBlanks || []);\n setDisplaySliceId(displayPage);\n }\n }, [TotalProducts, displayPage, displaySliceId, products, match]);\n\n const setCurrentPage = (p) => {\n window.scrollTo(0, 0);\n if (isMounted.current) {\n setDisplayPage(Math.max(p, 0));\n }\n };\n\n const changePaging = (n) => {\n if (n !== numProducts && isMounted.current) {\n const newNumber = n === '0' ? TotalProducts - 1 : Number(n);\n setNumProducts(newNumber);\n setDisplayPage(1);\n const section = getDisplaySlice(newNumber, displayPage);\n const sectionLength = getDisplayLength(newNumber, displayPage);\n const notBlanks = section.filter((x) => ((x || {}).ItemID || '').length > 0);\n if (notBlanks.length !== sectionLength) {\n apiGetCategory(params.categoryName, params.subcategory, Number(n), displayPage - 1);\n } else if (isMounted.current) {\n setActiveProducts(notBlanks || []);\n setDisplaySliceId(displayPage);\n }\n }\n };\n\n return (\n \n {showPage && (\n \n

\n {WebDescription}\n

\n \n\n
\n {isCategoryDataInvalid\n ? 'reloading to get dealer-specific data ...'\n : activeProducts.map((product) => {\n return (\n \n );\n })}\n setCurrentPage(p)}\n />\n
\n \n )}\n {showLoading &&
}\n \n );\n};\n\nPVProductList.propTypes = {\n /* eslint-disable react/forbid-prop-types */\n products: PropTypes.arrayOf(PropTypes.object),\n category: PropTypes.object,\n /* eslint-enable react/forbid-prop-types */\n categoryIsReady: PropTypes.bool,\n match: ReactRouterPropTypes.match.isRequired,\n isCategoryDataInvalid: PropTypes.bool.isRequired,\n dealerKey: PropTypes.string.isRequired,\n getLeftMenu: PropTypes.func.isRequired,\n apiGetCategory: PropTypes.func.isRequired,\n};\n\nPVProductList.defaultProps = {\n products: [],\n category: {},\n categoryIsReady: false,\n};\n\nconst mapStateToProps = (state, ownProps) => {\n const params = ownProps.match.params || {};\n const selectorOptions = { parent: params.categoryName, subcategory: params.subcategory };\n return {\n category: selectors.selectSubcategory(state, selectorOptions),\n categoryIsReady: selectors.selectSubcategoryReady(state, selectorOptions),\n products: selectors.selectSubcategoryProducts(state, selectorOptions),\n isCategoryDataInvalid: selectors.selectCategorySliceInvalid(state),\n dealerKey: selectActiveDealerKey(state),\n };\n};\nconst mapDispatchToProps = (dispatch) => {\n return {\n /* eslint-disable no-unused-vars */\n apiGetCategory: (parentCategory, subcategory, numProducts, page) => {\n /* eslint-enable no-unused-vars */\n dispatch(api.getProductsForCategory(parentCategory, subcategory, 600, 0));\n },\n getLeftMenu: (categoryName) => dispatch(getShopMenu(categoryName)),\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PVProductList);\n","import * as selectors from './selectors';\n\nconst getShopMenu = (categoryName) => {\n return (_dispatch, getState) => {\n const items = selectors.selectShopCategoryMenu(getState(), categoryName);\n return items;\n };\n};\n\nexport default getShopMenu;\n"],"sourceRoot":""}