{"version":3,"sources":["webpack:///./src/Avensia.Common/Features/Shared/Page/index.tsx","webpack:///./src/Avensia.Common/Features/Search/SearchListItem.tsx","webpack:///./src/Avensia.Common/Features/Search/SearchList.tsx","webpack:///./src/Avensia.Common/Features/Search/TagButtons.tsx","webpack:///./src/Avensia.Common/Features/Search/SearchPage.tsx"],"names":["StrictPage","_a","breadcrumbs","restProps","tslib__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_1___default","a","createElement","Shared_PageLayout__WEBPACK_IMPORTED_MODULE_2__","Shared_Viewport__WEBPACK_IMPORTED_MODULE_4__","appearance","Normal","Gap","Shared_Breadcrumbs__WEBPACK_IMPORTED_MODULE_3__","PageExtensive","subnavigation","children","prioritizedSubContent","unprioritizedSubContent","passProps","asideNode","margin","Shared_Style__WEBPACK_IMPORTED_MODULE_5__","Small","layout","OneToFour","PageCompact","__webpack_exports__","props","isCompact","ucfirst","str","charAt","toUpperCase","slice","SearchItemHeader","react_mjs","span","marginBottom","SearchItemHeading","h2","display","marginRight","fontSize","fontWeight","color","SearchItemLink","Object","Link","TagsContainer","whiteSpace","SearchTag","react_default","Span","css","marginLeft","padding","x","lineHeight","height","Style","background","borderRadius","SearchBreadcrumb","url","to","position",":hover","SearchBreadcrumbArrowStart","Svg","width","viewBox","fill","top","bottom","right","style","fillOpacity","stroke","d","SearchBreadcrumbArrowEnd","left","SearchPreamble","p","maxHeight","wordBreak","Search_SearchListItem","tags","item","category","map","obj","index","categories","find","id","key","name","tagUrl","urlTags","fullUrl","split","part","replace","Fragment","title","displayText","SearchListUL","ul","paddingLeft","listStyle","SearchListItemS","li","tslib_es6","paddingRight","overflow","mjs","scope","Search_SearchList","list","searchItem","Tag","button","border","xy","TagText","TagWrapper","Search_TagButtons","tag","i","count","onClick","addFilter","selectedFilters","indexOf","SearchPage_SearchPage","_super","SearchPage","_this","call","this","setOurStates","result","setState","unfilteredSearchObjects","totalHits","currentSearchObjects","filterUnfilteredSearchObjects","filteredItems","state","length","filter","some","r","includes","addFilterToSelected","filters","splice","concat","toggleSerachFilters","isExpanded","toggleIsSelected","isSelected","ref","createRef","isLoading","prototype","componentDidMount","search","then","SearchResults","JSON","parse","render","searchedFor","searchParams","get","content","HitsFoundText","Spinner","BkgPattern","Page","MainWrapper","PageLayout","BackgroundImage","Center","HeadingText","headerText","Viewport","RectangleLess","innerRef","ShowHide","RectangleMore","Component","Medium","Large","div","backgroundImage","__webpack_require__","backgroundPosition","backgroundRepeat","zIndex","paddingTop","paddingBottom","backgroundColor","h1"],"mappings":"qJA6BaA,EAAwE,SAACC,GACpF,IAAAC,EAAAD,EAAAC,YACAC,EAAAC,EAAA,EAAAH,GAAA,gBACI,OACJI,EAAAC,EAAAC,cAACC,EAAA,EAAI,KACFN,GACCG,EAAAC,EAAAC,cAACE,EAAA,EAAY,KACXJ,EAAAC,EAAAC,cAACC,EAAA,GAAME,YAAaF,EAAA,EAAeG,OAAQH,EAAA,EAAeI,MACxDP,EAAAC,EAAAC,cAACM,EAAA,GAAYX,YAAaA,MAIhCG,EAAAC,EAAAC,cAACC,EAAA,EAAKJ,EAAA,KAAKD,MAUTW,EAAoD,SAACb,GACzD,IAAAc,EAAAd,EAAAc,cACAC,EAAAf,EAAAe,SACAC,EAAAhB,EAAAgB,sBACAC,EAAAjB,EAAAiB,wBACAC,EAAAf,EAAA,EAAAH,GAAA,+EAEMmB,GAAaH,GAAyBF,GAAiBG,IAC3Db,EAAAC,EAAAC,cAACC,EAAA,GAAea,OAAQC,EAAA,EAAaC,OACnClB,EAAAC,EAAAC,cAACC,EAAA,EAAK,KACHS,EACAF,GACCV,EAAAC,EAAAC,cAACC,EAAA,EAAI,MAKNU,IAKP,OAAOE,EACLf,EAAAC,EAAAC,cAACP,EAAUI,EAAA,GAACoB,OAAQhB,EAAA,EAAWiB,WAAeN,GAC5Cd,EAAAC,EAAAC,cAACC,EAAA,EAAK,KAAEQ,GACPI,GAGHf,EAAAC,EAAAC,cAACP,EAAUI,EAAA,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MAAO,OACPjD,QACEoD,IAAK,OACLQ,KAAM,OACNN,MAAO,QAETnB,SACEyB,KAAM,OACNN,MAAO,SAEN5B,OAAAqE,EAAA,EAAArE,CAAMa,EAAA,EAAsByD,EAAA,EAAW6E,SACxC7K,QACEoD,IAAK,QAEPjB,SACEyB,KAAM,MACNN,MAAO,SAGR5B,OAAAqE,EAAA,EAAArE,CAAMa,EAAA,EAAsByD,EAAA,EAAW8E,QACxC3I,SACEyB,KAAM,MACNN,MAAO,WAKPyG,EAAahJ,EAAA,EAAOgK,IAAInF,EAAA,KACzBlE,OAAAqE,EAAA,EAAArE,CAAMa,EAAA,EAAsByD,EAAA,EAAW9F,QACxC8K,gBACE,OACAC,EAAQ,KACR,UACAA,EAAQ,KACR,KACFC,mBAAoB,sBACpBC,iBAAkB,WAClBtI,SAAU,WACVO,IAAK,EACLC,OAAQ,EACRJ,MAAO,OACPmI,QAAS,MAIPT,EAAgB5J,EAAA,EAAOgK,KAC3BlI,SAAU,WACVwI,WAAY,OACZC,cAAe,OACfrK,aAAc,OACdgC,MAAO,OACPsI,gBAAiB,UACjBzF,SAAU,SACV/B,UAAW,UAGPyG,EAAgBzJ,EAAA,EAAOgK,KAC3BlI,SAAU,WACVwI,WAAY,OACZC,cAAe,OACfrK,aAAc,OACdgC,MAAO,OACPsI,gBAAiB,YAGblB,EAActJ,EAAA,EAAOyK,IACzBvK,aAAc,MACdoK,WAAY,KACZC,cAAe,KACfhK,SAAU,SAGNoJ,EAAW3J,EAAA,EAAO+C,GACtBjB,SAAU,WACVO,IAAK,OACLE,MAAO,SAGHuG,EAAgB9I,EAAA,EAAO+C,GAC3B0B,YAAa,OACb8F,cAAe,OACfrK,aAAc,EACdM,WAAY,IACZD,SAAU,SAGGhB,EAAA","file":"assets/search.chunk.00ebd5b3ded838c91881.js","sourcesContent":["import React from 'react';\r\nimport {\r\n Main,\r\n Part,\r\n Aside,\r\n Basic,\r\n MarginProvider,\r\n Layout as PageLayout,\r\n Appearance as PageAppearance,\r\n} from 'Shared/PageLayout';\r\nimport MainMenuItem from 'SiteLayout/MainMenu/MainMenuItem.type';\r\nimport BreadcrumbsViewModel from 'Shared/Breadcrumbs/BreadcrumbsViewModel.type';\r\nimport Breadcrumbs from 'Shared/Breadcrumbs';\r\nimport Viewport, { ForExtensive } from 'Shared/Viewport';\r\nimport { AppearanceType } from '../appearance';\r\nimport * as style from 'Shared/Style';\r\n\r\nexport { Appearance } from 'Shared/PageLayout';\r\n\r\ntype SharedPropType = {\r\n appearance?: AppearanceType;\r\n breadcrumbs?: BreadcrumbsViewModel[];\r\n};\r\n\r\ntype StrictPropType = {\r\n layout?: PageLayout;\r\n};\r\n\r\n// A `StrictPage` or `Page` component should be the root element to your page\r\nexport const StrictPage: React.StatelessComponent = ({\r\n breadcrumbs,\r\n ...restProps\r\n}) => (\r\n
\r\n {breadcrumbs && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n);\r\n\r\ntype PropType = SharedPropType & {\r\n subnavigation?: MainMenuItem[];\r\n prioritizedSubContent?: React.ReactNode;\r\n unprioritizedSubContent?: React.ReactNode;\r\n};\r\n\r\nconst PageExtensive: React.StatelessComponent = ({\r\n subnavigation,\r\n children,\r\n prioritizedSubContent,\r\n unprioritizedSubContent,\r\n ...passProps\r\n}) => {\r\n const asideNode = (prioritizedSubContent || subnavigation || unprioritizedSubContent) && (\r\n \r\n \r\n \r\n );\r\n\r\n return asideNode ? (\r\n \r\n {children}\r\n {asideNode}\r\n \r\n ) : (\r\n {children}\r\n );\r\n};\r\n\r\nconst PageCompact: React.StatelessComponent = ({\r\n appearance,\r\n subnavigation,\r\n breadcrumbs,\r\n children,\r\n prioritizedSubContent,\r\n unprioritizedSubContent,\r\n ...passProps\r\n}) => (\r\n \r\n {prioritizedSubContent}\r\n {children}\r\n {unprioritizedSubContent}\r\n \r\n);\r\n\r\nconst Page: React.StatelessComponent = props => (\r\n {(isCompact: boolean) => (isCompact ? : )}\r\n);\r\n\r\nexport default Page;\r\n","import React from 'react';\r\nimport SearchObject from './SearchObject.type';\r\nimport { styled } from '@glitz/react';\r\nimport Category from './Category.type';\r\nimport * as style from 'Shared/Style';\r\nimport Link from 'Shared/Link';\r\n\r\ninterface Props {\r\n item: SearchObject;\r\n categories: Category[];\r\n}\r\n\r\nconst SearchListItem: React.SFC = props => {\r\n const tags = props.item.category.map((obj, index) => {\r\n const category = props.categories.find(item => {\r\n return item.id === obj;\r\n });\r\n return category && {category.name};\r\n });\r\n const urlParts = props.item.fullUrl.split('/');\r\n let tagUrl = '/';\r\n const urlTags = urlParts.slice(1, -2).map((part, index) => {\r\n tagUrl += part + '/';\r\n part = part.replace('-', ' ');\r\n part = ucfirst(part);\r\n return (\r\n <>\r\n {part ? (\r\n \r\n {part}\r\n \r\n \r\n \r\n ) : null}\r\n \r\n );\r\n });\r\n\r\n return (\r\n <>\r\n \r\n \r\n {props.item.title}\r\n \r\n \r\n {urlTags} {tags}\r\n \r\n \r\n {props.item.displayText}\r\n \r\n );\r\n};\r\n\r\nconst ucfirst = (str: string) => {\r\n return str.charAt(0).toUpperCase() + str.slice(1);\r\n};\r\n\r\nconst SearchItemHeader = styled.span({\r\n marginBottom: '10px',\r\n});\r\n\r\nconst SearchItemHeading = styled.h2({\r\n display: 'inline-block',\r\n marginRight: '12px',\r\n marginBottom: '10px',\r\n fontSize: '18px',\r\n fontWeight: 500,\r\n color: '#522d7d',\r\n});\r\n\r\nconst SearchItemLink = styled(Link, {\r\n color: '#522d7d',\r\n});\r\n\r\nconst TagsContainer = styled.span({ whiteSpace: 'nowrap' });\r\n\r\ninterface SearchTagProps {\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst SearchTag: React.SFC = ({ children }) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\ninterface SearchBreadcrumbProps {\r\n url: string;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst SearchBreadcrumb: React.SFC = ({ url, children }) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\nconst SearchBreadcrumbArrowStart = () => (\r\n \r\n \r\n \r\n);\r\n\r\nconst SearchBreadcrumbArrowEnd = () => (\r\n \r\n \r\n \r\n);\r\n\r\nconst SearchPreamble = styled.p({\r\n marginBottom: 0,\r\n maxHeight: '52px',\r\n wordBreak: 'break-word',\r\n});\r\n\r\nexport default SearchListItem;\r\n","import React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport { media } from '@glitz/core';\r\nimport SearchObject from './SearchObject.type';\r\nimport SearchListItem from './SearchListItem';\r\nimport Category from './Category.type';\r\nimport { Breakpoint } from '@avensia/scope';\r\nimport * as style from 'Shared/Style';\r\n\r\ninterface Props {\r\n list: SearchObject[];\r\n categories: Category[];\r\n}\r\n\r\nconst SearchList: React.SFC = props => {\r\n const list = props.list.map((searchItem, index) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n });\r\n\r\n return {list};\r\n};\r\n\r\nconst SearchListUL = styled.ul({\r\n marginBottom: '0',\r\n paddingLeft: '0',\r\n listStyle: 'none',\r\n});\r\n\r\nconst SearchListItemS = styled.li({\r\n marginBottom: '36px',\r\n paddingLeft: '0',\r\n paddingRight: '0',\r\n overflow: 'hidden',\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n width: '70%',\r\n paddingLeft: '20px',\r\n paddingRight: '20px',\r\n }),\r\n});\r\n\r\nexport default SearchList;\r\n","import React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport Category from './Category.type';\r\nimport { media } from '@glitz/core';\r\nimport { Breakpoint } from '@avensia/scope';\r\nimport * as style from 'Shared/Style';\r\n\r\ninterface Props {\r\n categories: Category[];\r\n addFilter: Function;\r\n selectedFilters: string[];\r\n}\r\n\r\nconst TagButtons: React.SFC = props => {\r\n const tags = props.categories.map((tag, i) => {\r\n return (\r\n \r\n {tag.count ? (\r\n props.addFilter(tag.id)}\r\n style={\r\n props.selectedFilters.indexOf(tag.id) !== -1 ? { background: style.primaryDark, color: style.WHITE } : {}\r\n }\r\n >\r\n \r\n {tag.name} ({tag.count})\r\n \r\n \r\n ) : null}\r\n \r\n );\r\n });\r\n\r\n return <>{tags};\r\n};\r\n\r\nconst Tag = styled.button({\r\n display: 'block',\r\n height: '36px',\r\n width: 'auto',\r\n marginLeft: '18px',\r\n marginBottom: '18px',\r\n background: '#fdfdfd',\r\n fontSize: '16px',\r\n borderRadius: '3px',\r\n padding: {\r\n left: '10px',\r\n right: '10px',\r\n },\r\n border: {\r\n xy: {\r\n color: '#888',\r\n width: 1,\r\n style: 'solid',\r\n },\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n marginBottom: 0,\r\n display: 'inline-block',\r\n }),\r\n});\r\n\r\nconst TagText = styled.span({});\r\nconst TagWrapper = styled.span({});\r\n\r\nexport default TagButtons;\r\n","/**\r\n * @ComponentFor SearchPageResultViewModel\r\n */\r\nimport React from 'react';\r\nimport SearchPageResultViewModelType from './SearchPageResultViewModel.type';\r\nimport { epiPropertyValue, currentUrl, Breakpoint } from '@avensia/scope';\r\nimport Page from 'Shared/Page';\r\nimport { media } from '@glitz/core';\r\nimport * as style from 'Shared/Style';\r\nimport { styled } from '@glitz/react';\r\nimport { postJson } from '@avensia/scope';\r\nimport { Main, Appearance } from 'Shared/PageLayout';\r\nimport SearchResult from './SearchResult.type';\r\nimport SearchObject from './SearchObject.type';\r\nimport SearchList from './SearchList';\r\nimport Category from './Category.type';\r\nimport TagButtons from './TagButtons';\r\nimport Viewport from 'Shared/Viewport';\r\nimport Spinner from 'Shared/Icon/Spinner';\r\n\r\ntype StateType = {\r\n unfilteredSearchObjects: SearchObject[];\r\n categories: Category[];\r\n totalHits: number;\r\n currentSearchObjects: SearchObject[];\r\n selectedFilters: string[];\r\n isExpanded: boolean;\r\n isSelected: boolean;\r\n isLoading: boolean;\r\n};\r\n\r\ntype PropType = {} & SearchPageResultViewModelType;\r\n\r\nclass SearchPage extends React.Component {\r\n ref: React.RefObject;\r\n constructor(props: PropType) {\r\n super(props);\r\n this.ref = React.createRef();\r\n this.state = {\r\n unfilteredSearchObjects: [],\r\n categories: [],\r\n totalHits: null,\r\n currentSearchObjects: [],\r\n selectedFilters: [],\r\n isExpanded: false,\r\n isSelected: false,\r\n isLoading: true,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({ isLoading: true });\r\n postJson('/search' + currentUrl().search + '&offset=1').then((result: any) => {\r\n const objs = JSON.parse(result);\r\n const SearchResults = objs as SearchResult;\r\n this.setOurStates(SearchResults);\r\n this.setState({ isLoading: false });\r\n });\r\n }\r\n\r\n setOurStates = (result: SearchResult) => {\r\n this.setState({\r\n unfilteredSearchObjects: result.unfilteredSearchObjects,\r\n categories: result.categories,\r\n totalHits: result.totalHits,\r\n currentSearchObjects: result.unfilteredSearchObjects,\r\n });\r\n };\r\n\r\n filterUnfilteredSearchObjects = () => {\r\n const filteredItems =\r\n this.state.selectedFilters.length === 0\r\n ? this.state.unfilteredSearchObjects\r\n : this.state.unfilteredSearchObjects.filter(x => x.category.some(r => this.state.selectedFilters.includes(r)));\r\n\r\n this.setState({\r\n currentSearchObjects: filteredItems,\r\n });\r\n };\r\n\r\n addFilterToSelected = (key: string) => {\r\n if (!this.state.categories.some(x => x.id === key)) {\r\n return;\r\n }\r\n\r\n if (this.state.selectedFilters.some(x => x === key)) {\r\n const index = this.state.selectedFilters.indexOf(key);\r\n const filters = this.state.selectedFilters;\r\n filters.splice(index, 1);\r\n this.setState(\r\n {\r\n selectedFilters: filters,\r\n },\r\n this.filterUnfilteredSearchObjects,\r\n );\r\n return;\r\n } else {\r\n this.setState(\r\n {\r\n selectedFilters: [key].concat(this.state.selectedFilters),\r\n },\r\n this.filterUnfilteredSearchObjects,\r\n );\r\n }\r\n this.filterUnfilteredSearchObjects();\r\n };\r\n\r\n toggleSerachFilters = () => {\r\n this.setState({\r\n isExpanded: !this.state.isExpanded,\r\n });\r\n };\r\n\r\n toggleIsSelected = () => {\r\n this.setState({\r\n isSelected: !this.state.isSelected,\r\n });\r\n };\r\n\r\n render() {\r\n const searchedFor = currentUrl().searchParams.get('query');\r\n const { isLoading } = this.state;\r\n\r\n const content = (\r\n <>\r\n {isLoading ? (\r\n \r\n \r\n \r\n ) : (\r\n {this.state.totalHits || 0} hits found\r\n )}\r\n\r\n \r\n \r\n );\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {epiPropertyValue(this.props.content.headerText)} {searchedFor}\r\n \r\n \r\n {(isCompact: boolean) => (\r\n <>\r\n {!this.state.isExpanded ? (\r\n \r\n {content}\r\n {isCompact && Show more}\r\n \r\n ) : (\r\n \r\n {content}\r\n {isCompact && Show less}\r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst MainWrapper = styled(Main, {\r\n width: '100%',\r\n margin: {\r\n top: '29px',\r\n left: 'auto',\r\n right: 'auto',\r\n },\r\n padding: {\r\n left: '28px',\r\n right: '28px',\r\n },\r\n ...media(style.mediaMinQueries[Breakpoint.Medium], {\r\n margin: {\r\n top: '99px',\r\n },\r\n padding: {\r\n left: '4vw',\r\n right: '4vw',\r\n },\r\n }),\r\n ...media(style.mediaMinQueries[Breakpoint.Large], {\r\n padding: {\r\n left: '8vw',\r\n right: '8vw',\r\n },\r\n }),\r\n});\r\n\r\nconst BkgPattern = styled.div({\r\n ...media(style.mediaMinQueries[Breakpoint.Small], {\r\n backgroundImage:\r\n 'url(' +\r\n require('../Shared/Image/PatternLeft.png') +\r\n '), url(' +\r\n require('../Shared/Image/PatternRight.png') +\r\n ') ',\r\n backgroundPosition: 'top left, top right',\r\n backgroundRepeat: 'repeat-y',\r\n position: 'absolute',\r\n top: 0,\r\n bottom: 0,\r\n width: '100%',\r\n zIndex: -1,\r\n }),\r\n});\r\n\r\nconst RectangleMore = styled.div({\r\n position: 'relative',\r\n paddingTop: '13px',\r\n paddingBottom: '26px',\r\n marginBottom: '40px',\r\n width: '100%',\r\n backgroundColor: '#F1F2F2',\r\n overflow: 'hidden',\r\n maxHeight: '246px',\r\n});\r\n\r\nconst RectangleLess = styled.div({\r\n position: 'relative',\r\n paddingTop: '13px',\r\n paddingBottom: '26px',\r\n marginBottom: '40px',\r\n width: '100%',\r\n backgroundColor: '#F1F2F2',\r\n});\r\n\r\nconst HeadingText = styled.h1({\r\n marginBottom: '0px',\r\n paddingTop: '3%',\r\n paddingBottom: '3%',\r\n fontSize: '40px',\r\n});\r\n\r\nconst ShowHide = styled.p({\r\n position: 'absolute',\r\n top: '10px',\r\n right: '10px',\r\n});\r\n\r\nconst HitsFoundText = styled.p({\r\n paddingLeft: '20px',\r\n paddingBottom: '13px',\r\n marginBottom: 0,\r\n fontWeight: 500,\r\n fontSize: '18px',\r\n});\r\n\r\nexport default SearchPage;\r\n"],"sourceRoot":""}