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AAM6K,YAEf,IAIJ,CAAuBf,E","sources":["webpack://@govx/govx-shop/./src/AdButler/components/AdButlerCollectionZone.jsx","webpack://@govx/govx-shop/./src/components/GridBrowsers/SellersBrowser/hooks/useCollectionSellerBrowser.js","webpack://@govx/govx-shop/./src/components/GridBrowsers/SellersBrowser/hooks/useSellerBrowserBase.js","webpack://@govx/govx-shop/./src/desktop/components/CollectionPage/CollectionHeader/index.js","webpack://@govx/govx-shop/./src/desktop/components/CollectionPage/CollectionAdButlerSection/index.js","webpack://@govx/govx-shop/./src/desktop/components/CollectionPage/index.js"],"sourcesContent":["import React from 'react'\nimport useAdButlerPlacement from '../hooks/useAdButlerPlacement'\nimport { createUseStyles } from 'react-jss'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport { compose } from 'recompose'\nimport {\n selectUser,\n} from '../../redux/selectors'\n\nconst useStyles = createUseStyles({\n placementContainer: {\n '& img': {\n maxWidth: '100%',\n maxHeight: '100%',\n marginTop: (props) => (props.isMobile ? '10px' : '0'),\n marginBottom: (props) => (props.isMobile ? '0' : '10px'),\n },\n },\n})\n\nconst adButlerKeywordPath = (collection) => {\n let path = ''\n if (collection && collection.path) {\n path = collection.path.replace(/(^Shop\\/)|([^a-zA-Z0-9\\/\\s])/g, '').replace(/\\s+/g, '_')\n }\n window.abkw = path\n}\n\nconst AdButlerCollectionPage = ({\n zoneId,\n width,\n height,\n fixedSize = false,\n isMobile = false,\n collection,\n user,\n}) => {\n adButlerKeywordPath(collection)\n\n const classes = useStyles({ isMobile })\n\n const placementId = useAdButlerPlacement(\n zoneId,\n width,\n height,\n fixedSize,\n user,\n )\n\n return (\n <>\n {placementId && (\n <div className={classes.placementContainer}>\n <div id={placementId} key={collection.id}></div>\n </div>\n )}\n </>\n )\n}\n\nAdButlerCollectionPage.propTypes = {\n collection: PropTypes.object.isRequired,\n user: PropTypes.object,\n}\n\nconst mapStateToProps = (state, ownProps) => ({\n user: selectUser(state),\n})\n\nconst enhance = compose(connect(mapStateToProps))\nexport default enhance(AdButlerCollectionPage)\n","import { useEffect } from 'react'\nimport { useSellerBrowserBase } from './useSellerBrowserBase'\nimport {\n sellerBrowserSelectSeller,\n sellerBrowserViewedSellers,\n} from '../../../../redux/modules/sellerBrowser'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { selectCollectionAncestors } from '../../../../redux/selectors'\nimport { queryTypes } from '../../../../common/queryTypes'\n\nexport default function useCollectionSellerBrowser(collection, config = {}) {\n const {\n settings,\n initialSearch,\n onGetNextResultSet,\n onFilterChange,\n onChangeSort,\n onFilterClick,\n getGridBrowserQueryStringParams,\n user,\n state,\n appliedFilterCount,\n } = useSellerBrowserBase({\n searchType: queryTypes.COLLECTION,\n searchValue: collection?.id,\n queryStringFilter: ({ collections, ...query }) => ({ query }),\n ...config,\n })\n\n const dispatch = useDispatch()\n\n useEffect(() => {\n // dont do initial fetch if sellers are already in store\n if (\n state?.query?.queryType === queryTypes.COLLECTION &&\n String(collection?.id) === String(state.query.collectionId)\n )\n return\n initialSearch()\n }, [collection?.id])\n\n const ancestors = useSelector(selectCollectionAncestors(collection))\n\n const onRowViewed = (rowIndex, rowData) => {\n dispatch(\n sellerBrowserViewedSellers(\n rowData,\n 'Collection',\n collection.id,\n collection.name,\n ancestors.map((x) => x.name).join('/'),\n ),\n )\n }\n\n const onSelectItem = (seller) => {\n dispatch(\n sellerBrowserSelectSeller(\n seller,\n 'Collection',\n collection.id,\n collection.name,\n ancestors.map((x) => x.name).join('/'),\n ),\n )\n }\n\n const { sortField, sortDirection, ...queryParams } =\n getGridBrowserQueryStringParams()\n settings.showFilters =\n settings.showFilters === false\n ? false\n : state.total > 0 ||\n collection?.children.length > 0 ||\n Object.keys(queryParams).length > 0\n settings.showHeader =\n settings.layout === 'compact' ? settings.showFilters : true\n\n return {\n status: state.status,\n items: state.allResults || [],\n filterGroups: state.filterGroups,\n sellerTypes: state.sellerTypes,\n query: state.query,\n filters: state.filtersGroups,\n totalResultsCount: state.total,\n loadedResultsCount: state.totalReturned,\n onGetNextResultSet,\n onChangeSort,\n onFilterChange,\n settings,\n linkedCollections: collection?.children || [],\n user,\n onSelectItem,\n onRowViewed,\n onFilterClick,\n appliedFilterCount,\n }\n}\n","import { useSelector } from 'react-redux'\nimport { useGridBrowserBase } from '../../useGridBrowserBase'\nimport {\n sellerBrowserSearch,\n clickSellerBrowserSort,\n clickSellerBrowserFilter,\n} from '../../../../redux/actions'\nimport { selectSellerBrowserSearch } from '../../../../redux/selectors'\nimport { sellerSortField } from '../../../../common/sellerSort/sellerSortField'\nimport { sellerSortDirection } from '../../../../common/sellerSort/sellerSortDirection'\nimport { resultType } from '../../resultType'\n\nexport function useSellerBrowserBase(config) {\n const initialState = useSelector(selectSellerBrowserSearch)\n\n const defaultConfig = {\n defaultSortField: sellerSortField.NAME,\n defaultSortDirection: sellerSortDirection.ASCENDING,\n filters: {\n showSelected: false,\n filterGroups: false,\n },\n showFilters: false,\n }\n\n const mergedConfig = { ...defaultConfig, ...config }\n\n const {\n callSearch,\n initialSearch,\n onGetNextResultSet,\n onFilterChange,\n onChangeSort,\n onSelectItem,\n onRowViewed,\n onFilterClick,\n getGridBrowserQueryStringParams,\n saveSearchToQueryString,\n getSearchTypeParams,\n settings,\n user,\n state,\n appliedFilterCount,\n } = useGridBrowserBase({\n resultType: resultType.SELLER,\n state: initialState,\n dispatchSearch: sellerBrowserSearch,\n clickBrowserSort: clickSellerBrowserSort,\n clickBrowserFilter: clickSellerBrowserFilter,\n ...mergedConfig,\n })\n\n const mergedSettings = { ...settings, ...mergedConfig }\n\n return {\n callSearch,\n initialSearch,\n onGetNextResultSet,\n onFilterChange,\n onChangeSort,\n onSelectItem,\n onRowViewed,\n onFilterClick,\n getGridBrowserQueryStringParams,\n saveSearchToQueryString,\n getSearchTypeParams,\n settings: mergedSettings,\n user,\n state,\n appliedFilterCount,\n }\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport { compose, lifecycle, mapProps } from 'recompose'\nimport Typography from '@material-ui/core/Typography'\n\nimport RouteConstants from '../../../../setup/routeConstants'\nimport { selectCollectionAncestors } from '../../../../redux/selectors'\nimport RouteLink from '../../common/links/RouteLink'\nimport { withStyles } from '@material-ui/core/styles'\nimport CollectionLink from '../../common/links/CollectionLink'\n\nconst styles = {\n title: {\n fontSize: '28px',\n fontFamily: 'geomanist-bold',\n },\n\n breadCrumbArrow: {\n '&[data-index=\"0\"]': {\n display: 'none',\n },\n },\n}\n\nexport const CollectionHeader = ({ ancestors, collection, classes }) => (\n <div style={{ maxWidth: '1200px', margin: '0px auto 1.8em' }}>\n <div style={{ minHeight: '21px' }}>\n {ancestors.slice(0, -1).map((ancestor, index) => (\n <Typography\n key={ancestor.id}\n variant='caption'\n style={{ display: 'inline' }}\n >\n <span className={classes.breadCrumbArrow} data-index={index}>\n > \n </span>\n <CollectionLink category={ancestor}>{ancestor.name}</CollectionLink>\n </Typography>\n ))}\n </div>\n <Typography\n variant='h1'\n component='h1'\n style={{\n fontSize: '36px',\n fontFamily: 'geomanist-medium, Helvetica, sans-serif',\n textTransform: 'capitalize',\n }}\n >\n {collection.name}\n </Typography>\n </div>\n)\n\nCollectionHeader.propTypes = {\n collection: PropTypes.object.isRequired,\n ancestors: PropTypes.arrayOf(PropTypes.object).isRequired,\n}\n\nconst mapStateToProps = (state, ownProps) => ({\n ancestors: selectCollectionAncestors(ownProps.collection)(state),\n})\n\nconst enhance = compose(connect(mapStateToProps), withStyles(styles))\n\nexport default enhance(CollectionHeader)\n","import React from 'react'\nimport Grid from '@material-ui/core/Grid'\nimport { AdButlerZoneIds } from '../../../../AdButler/AdButlerZoneIds'\nimport AdButlerCollectionZone from '../../../../AdButler/components/AdButlerCollectionZone'\nimport { createUseStyles } from 'react-jss'\n\nconst useStyles = createUseStyles({\n zonesContainer: {\n maxWidth: '1200px',\n margin: '0 auto',\n columnGap: '16px',\n flexWrap: 'nowrap!important',\n },\n})\n\nexport const CollectionAdButlerSection = ({collection}) => {\n const classes = useStyles()\n\n return (\n <Grid container className={classes.zonesContainer}>\n <Grid item xs={4} className={classes.zonePlacement}>\n <AdButlerCollectionZone\n zoneId={AdButlerZoneIds.collectionPage.slot1}\n width={384}\n height={236}\n collection={collection}\n />\n </Grid>\n <Grid item xs={4} className={classes.zonePlacement}>\n <AdButlerCollectionZone\n zoneId={AdButlerZoneIds.collectionPage.slot2}\n width={384}\n height={236}\n collection={collection}\n />\n </Grid>\n <Grid item xs={4} className={classes.zonePlacement}>\n <AdButlerCollectionZone\n zoneId={AdButlerZoneIds.collectionPage.slot3}\n width={384}\n height={236}\n collection={collection}\n />\n </Grid>\n </Grid>\n )\n}\n\nexport default CollectionAdButlerSection\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport { compose, lifecycle } from 'recompose'\nimport { withRouter } from 'react-router'\nimport Grid from '@material-ui/core/Grid'\nimport {\n selectCollectionDetails,\n selectProductV3Search,\n} from '../../../redux/selectors'\nimport { pageViewed } from '../../../redux/actions'\nimport GridsBrowser from '../../../components/GridBrowsers/GridsBrowser'\nimport useCollectionProductBrowser from '../../../components/GridBrowsers/ProductsBrowser/hooks/useCollectionProductBrowser'\nimport useCollectionSellerBrowser from '../../../components/GridBrowsers/SellersBrowser/hooks/useCollectionSellerBrowser'\nimport CollectionHeader from './CollectionHeader'\nimport CollectionAdButlerSection from './CollectionAdButlerSection'\nimport PageType from '../../../components/common/PageType'\nexport const CollectionPage = ({\n collection,\n location,\n template,\n collectionPath,\n}) => {\n const searchResults =\n collection.type === 2\n ? useCollectionSellerBrowser(collection)\n : useCollectionProductBrowser(collection)\n\n return (\n <div style={{ marginTop: '20px' }}>\n {template.showBreadcrumb && <CollectionHeader collection={collection} />}\n\n <CollectionAdButlerSection collection={collection} />\n\n {template.showGrid && (\n <GridsBrowser\n key={searchResults.items[0]?.connectionKey}\n {...searchResults}\n />\n )}\n <Grid container style={{ maxWidth: '1200px', margin: '0 auto' }}>\n <Grid item xs={2}></Grid>\n </Grid>\n </div>\n )\n}\n\nCollectionPage.propTypes = {}\n\nconst mapStateToProps = (state, ownProps) => {\n let details = selectCollectionDetails(state)\n let search = selectProductV3Search(state)\n\n let { collection } = details\n return {\n collection,\n search,\n template: {\n showBreadcrumb: true,\n showGrid: true,\n },\n }\n}\n\nconst mapDispatchToProps = (dispatch, props) => ({\n pageViewed: () =>\n dispatch(\n pageViewed(\n PageType.Collection,\n props.collection.id,\n props.collection.name,\n props.collectionPath,\n ),\n ),\n})\n\nconst enhance = compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps),\n connect(null, mapDispatchToProps),\n lifecycle({\n componentDidUpdate(prevProps) {\n if (prevProps.collection.id !== this.props.collection.id) {\n this.props.pageViewed()\n }\n },\n }),\n)\n\nexport default enhance(CollectionPage)\n"],"names":["useStyles","createUseStyles","placementContainer","maxWidth","maxHeight","marginTop","props","isMobile","marginBottom","AdButlerCollectionPage","_ref","zoneId","width","height","_ref$fixedSize","fixedSize","_ref$isMobile","collection","user","path","replace","window","abkw","adButlerKeywordPath","classes","placementId","useAdButlerPlacement","React","className","id","key","propTypes","PropTypes","isRequired","compose","connect","state","ownProps","selectUser","useCollectionSellerBrowser","config","arguments","length","undefined","_useSellerBrowserBase","initialState","useSelector","selectSellerBrowserSearch","mergedConfig","_objectSpread","defaultSortField","sellerSortField","NAME","defaultSortDirection","sellerSortDirection","ASCENDING","filters","showSelected","filterGroups","showFilters","_useGridBrowserBase","useGridBrowserBase","resultType","SELLER","dispatchSearch","sellerBrowserSearch","clickBrowserSort","clickSellerBrowserSort","clickBrowserFilter","clickSellerBrowserFilter","callSearch","initialSearch","onGetNextResultSet","onFilterChange","onChangeSort","onSelectItem","onRowViewed","onFilterClick","getGridBrowserQueryStringParams","saveSearchToQueryString","getSearchTypeParams","settings","appliedFilterCount","useSellerBrowserBase","searchType","queryTypes","COLLECTION","searchValue","queryStringFilter","collections","query","_objectWithoutProperties","_excluded","dispatch","useDispatch","useEffect","_state$query","queryType","String","collectionId","ancestors","selectCollectionAncestors","_getGridBrowserQueryS","queryParams","sortField","sortDirection","_excluded2","total","children","Object","keys","showHeader","layout","status","items","allResults","sellerTypes","filtersGroups","totalResultsCount","loadedResultsCount","totalReturned","linkedCollections","seller","sellerBrowserSelectSeller","name","map","x","join","rowIndex","rowData","sellerBrowserViewedSellers","CollectionHeader","style","margin","minHeight","slice","ancestor","index","Typography","variant","display","breadCrumbArrow","CollectionLink","category","component","fontSize","fontFamily","textTransform","withStyles","title","zonesContainer","columnGap","flexWrap","Grid","container","item","xs","zonePlacement","AdButlerCollectionZone","AdButlerZoneIds","collectionPage","slot1","slot2","slot3","CollectionPage","_searchResults$items$","template","location","searchResults","collectionPath","type","useCollectionProductBrowser","showBreadcrumb","CollectionAdButlerSection","showGrid","GridsBrowser","_extends","connectionKey","mapDispatchToProps","pageViewed","PageType","Collection","withRouter","details","selectCollectionDetails","search","selectProductV3Search","lifecycle","componentDidUpdate","prevProps","this"],"sourceRoot":""}