@wayke-se/components-react 3.8.1 → 3.9.0-beta.1
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/README.md +20 -11
- package/dist-node/index.js +1577 -603
- package/package.json +4 -4
- package/dist-node/index.js.map +0 -1
- package/dist-src/@types/action.js +0 -1
- package/dist-src/@types/codegen/types.js +0 -14
- package/dist-src/@types/filter.js +0 -1
- package/dist-src/@types/queryFilter.js +0 -1
- package/dist-src/@types/search.js +0 -1
- package/dist-src/@types/vehicle-properties.js +0 -1
- package/dist-src/State/CentralStorage/CentralStorageContext.js +0 -4
- package/dist-src/State/CentralStorage/CentralStorageProvider.js +0 -9
- package/dist-src/State/CentralStorage/useCentralStorage.js +0 -29
- package/dist-src/State/Path/PathContext.js +0 -2
- package/dist-src/State/Path/PathProvider.js +0 -47
- package/dist-src/State/Path/reducer.js +0 -15
- package/dist-src/State/Path/usePath.js +0 -10
- package/dist-src/State/RelatedSearch/RelatedSearchContext.js +0 -8
- package/dist-src/State/RelatedSearch/RelatedSearchProvider.js +0 -27
- package/dist-src/State/RelatedSearch/useRelatedSearch.js +0 -18
- package/dist-src/State/Search/SearchContext.js +0 -12
- package/dist-src/State/Search/SearchProvider.js +0 -178
- package/dist-src/State/Search/useSearch.js +0 -4
- package/dist-src/State/Settings/SettingsContext.js +0 -2
- package/dist-src/State/Settings/SettingsProvider.js +0 -4
- package/dist-src/State/Settings/useSettings.js +0 -4
- package/dist-src/components/AccessoryCard/index.js +0 -14
- package/dist-src/components/AccessoryCard/wrapper.js +0 -90
- package/dist-src/components/Accordion/index.js +0 -18
- package/dist-src/components/Accordion/wrapper.js +0 -92
- package/dist-src/components/ActionList/index.js +0 -18
- package/dist-src/components/ActionList/toggle-item.js +0 -24
- package/dist-src/components/Avatar/index.js +0 -4
- package/dist-src/components/Avatar/wrapper.js +0 -15
- package/dist-src/components/Badge/index.js +0 -4
- package/dist-src/components/Badge/wrapper.js +0 -24
- package/dist-src/components/Blockquote/index.js +0 -12
- package/dist-src/components/Blockquote/wrapper.js +0 -44
- package/dist-src/components/Button/index.js +0 -195
- package/dist-src/components/CheckMarkList/index.js +0 -9
- package/dist-src/components/CheckMarkList/wrapper.js +0 -26
- package/dist-src/components/Checklist/index.js +0 -14
- package/dist-src/components/Checklist/wrapper.js +0 -59
- package/dist-src/components/ColorSelect/index.js +0 -18
- package/dist-src/components/ColorSelect/wrapper.js +0 -69
- package/dist-src/components/ColumnRow/index.js +0 -17
- package/dist-src/components/Columns/index.js +0 -76
- package/dist-src/components/Container/index.js +0 -4
- package/dist-src/components/Container/wrapper.js +0 -12
- package/dist-src/components/Content/index.js +0 -4
- package/dist-src/components/Content/wrapper.js +0 -51
- package/dist-src/components/ContentLogo/index.js +0 -23
- package/dist-src/components/DataList/index.js +0 -6
- package/dist-src/components/DataList/wrapper.js +0 -24
- package/dist-src/components/DetailBox/index.js +0 -17
- package/dist-src/components/DetailBox/wrapper.js +0 -27
- package/dist-src/components/DocumentList/index.js +0 -23
- package/dist-src/components/DocumentList/wrapper.js +0 -55
- package/dist-src/components/ExtendContent/index.js +0 -24
- package/dist-src/components/ExtendContent/wrapper.js +0 -32
- package/dist-src/components/ExtendInfo/index.js +0 -15
- package/dist-src/components/ExtendInfo/wrapper.js +0 -56
- package/dist-src/components/Filter/index.js +0 -64
- package/dist-src/components/Filter/wrapper.js +0 -72
- package/dist-src/components/FilterPanel/checkListFacet.js +0 -29
- package/dist-src/components/FilterPanel/colorFacet.js +0 -29
- package/dist-src/components/FilterPanel/faceSelector.js +0 -32
- package/dist-src/components/FilterPanel/index.js +0 -24
- package/dist-src/components/FilterPanel/rangeFacet.js +0 -82
- package/dist-src/components/FinancialOptions/LoanModal.js +0 -127
- package/dist-src/components/FinancialOptions/index.js +0 -12
- package/dist-src/components/FinancialOptions/leasing.js +0 -56
- package/dist-src/components/FinancialOptions/loan.js +0 -54
- package/dist-src/components/Gallery/MediaButton.js +0 -7
- package/dist-src/components/Gallery/index.js +0 -122
- package/dist-src/components/Gallery/wrapper.js +0 -256
- package/dist-src/components/Grid/index.js +0 -61
- package/dist-src/components/Grid/wrapper.js +0 -26
- package/dist-src/components/Heading/index.js +0 -52
- package/dist-src/components/Icon/index.js +0 -38
- package/dist-src/components/Image/index.js +0 -5
- package/dist-src/components/InputCheckbox/index.js +0 -10
- package/dist-src/components/InputCheckbox/wrapper.js +0 -79
- package/dist-src/components/InputGroup/index.js +0 -21
- package/dist-src/components/InputLabel/index.js +0 -4
- package/dist-src/components/InputLabel/wrapper.js +0 -8
- package/dist-src/components/InputSearch/index.js +0 -12
- package/dist-src/components/InputSearch/wrapper.js +0 -90
- package/dist-src/components/InputSelect/index.js +0 -10
- package/dist-src/components/InputSelect/wrapper.js +0 -53
- package/dist-src/components/InputText/index.js +0 -5
- package/dist-src/components/InputText/wrapper.js +0 -54
- package/dist-src/components/InsuranceOptions/Insurance.js +0 -26
- package/dist-src/components/InsuranceOptions/InsuranceFree.js +0 -30
- package/dist-src/components/InsuranceOptions/InsuranceFreeModal.js +0 -19
- package/dist-src/components/InsuranceOptions/InsuranceModal.js +0 -105
- package/dist-src/components/InsuranceOptions/index.js +0 -15
- package/dist-src/components/Lightbox/index.js +0 -30
- package/dist-src/components/Lightbox/wrapper.js +0 -91
- package/dist-src/components/Link/index.js +0 -28
- package/dist-src/components/Loader/index.js +0 -7
- package/dist-src/components/Loader/wrapper.js +0 -37
- package/dist-src/components/LogoBox/index.js +0 -10
- package/dist-src/components/LogoBox/wrapper.js +0 -12
- package/dist-src/components/Map/index.js +0 -27
- package/dist-src/components/Map/wrapper.js +0 -25
- package/dist-src/components/Modal/index.js +0 -20
- package/dist-src/components/Modal/wrapper.js +0 -113
- package/dist-src/components/NavButton/index.js +0 -42
- package/dist-src/components/OpeningHours/index.js +0 -97
- package/dist-src/components/OptionBox/index.js +0 -7
- package/dist-src/components/OptionBox/wrapper.js +0 -49
- package/dist-src/components/OverflowBox/index.js +0 -4
- package/dist-src/components/OverflowBox/wrapper.js +0 -6
- package/dist-src/components/OverflowGrid/index.js +0 -56
- package/dist-src/components/OverflowGrid/wrapper.js +0 -144
- package/dist-src/components/Page/index.js +0 -30
- package/dist-src/components/Panel/index.js +0 -20
- package/dist-src/components/Panel/wrapper.js +0 -143
- package/dist-src/components/PhoneNumber/index.js +0 -13
- package/dist-src/components/Portal/index.js +0 -4
- package/dist-src/components/Portal/portal-element.js +0 -3
- package/dist-src/components/Portal/portal-namespace.js +0 -1
- package/dist-src/components/Portal/portal.js +0 -25
- package/dist-src/components/Price/index.js +0 -10
- package/dist-src/components/PriceBox/index.js +0 -6
- package/dist-src/components/PriceBox/wrapper.js +0 -34
- package/dist-src/components/PriceTable/index.js +0 -20
- package/dist-src/components/PriceTable/wrapper.js +0 -22
- package/dist-src/components/ProductCard/index.js +0 -45
- package/dist-src/components/ProductCard/wrapper.js +0 -134
- package/dist-src/components/ProductPage/index.js +0 -85
- package/dist-src/components/ProgressBar/index.js +0 -16
- package/dist-src/components/ProgressBar/wrapper.js +0 -24
- package/dist-src/components/RangeSlider/RangeSliderSimple.js +0 -26
- package/dist-src/components/RangeSlider/SliderWithLabel.js +0 -21
- package/dist-src/components/RangeSlider/handle.js +0 -5
- package/dist-src/components/RangeSlider/index.js +0 -50
- package/dist-src/components/RangeSlider/track.js +0 -6
- package/dist-src/components/RangeSlider/wrapper.js +0 -86
- package/dist-src/components/RangeSliderLabel/index.js +0 -6
- package/dist-src/components/RangeSliderLabel/wrapper.js +0 -24
- package/dist-src/components/Repeat/index.js +0 -17
- package/dist-src/components/Result/index.js +0 -40
- package/dist-src/components/Result/wrapper.js +0 -29
- package/dist-src/components/Root/index.js +0 -22
- package/dist-src/components/SearchBar/index.js +0 -18
- package/dist-src/components/SearchFilter/index.js +0 -23
- package/dist-src/components/SearchTerm/index.js +0 -8
- package/dist-src/components/SearchTerm/wrapper.js +0 -67
- package/dist-src/components/SectionHeader/index.js +0 -9
- package/dist-src/components/SectionHeader/wrapper.js +0 -13
- package/dist-src/components/Snackbar/index.js +0 -21
- package/dist-src/components/Snackbar/wrapper.js +0 -56
- package/dist-src/components/SortSelect/index.js +0 -10
- package/dist-src/components/SortSelect/wrapper.js +0 -48
- package/dist-src/components/Sphere/Sphere.js +0 -21
- package/dist-src/components/Sphere/SphereLightbox.js +0 -4
- package/dist-src/components/Sphere/SphereViewer.js +0 -54
- package/dist-src/components/Sphere/wrapper.js +0 -250
- package/dist-src/components/SrOnly/index.js +0 -13
- package/dist-src/components/StateIndicator/index.js +0 -23
- package/dist-src/components/SwitchBar/index.js +0 -23
- package/dist-src/components/SwitchBar/wrapper.js +0 -71
- package/dist-src/components/TableColumn/index.js +0 -14
- package/dist-src/components/TableList/index.js +0 -32
- package/dist-src/components/Tabs/index.js +0 -6
- package/dist-src/components/Tabs/wrapper.js +0 -68
- package/dist-src/components/ThreeSixty/Rotation.js +0 -95
- package/dist-src/components/ThreeSixty/ThreeSixtLightbox.js +0 -15
- package/dist-src/components/ThreeSixty/ThreeSixty.js +0 -25
- package/dist-src/components/UspList/index.js +0 -18
- package/dist-src/components/UspList/wrapper.js +0 -85
- package/dist-src/components/Utility/index.js +0 -13
- package/dist-src/components/Video/CustomPlayer.js +0 -8
- package/dist-src/components/Video/EmbeddedVideoLightbox.js +0 -18
- package/dist-src/components/Video/EmbededVideo.js +0 -38
- package/dist-src/components/Video/QuickNavEmbeded.js +0 -17
- package/dist-src/components/Video/QuickNavVideo.js +0 -6
- package/dist-src/components/Video/Video.js +0 -8
- package/dist-src/components/Video/VimeoPlayer.js +0 -6
- package/dist-src/components/Video/YoutubePlayer.js +0 -6
- package/dist-src/components/Video/useThumbnail.js +0 -25
- package/dist-src/components/Video/utils.js +0 -35
- package/dist-src/components/Video/wrapper.js +0 -19
- package/dist-src/hooks/useFetch.js +0 -69
- package/dist-src/hooks/useHasBeenVisible.js +0 -13
- package/dist-src/hooks/useHashGuid.js +0 -28
- package/dist-src/hooks/useInsurance.js +0 -12
- package/dist-src/hooks/useLoan.js +0 -12
- package/dist-src/hooks/useOnScreen.js +0 -15
- package/dist-src/hooks/useOutsideClick.js +0 -15
- package/dist-src/hooks/usePrevious.js +0 -9
- package/dist-src/hooks/useSearchItem.js +0 -7
- package/dist-src/hooks/useSearchItemBranch.js +0 -7
- package/dist-src/hooks/useSessionStorage.js +0 -23
- package/dist-src/hooks/useVimeoThumbnail.js +0 -18
- package/dist-src/index.js +0 -10
- package/dist-src/layout/helpers.js +0 -5
- package/dist-src/layout/keyframes.js +0 -20
- package/dist-src/layout/theme.js +0 -67
- package/dist-src/layouts/WaykeComposite.js +0 -23
- package/dist-src/layouts/WaykeCompositeWithProvider.js +0 -6
- package/dist-src/layouts/search/index.js +0 -55
- package/dist-src/layouts/searchItem/Accessories/AccessoryModal.js +0 -51
- package/dist-src/layouts/searchItem/Accessories/index.js +0 -32
- package/dist-src/layouts/searchItem/Branch.js +0 -55
- package/dist-src/layouts/searchItem/BranchModal.js +0 -36
- package/dist-src/layouts/searchItem/CheckList.js +0 -79
- package/dist-src/layouts/searchItem/DemoCarModal.js +0 -7
- package/dist-src/layouts/searchItem/Documents.js +0 -44
- package/dist-src/layouts/searchItem/ManufacturerPackagesOption.js +0 -25
- package/dist-src/layouts/searchItem/MetadataItem.js +0 -34
- package/dist-src/layouts/searchItem/PackageOptionModal.js +0 -15
- package/dist-src/layouts/searchItem/PackageOptions.js +0 -25
- package/dist-src/layouts/searchItem/Page404.js +0 -9
- package/dist-src/layouts/searchItem/PageLoading.js +0 -9
- package/dist-src/layouts/searchItem/Property.js +0 -51
- package/dist-src/layouts/searchItem/Related.js +0 -66
- package/dist-src/layouts/searchItem/index.js +0 -180
- package/dist-src/providers/WaykeItemProvidet.js +0 -16
- package/dist-src/providers/WaykeProvider.js +0 -18
- package/dist-src/providers/graphqlProvider.js +0 -7
- package/dist-src/providers/themeProvider.js +0 -5
- package/dist-src/queries/INSURANCE_CALCULATION.js +0 -41
- package/dist-src/queries/LOAN_CALCULATION.js +0 -36
- package/dist-src/queries/SEARCH_ITEM_BRANCH_QUERY.js +0 -136
- package/dist-src/queries/SEARCH_ITEM_QUERY.js +0 -256
- package/dist-src/utils/constants.js +0 -31
- package/dist-src/utils/converters.js +0 -31
- package/dist-src/utils/deep-copy.js +0 -5
- package/dist-src/utils/formats.js +0 -62
- package/dist-src/utils/metadata.min.js +0 -86
- package/dist-src/utils/phonenumbers.js +0 -12
- package/dist-src/utils/pubsub/Actions.js +0 -1
- package/dist-src/utils/pubsub/Events.js +0 -1
- package/dist-src/utils/pubsub/pubsub.js +0 -93
- package/dist-src/utils/regex.js +0 -10
- package/dist-src/utils/sortOptions.js +0 -32
- package/dist-src/utils/specification.js +0 -495
- package/dist-src/utils/ssn.js +0 -1
- package/dist-src/utils/url.js +0 -1
- package/dist-src/utils/vehicle-properties/compare-basic-properties.js +0 -36
- package/dist-src/utils/vehicle-properties/compare-categories.js +0 -27
- package/dist-src/utils/vehicle-properties/compare-properties.js +0 -3
- package/dist-src/utils/vehicle-properties/custom-property-adder.js +0 -143
- package/dist-src/utils/vehicle-properties/property-hint-enricher.js +0 -192
- package/dist-src/utils/vehicle-properties/property-remover.js +0 -27
- package/dist-src/utils/vehicle-properties/property-tree-creator.js +0 -127
- package/dist-src/utils/vehicle-properties/property-tree-sorter.js +0 -18
- package/dist-types/@types/action.d.ts +0 -3
- package/dist-types/@types/codegen/types.d.ts +0 -369
- package/dist-types/@types/filter.d.ts +0 -5
- package/dist-types/@types/queryFilter.d.ts +0 -5
- package/dist-types/@types/search.d.ts +0 -106
- package/dist-types/@types/vehicle-properties.d.ts +0 -29
- package/dist-types/State/CentralStorage/CentralStorageContext.d.ts +0 -6
- package/dist-types/State/CentralStorage/CentralStorageProvider.d.ts +0 -6
- package/dist-types/State/CentralStorage/useCentralStorage.d.ts +0 -6
- package/dist-types/State/Path/PathContext.d.ts +0 -9
- package/dist-types/State/Path/PathProvider.d.ts +0 -6
- package/dist-types/State/Path/reducer.d.ts +0 -14
- package/dist-types/State/Path/usePath.d.ts +0 -3
- package/dist-types/State/RelatedSearch/RelatedSearchContext.d.ts +0 -10
- package/dist-types/State/RelatedSearch/RelatedSearchProvider.d.ts +0 -9
- package/dist-types/State/RelatedSearch/useRelatedSearch.d.ts +0 -2
- package/dist-types/State/Search/SearchContext.d.ts +0 -15
- package/dist-types/State/Search/SearchProvider.d.ts +0 -10
- package/dist-types/State/Search/useSearch.d.ts +0 -2
- package/dist-types/State/Settings/SettingsContext.d.ts +0 -13
- package/dist-types/State/Settings/SettingsProvider.d.ts +0 -10
- package/dist-types/State/Settings/useSettings.d.ts +0 -2
- package/dist-types/components/AccessoryCard/index.d.ts +0 -16
- package/dist-types/components/AccessoryCard/wrapper.d.ts +0 -18
- package/dist-types/components/Accordion/index.d.ts +0 -13
- package/dist-types/components/Accordion/wrapper.d.ts +0 -16
- package/dist-types/components/ActionList/index.d.ts +0 -8
- package/dist-types/components/ActionList/toggle-item.d.ts +0 -10
- package/dist-types/components/Avatar/index.d.ts +0 -7
- package/dist-types/components/Avatar/wrapper.d.ts +0 -7
- package/dist-types/components/Badge/index.d.ts +0 -7
- package/dist-types/components/Badge/wrapper.d.ts +0 -7
- package/dist-types/components/Blockquote/index.d.ts +0 -9
- package/dist-types/components/Blockquote/wrapper.d.ts +0 -9
- package/dist-types/components/Button/index.d.ts +0 -52
- package/dist-types/components/CheckMarkList/index.d.ts +0 -7
- package/dist-types/components/CheckMarkList/wrapper.d.ts +0 -6
- package/dist-types/components/Checklist/index.d.ts +0 -13
- package/dist-types/components/Checklist/wrapper.d.ts +0 -11
- package/dist-types/components/ColorSelect/index.d.ts +0 -14
- package/dist-types/components/ColorSelect/wrapper.d.ts +0 -11
- package/dist-types/components/ColumnRow/index.d.ts +0 -2
- package/dist-types/components/Columns/index.d.ts +0 -16
- package/dist-types/components/Container/index.d.ts +0 -6
- package/dist-types/components/Container/wrapper.d.ts +0 -1
- package/dist-types/components/Content/index.d.ts +0 -6
- package/dist-types/components/Content/wrapper.d.ts +0 -4
- package/dist-types/components/ContentLogo/index.d.ts +0 -3
- package/dist-types/components/DataList/index.d.ts +0 -10
- package/dist-types/components/DataList/wrapper.d.ts +0 -6
- package/dist-types/components/DetailBox/index.d.ts +0 -8
- package/dist-types/components/DetailBox/wrapper.d.ts +0 -13
- package/dist-types/components/DocumentList/index.d.ts +0 -11
- package/dist-types/components/DocumentList/wrapper.d.ts +0 -11
- package/dist-types/components/ExtendContent/index.d.ts +0 -8
- package/dist-types/components/ExtendContent/wrapper.d.ts +0 -6
- package/dist-types/components/ExtendInfo/index.d.ts +0 -7
- package/dist-types/components/ExtendInfo/wrapper.d.ts +0 -10
- package/dist-types/components/Filter/index.d.ts +0 -7
- package/dist-types/components/Filter/wrapper.d.ts +0 -8
- package/dist-types/components/FilterPanel/checkListFacet.d.ts +0 -7
- package/dist-types/components/FilterPanel/colorFacet.d.ts +0 -7
- package/dist-types/components/FilterPanel/faceSelector.d.ts +0 -7
- package/dist-types/components/FilterPanel/index.d.ts +0 -18
- package/dist-types/components/FilterPanel/rangeFacet.d.ts +0 -9
- package/dist-types/components/FinancialOptions/LoanModal.d.ts +0 -9
- package/dist-types/components/FinancialOptions/index.d.ts +0 -8
- package/dist-types/components/FinancialOptions/leasing.d.ts +0 -7
- package/dist-types/components/FinancialOptions/loan.d.ts +0 -8
- package/dist-types/components/Gallery/MediaButton.d.ts +0 -7
- package/dist-types/components/Gallery/index.d.ts +0 -8
- package/dist-types/components/Gallery/wrapper.d.ts +0 -22
- package/dist-types/components/Grid/index.d.ts +0 -12
- package/dist-types/components/Grid/wrapper.d.ts +0 -3
- package/dist-types/components/Heading/index.d.ts +0 -29
- package/dist-types/components/Icon/index.d.ts +0 -17
- package/dist-types/components/Image/index.d.ts +0 -1
- package/dist-types/components/InputCheckbox/index.d.ts +0 -7
- package/dist-types/components/InputCheckbox/wrapper.d.ts +0 -13
- package/dist-types/components/InputGroup/index.d.ts +0 -2
- package/dist-types/components/InputLabel/index.d.ts +0 -7
- package/dist-types/components/InputLabel/wrapper.d.ts +0 -3
- package/dist-types/components/InputSearch/index.d.ts +0 -11
- package/dist-types/components/InputSearch/wrapper.d.ts +0 -15
- package/dist-types/components/InputSelect/index.d.ts +0 -14
- package/dist-types/components/InputSelect/wrapper.d.ts +0 -6
- package/dist-types/components/InputText/index.d.ts +0 -8
- package/dist-types/components/InputText/wrapper.d.ts +0 -5
- package/dist-types/components/InsuranceOptions/Insurance.d.ts +0 -9
- package/dist-types/components/InsuranceOptions/InsuranceFree.d.ts +0 -7
- package/dist-types/components/InsuranceOptions/InsuranceFreeModal.d.ts +0 -8
- package/dist-types/components/InsuranceOptions/InsuranceModal.d.ts +0 -10
- package/dist-types/components/InsuranceOptions/index.d.ts +0 -9
- package/dist-types/components/Lightbox/index.d.ts +0 -9
- package/dist-types/components/Lightbox/wrapper.d.ts +0 -9
- package/dist-types/components/Link/index.d.ts +0 -7
- package/dist-types/components/Loader/index.d.ts +0 -7
- package/dist-types/components/Loader/wrapper.d.ts +0 -9
- package/dist-types/components/LogoBox/index.d.ts +0 -9
- package/dist-types/components/LogoBox/wrapper.d.ts +0 -4
- package/dist-types/components/Map/index.d.ts +0 -7
- package/dist-types/components/Map/wrapper.d.ts +0 -4
- package/dist-types/components/Modal/index.d.ts +0 -9
- package/dist-types/components/Modal/wrapper.d.ts +0 -21
- package/dist-types/components/NavButton/index.d.ts +0 -3
- package/dist-types/components/OpeningHours/index.d.ts +0 -7
- package/dist-types/components/OptionBox/index.d.ts +0 -9
- package/dist-types/components/OptionBox/wrapper.d.ts +0 -8
- package/dist-types/components/OverflowBox/index.d.ts +0 -6
- package/dist-types/components/OverflowBox/wrapper.d.ts +0 -1
- package/dist-types/components/OverflowGrid/index.d.ts +0 -12
- package/dist-types/components/OverflowGrid/wrapper.d.ts +0 -18
- package/dist-types/components/Page/index.d.ts +0 -7
- package/dist-types/components/Panel/index.d.ts +0 -10
- package/dist-types/components/Panel/wrapper.d.ts +0 -22
- package/dist-types/components/PhoneNumber/index.d.ts +0 -6
- package/dist-types/components/Portal/index.d.ts +0 -4
- package/dist-types/components/Portal/portal-element.d.ts +0 -6
- package/dist-types/components/Portal/portal-namespace.d.ts +0 -1
- package/dist-types/components/Portal/portal.d.ts +0 -7
- package/dist-types/components/Price/index.d.ts +0 -4
- package/dist-types/components/PriceBox/index.d.ts +0 -11
- package/dist-types/components/PriceBox/wrapper.d.ts +0 -10
- package/dist-types/components/PriceTable/index.d.ts +0 -7
- package/dist-types/components/PriceTable/wrapper.d.ts +0 -4
- package/dist-types/components/ProductCard/index.d.ts +0 -20
- package/dist-types/components/ProductCard/wrapper.d.ts +0 -22
- package/dist-types/components/ProductPage/index.d.ts +0 -9
- package/dist-types/components/ProgressBar/index.d.ts +0 -8
- package/dist-types/components/ProgressBar/wrapper.d.ts +0 -6
- package/dist-types/components/RangeSlider/RangeSliderSimple.d.ts +0 -13
- package/dist-types/components/RangeSlider/SliderWithLabel.d.ts +0 -13
- package/dist-types/components/RangeSlider/handle.d.ts +0 -9
- package/dist-types/components/RangeSlider/index.d.ts +0 -13
- package/dist-types/components/RangeSlider/track.d.ts +0 -9
- package/dist-types/components/RangeSlider/wrapper.d.ts +0 -11
- package/dist-types/components/RangeSliderLabel/index.d.ts +0 -8
- package/dist-types/components/RangeSliderLabel/wrapper.d.ts +0 -10
- package/dist-types/components/Repeat/index.d.ts +0 -3
- package/dist-types/components/Result/index.d.ts +0 -6
- package/dist-types/components/Result/wrapper.d.ts +0 -9
- package/dist-types/components/Root/index.d.ts +0 -4
- package/dist-types/components/SearchBar/index.d.ts +0 -8
- package/dist-types/components/SearchFilter/index.d.ts +0 -3
- package/dist-types/components/SearchTerm/index.d.ts +0 -8
- package/dist-types/components/SearchTerm/wrapper.d.ts +0 -7
- package/dist-types/components/SectionHeader/index.d.ts +0 -8
- package/dist-types/components/SectionHeader/wrapper.d.ts +0 -3
- package/dist-types/components/Snackbar/index.d.ts +0 -9
- package/dist-types/components/Snackbar/wrapper.d.ts +0 -11
- package/dist-types/components/SortSelect/index.d.ts +0 -14
- package/dist-types/components/SortSelect/wrapper.d.ts +0 -6
- package/dist-types/components/Sphere/Sphere.d.ts +0 -10
- package/dist-types/components/Sphere/SphereLightbox.d.ts +0 -6
- package/dist-types/components/Sphere/SphereViewer.d.ts +0 -10
- package/dist-types/components/Sphere/wrapper.d.ts +0 -1
- package/dist-types/components/SrOnly/index.d.ts +0 -1
- package/dist-types/components/StateIndicator/index.d.ts +0 -5
- package/dist-types/components/SwitchBar/index.d.ts +0 -10
- package/dist-types/components/SwitchBar/wrapper.d.ts +0 -14
- package/dist-types/components/TableColumn/index.d.ts +0 -3
- package/dist-types/components/TableList/index.d.ts +0 -6
- package/dist-types/components/Tabs/index.d.ts +0 -12
- package/dist-types/components/Tabs/wrapper.d.ts +0 -12
- package/dist-types/components/ThreeSixty/Rotation.d.ts +0 -6
- package/dist-types/components/ThreeSixty/ThreeSixtLightbox.d.ts +0 -6
- package/dist-types/components/ThreeSixty/ThreeSixty.d.ts +0 -9
- package/dist-types/components/UspList/index.d.ts +0 -11
- package/dist-types/components/UspList/wrapper.d.ts +0 -11
- package/dist-types/components/Utility/index.d.ts +0 -8
- package/dist-types/components/Video/CustomPlayer.d.ts +0 -10
- package/dist-types/components/Video/EmbeddedVideoLightbox.d.ts +0 -8
- package/dist-types/components/Video/EmbededVideo.d.ts +0 -8
- package/dist-types/components/Video/QuickNavEmbeded.d.ts +0 -7
- package/dist-types/components/Video/QuickNavVideo.d.ts +0 -7
- package/dist-types/components/Video/Video.d.ts +0 -5
- package/dist-types/components/Video/VimeoPlayer.d.ts +0 -7
- package/dist-types/components/Video/YoutubePlayer.d.ts +0 -7
- package/dist-types/components/Video/useThumbnail.d.ts +0 -2
- package/dist-types/components/Video/utils.d.ts +0 -9
- package/dist-types/components/Video/wrapper.d.ts +0 -11
- package/dist-types/hooks/useFetch.d.ts +0 -7
- package/dist-types/hooks/useHasBeenVisible.d.ts +0 -2
- package/dist-types/hooks/useHashGuid.d.ts +0 -2
- package/dist-types/hooks/useInsurance.d.ts +0 -4
- package/dist-types/hooks/useLoan.d.ts +0 -4
- package/dist-types/hooks/useOnScreen.d.ts +0 -2
- package/dist-types/hooks/useOutsideClick.d.ts +0 -2
- package/dist-types/hooks/usePrevious.d.ts +0 -2
- package/dist-types/hooks/useSearchItem.d.ts +0 -4
- package/dist-types/hooks/useSearchItemBranch.d.ts +0 -4
- package/dist-types/hooks/useSessionStorage.d.ts +0 -7
- package/dist-types/hooks/useVimeoThumbnail.d.ts +0 -2
- package/dist-types/index.d.ts +0 -18
- package/dist-types/layout/helpers.d.ts +0 -1
- package/dist-types/layout/keyframes.d.ts +0 -3
- package/dist-types/layout/theme.d.ts +0 -49
- package/dist-types/layouts/WaykeComposite.d.ts +0 -6
- package/dist-types/layouts/WaykeCompositeWithProvider.d.ts +0 -9
- package/dist-types/layouts/search/index.d.ts +0 -16
- package/dist-types/layouts/searchItem/Accessories/AccessoryModal.d.ts +0 -8
- package/dist-types/layouts/searchItem/Accessories/index.d.ts +0 -7
- package/dist-types/layouts/searchItem/Branch.d.ts +0 -9
- package/dist-types/layouts/searchItem/BranchModal.d.ts +0 -9
- package/dist-types/layouts/searchItem/CheckList.d.ts +0 -14
- package/dist-types/layouts/searchItem/DemoCarModal.d.ts +0 -6
- package/dist-types/layouts/searchItem/Documents.d.ts +0 -7
- package/dist-types/layouts/searchItem/ManufacturerPackagesOption.d.ts +0 -7
- package/dist-types/layouts/searchItem/MetadataItem.d.ts +0 -10
- package/dist-types/layouts/searchItem/PackageOptionModal.d.ts +0 -17
- package/dist-types/layouts/searchItem/PackageOptions.d.ts +0 -7
- package/dist-types/layouts/searchItem/Page404.d.ts +0 -3
- package/dist-types/layouts/searchItem/PageLoading.d.ts +0 -3
- package/dist-types/layouts/searchItem/Property.d.ts +0 -8
- package/dist-types/layouts/searchItem/Related.d.ts +0 -11
- package/dist-types/layouts/searchItem/index.d.ts +0 -13
- package/dist-types/providers/WaykeItemProvidet.d.ts +0 -22
- package/dist-types/providers/WaykeProvider.d.ts +0 -24
- package/dist-types/providers/graphqlProvider.d.ts +0 -6
- package/dist-types/providers/themeProvider.d.ts +0 -6
- package/dist-types/queries/INSURANCE_CALCULATION.d.ts +0 -2
- package/dist-types/queries/LOAN_CALCULATION.d.ts +0 -2
- package/dist-types/queries/SEARCH_ITEM_BRANCH_QUERY.d.ts +0 -2
- package/dist-types/queries/SEARCH_ITEM_QUERY.d.ts +0 -2
- package/dist-types/utils/constants.d.ts +0 -63
- package/dist-types/utils/converters.d.ts +0 -1
- package/dist-types/utils/deep-copy.d.ts +0 -5
- package/dist-types/utils/formats.d.ts +0 -8
- package/dist-types/utils/metadata.min.d.ts +0 -11
- package/dist-types/utils/phonenumbers.d.ts +0 -1
- package/dist-types/utils/pubsub/Actions.d.ts +0 -16
- package/dist-types/utils/pubsub/Events.d.ts +0 -51
- package/dist-types/utils/pubsub/pubsub.d.ts +0 -32
- package/dist-types/utils/regex.d.ts +0 -3
- package/dist-types/utils/sortOptions.d.ts +0 -13
- package/dist-types/utils/specification.d.ts +0 -28
- package/dist-types/utils/ssn.d.ts +0 -1
- package/dist-types/utils/url.d.ts +0 -1
- package/dist-types/utils/vehicle-properties/compare-basic-properties.d.ts +0 -3
- package/dist-types/utils/vehicle-properties/compare-categories.d.ts +0 -3
- package/dist-types/utils/vehicle-properties/compare-properties.d.ts +0 -3
- package/dist-types/utils/vehicle-properties/custom-property-adder.d.ts +0 -12
- package/dist-types/utils/vehicle-properties/property-hint-enricher.d.ts +0 -10
- package/dist-types/utils/vehicle-properties/property-remover.d.ts +0 -7
- package/dist-types/utils/vehicle-properties/property-tree-creator.d.ts +0 -31
- package/dist-types/utils/vehicle-properties/property-tree-sorter.d.ts +0 -3
- package/dist-web/index.js +0 -8197
- package/dist-web/index.js.map +0 -1
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
export const Wrapper = styled.div `
|
|
4
|
-
font-size: 1rem;
|
|
5
|
-
line-height: 1.5;
|
|
6
|
-
|
|
7
|
-
h1,
|
|
8
|
-
h2,
|
|
9
|
-
h3,
|
|
10
|
-
h4,
|
|
11
|
-
h5,
|
|
12
|
-
h6 {
|
|
13
|
-
margin-top: ${size(4)};
|
|
14
|
-
margin-bottom: ${size(1)};
|
|
15
|
-
|
|
16
|
-
:first-child {
|
|
17
|
-
margin-top: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:last-child {
|
|
21
|
-
margin-bottom: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
& + p,
|
|
25
|
-
& + table {
|
|
26
|
-
margin-top: ${size(1)};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
p {
|
|
31
|
-
margin: ${size(2)} 0;
|
|
32
|
-
|
|
33
|
-
:first-child {
|
|
34
|
-
margin-top: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:last-child {
|
|
38
|
-
margin-bottom: 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
img {
|
|
43
|
-
display: block;
|
|
44
|
-
width: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
${({ small }) => small &&
|
|
48
|
-
css `
|
|
49
|
-
font-size: 0.875rem;
|
|
50
|
-
`}
|
|
51
|
-
`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
export const ContentLogo = styled.div `
|
|
4
|
-
${(props) => props.theme.breakpoint.Sm} {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: flex-start;
|
|
7
|
-
}
|
|
8
|
-
`;
|
|
9
|
-
export const ContentLogoText = styled.div `
|
|
10
|
-
${(props) => props.theme.breakpoint.Sm} {
|
|
11
|
-
flex: 1 1 auto;
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
export const ContentLogoMedia = styled.div `
|
|
15
|
-
${(props) => props.theme.breakpoint.LtSm} {
|
|
16
|
-
margin-top: ${size(2)};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
${(props) => props.theme.breakpoint.Sm} {
|
|
20
|
-
flex-shrink: 0;
|
|
21
|
-
padding-left: ${size(4)};
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { List, Item, Label, Value } from './wrapper';
|
|
3
|
-
const DataList = ({ items }) => (React.createElement(List, null, items.map((item) => (React.createElement(Item, { key: item.label },
|
|
4
|
-
React.createElement(Label, null, item.label),
|
|
5
|
-
React.createElement(Value, null, item.value))))));
|
|
6
|
-
export default DataList;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
export const List = styled.ul `
|
|
4
|
-
list-style: none;
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
`;
|
|
8
|
-
export const Item = styled.li `
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
|
|
12
|
-
& + & {
|
|
13
|
-
margin-top: ${size(1)};
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
export const Label = styled.div `
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
`;
|
|
19
|
-
export const Value = styled.div.attrs(() => ({
|
|
20
|
-
className: 'wayke__theme wayke__font--bold',
|
|
21
|
-
})) `
|
|
22
|
-
flex-shrink: 0;
|
|
23
|
-
padding-left: ${size(2)};
|
|
24
|
-
`;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Wrapper, Main, Heading, Description, Footer, Foldout } from './wrapper';
|
|
3
|
-
import { ButtonClear, ButtonContent } from '../Button/index';
|
|
4
|
-
const DetailBox = ({ heading, description, children }) => {
|
|
5
|
-
const [extend, setExtend] = React.useState(false);
|
|
6
|
-
const onToggleExtend = React.useCallback(() => setExtend(!extend), [extend]);
|
|
7
|
-
const extendBtnText = extend ? 'Mindre information' : 'Mer information';
|
|
8
|
-
return (React.createElement(Wrapper, null,
|
|
9
|
-
React.createElement(Main, null,
|
|
10
|
-
React.createElement(Heading, null, heading),
|
|
11
|
-
description && React.createElement(Description, null, description),
|
|
12
|
-
React.createElement(Footer, null,
|
|
13
|
-
React.createElement(ButtonClear, { onClick: onToggleExtend },
|
|
14
|
-
React.createElement(ButtonContent, null, extendBtnText)))),
|
|
15
|
-
extend && React.createElement(Foldout, null, children)));
|
|
16
|
-
};
|
|
17
|
-
export default DetailBox;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
import { H2 } from '../Heading/index';
|
|
4
|
-
export const Wrapper = styled.article `
|
|
5
|
-
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
|
|
6
|
-
border-radius: 3px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
`;
|
|
9
|
-
export const Main = styled.div `
|
|
10
|
-
padding: ${size(2.5)};
|
|
11
|
-
`;
|
|
12
|
-
export const Heading = styled(H2).attrs(() => ({
|
|
13
|
-
as: 'h1',
|
|
14
|
-
})) `
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
`;
|
|
17
|
-
export const Description = styled.div `
|
|
18
|
-
margin-top: ${size(1)};
|
|
19
|
-
`;
|
|
20
|
-
export const Footer = styled.div `
|
|
21
|
-
margin-top: ${size(1)};
|
|
22
|
-
color: red;
|
|
23
|
-
`;
|
|
24
|
-
export const Foldout = styled.div `
|
|
25
|
-
background-color: ${(props) => props.theme.color.accent};
|
|
26
|
-
padding: ${size(2.5)};
|
|
27
|
-
`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import { PdfListItem, PdfSubtitle, PdfTitle, List, PdfListInner, PdfLink, PdfColumn, } from './wrapper';
|
|
3
|
-
const translateContentType = (document) => {
|
|
4
|
-
switch (document.contentType) {
|
|
5
|
-
case 'application/pdf':
|
|
6
|
-
return 'PDF';
|
|
7
|
-
default:
|
|
8
|
-
const formattedContentType = document.url && document.url.includes('.') ? document.url.split('.').pop() : '';
|
|
9
|
-
return formattedContentType;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export const PdfDownloadItem = ({ document }) => {
|
|
13
|
-
const contentType = useMemo(() => translateContentType(document), [document]);
|
|
14
|
-
return (React.createElement(PdfListItem, null,
|
|
15
|
-
React.createElement(PdfListInner, null,
|
|
16
|
-
React.createElement(PdfColumn, null,
|
|
17
|
-
React.createElement(PdfTitle, null, document.name),
|
|
18
|
-
React.createElement(PdfSubtitle, null, contentType)),
|
|
19
|
-
React.createElement(PdfColumn, null,
|
|
20
|
-
React.createElement(PdfLink, { href: document.url, rel: "noopener noreferrer nofollow", target: "_blank" }, "\u00D6ppna")))));
|
|
21
|
-
};
|
|
22
|
-
export const DocumentList = ({ documents }) => (React.createElement(List, null, documents.map((document, i) => (React.createElement(PdfDownloadItem, { key: `${document.url}-${i}`, document: document })))));
|
|
23
|
-
export default DocumentList;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
export const PdfListItem = styled.li.attrs(() => ({
|
|
4
|
-
className: 'wayke__theme wayke__color--primary-text',
|
|
5
|
-
})) `
|
|
6
|
-
flex: 0 0 50%;
|
|
7
|
-
padding: ${size(1)};
|
|
8
|
-
|
|
9
|
-
${({ theme }) => theme.breakpoint.LtSm} {
|
|
10
|
-
flex: 0 0 100%;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
export const List = styled.ul `
|
|
14
|
-
list-style: none;
|
|
15
|
-
padding: 0;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
margin: ${size(-1)};
|
|
19
|
-
`;
|
|
20
|
-
export const PdfLink = styled.a.attrs(() => ({
|
|
21
|
-
className: 'wayke__theme wayke__color--primary-text wayke__font--bold',
|
|
22
|
-
})) `
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
font-size: 0.875rem;
|
|
25
|
-
&:after {
|
|
26
|
-
content: '';
|
|
27
|
-
position: absolute;
|
|
28
|
-
top: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: 100%;
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
export const PdfTitle = styled.div `
|
|
35
|
-
color: ${(props) => props.theme.color.textDark};
|
|
36
|
-
`;
|
|
37
|
-
export const PdfSubtitle = styled.div `
|
|
38
|
-
color: ${(props) => props.theme.color.textDarkLighten};
|
|
39
|
-
`;
|
|
40
|
-
export const PdfColumn = styled.div `
|
|
41
|
-
flex: 0 0 auto;
|
|
42
|
-
&:first-child {
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
export const PdfListInner = styled.div `
|
|
47
|
-
position: relative;
|
|
48
|
-
border: 1px solid ${(props) => props.theme.color.border};
|
|
49
|
-
padding: ${size(1.5)};
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
:hover {
|
|
53
|
-
background-color: ${(props) => props.theme.color.hoverOverlay};
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { Wrapper, Extend, Action } from './wrapper';
|
|
3
|
-
import { ButtonClear, ButtonContent } from '../Button/index';
|
|
4
|
-
const ExtendContent = ({ children, actionTitle, onClick }) => {
|
|
5
|
-
const [extend, setExtend] = useState(false);
|
|
6
|
-
const onExtend = useCallback(() => {
|
|
7
|
-
setExtend(true);
|
|
8
|
-
if (onClick) {
|
|
9
|
-
onClick();
|
|
10
|
-
}
|
|
11
|
-
}, []);
|
|
12
|
-
const onRef = (ref) => {
|
|
13
|
-
const refHeight = ref?.clientHeight || 0;
|
|
14
|
-
if (refHeight < 207) {
|
|
15
|
-
setExtend(true);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
return (React.createElement(Wrapper, { ref: onRef },
|
|
19
|
-
React.createElement(Extend, { extended: extend }, children),
|
|
20
|
-
!extend && (React.createElement(Action, null,
|
|
21
|
-
React.createElement(ButtonClear, { onClick: onExtend, title: actionTitle },
|
|
22
|
-
React.createElement(ButtonContent, null, actionTitle))))));
|
|
23
|
-
};
|
|
24
|
-
export default ExtendContent;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
export const Wrapper = styled.div ``;
|
|
4
|
-
export const Extend = styled.div `
|
|
5
|
-
position: relative;
|
|
6
|
-
max-height: 175px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
|
|
9
|
-
:after {
|
|
10
|
-
content: '';
|
|
11
|
-
position: absolute;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
left: 0;
|
|
14
|
-
right: 0;
|
|
15
|
-
height: ${size(6)};
|
|
16
|
-
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
${({ extended }) => extended &&
|
|
20
|
-
css `
|
|
21
|
-
max-height: none;
|
|
22
|
-
|
|
23
|
-
:after {
|
|
24
|
-
content: none;
|
|
25
|
-
}
|
|
26
|
-
`}
|
|
27
|
-
`;
|
|
28
|
-
export const Action = styled.div `
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: flex-end;
|
|
31
|
-
margin-top: ${size(2)};
|
|
32
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { Wrapper, Header, Title, Info, InfoBtn, Extend } from './wrapper';
|
|
3
|
-
import { IconInfo } from '../Icon/index';
|
|
4
|
-
const ExtendInfo = ({ title, children }) => {
|
|
5
|
-
const [extend, setExtend] = useState(false);
|
|
6
|
-
const onToggleExtend = useCallback(() => setExtend(!extend), [extend]);
|
|
7
|
-
return (React.createElement(Wrapper, null,
|
|
8
|
-
React.createElement(Header, null,
|
|
9
|
-
React.createElement(Title, null, title),
|
|
10
|
-
children && (React.createElement(Info, null,
|
|
11
|
-
React.createElement(InfoBtn, { onClick: onToggleExtend, title: "Mer information" },
|
|
12
|
-
React.createElement(IconInfo, { block: true }))))),
|
|
13
|
-
extend && React.createElement(Extend, null, children)));
|
|
14
|
-
};
|
|
15
|
-
export default ExtendInfo;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
import { ButtonReset } from '../Button/index';
|
|
4
|
-
export const Wrapper = styled.div ``;
|
|
5
|
-
export const Header = styled.div `
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
`;
|
|
9
|
-
export const Title = styled.div ``;
|
|
10
|
-
export const Info = styled.div `
|
|
11
|
-
margin-left: ${size(1)};
|
|
12
|
-
`;
|
|
13
|
-
export const InfoBtn = styled(ButtonReset).attrs(() => ({
|
|
14
|
-
className: 'wayke__theme wayke__color--primary-text',
|
|
15
|
-
})) `
|
|
16
|
-
position: relative;
|
|
17
|
-
display: block;
|
|
18
|
-
font: inherit;
|
|
19
|
-
font-size: 1em;
|
|
20
|
-
transform-origin: 50% 50%;
|
|
21
|
-
transition: transform 300ms cubic-bezier(0.47, 1.64, 0.41, 0.8);
|
|
22
|
-
|
|
23
|
-
:before {
|
|
24
|
-
content: '';
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: ${size(-0.5)};
|
|
27
|
-
bottom: ${size(-0.5)};
|
|
28
|
-
left: ${size(-0.5)};
|
|
29
|
-
right: ${size(-0.5)};
|
|
30
|
-
background-color: ${(props) => props.theme.color.accentDark};
|
|
31
|
-
border-radius: 50%;
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transition: opacity 200ms ease;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
> * {
|
|
37
|
-
position: relative;
|
|
38
|
-
z-index: 1;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:hover {
|
|
42
|
-
:before {
|
|
43
|
-
opacity: 1;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:active {
|
|
48
|
-
transform: scale(0.95);
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
export const Extend = styled.div `
|
|
52
|
-
padding-top: ${size(1)};
|
|
53
|
-
margin-top: ${size(1)};
|
|
54
|
-
border-top: 1px solid ${(props) => props.theme.color.border};
|
|
55
|
-
font-size: 0.875em;
|
|
56
|
-
`;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import { List, Item, Action, Label, Indicator, IndicatorValue } from './wrapper';
|
|
3
|
-
import { FacetIdToTitle } from '../../utils/formats';
|
|
4
|
-
import { PRICE, MILEAGE, MODEL_YEAR, LEASING_PRICE, BUSINESS_LEASING_PRICE, } from '../../utils/constants';
|
|
5
|
-
import useSearch from '../../State/Search/useSearch';
|
|
6
|
-
import FilterPanel from '../FilterPanel/index';
|
|
7
|
-
const isSelected = (f, searchParams) => {
|
|
8
|
-
switch (f.id) {
|
|
9
|
-
case PRICE:
|
|
10
|
-
case MILEAGE:
|
|
11
|
-
case LEASING_PRICE:
|
|
12
|
-
case BUSINESS_LEASING_PRICE:
|
|
13
|
-
case MODEL_YEAR:
|
|
14
|
-
return searchParams.has(`${f.id}.min`) || searchParams.has(`${f.id}.max`) ? 1 : 0;
|
|
15
|
-
default:
|
|
16
|
-
return f.filters.filter((filter) => filter.selected).length;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const Filter = ({ filterList }) => {
|
|
20
|
-
const { queryFilter, initialFacets, loading, response, onFilterUpdate } = useSearch();
|
|
21
|
-
const facets = response?.facets;
|
|
22
|
-
const [facet, setFacet] = useState();
|
|
23
|
-
const onSelectFacet = useCallback((nextFacet) => setFacet(nextFacet), []);
|
|
24
|
-
const onClose = useCallback(() => setFacet(undefined), []);
|
|
25
|
-
if (!facets) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const filterNames = filterList ? filterList.map((x) => x.filterName) : undefined;
|
|
29
|
-
const filteredFacets = facets
|
|
30
|
-
?.filter((x) => x.id !== 'segment')
|
|
31
|
-
?.filter((f) => (filterNames ? filterNames.includes(f.id) : true))
|
|
32
|
-
.sort((a, b) => filterNames
|
|
33
|
-
? filterNames.indexOf(a.id) -
|
|
34
|
-
filterNames.indexOf(b.id)
|
|
35
|
-
: 0)
|
|
36
|
-
.map((x) => {
|
|
37
|
-
const match = filterList?.find((y) => y.filterName === x.id);
|
|
38
|
-
if (match?.displayName) {
|
|
39
|
-
return {
|
|
40
|
-
...x,
|
|
41
|
-
displayName: match.displayName,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
...x,
|
|
46
|
-
displayName: FacetIdToTitle(x.id),
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
return (React.createElement(React.Fragment, null,
|
|
50
|
-
initialFacets && facet && (React.createElement(FilterPanel, { filterList: filterList, facet: facet, loading: loading, filteredFacets: filteredFacets, numberOfHits: response?.documentList.numberOfHits || 0, onFilterUpdate: onFilterUpdate, onClose: onClose })),
|
|
51
|
-
React.createElement(List, null, filteredFacets
|
|
52
|
-
.filter((x) => x.filters.length)
|
|
53
|
-
.map((f) => {
|
|
54
|
-
const selected = isSelected(f, queryFilter.searchParams);
|
|
55
|
-
return (React.createElement(Item, { key: f.id },
|
|
56
|
-
React.createElement(Action, { onClick: () => onSelectFacet(f), title: f.displayName, "aria-label": f.displayName, className: selected > 0
|
|
57
|
-
? 'wayke__theme wayke__color--primary-bg wayke__font--bold'
|
|
58
|
-
: 'wayke__theme wayke__font--regular' },
|
|
59
|
-
React.createElement(Label, null, f.displayName),
|
|
60
|
-
selected > 0 && (React.createElement(Indicator, null,
|
|
61
|
-
React.createElement(IndicatorValue, null, selected))))));
|
|
62
|
-
}))));
|
|
63
|
-
};
|
|
64
|
-
export default Filter;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { size } from '../../layout/helpers';
|
|
3
|
-
import { ButtonReset } from '../Button/index';
|
|
4
|
-
export const List = styled.ul `
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
flex-wrap: wrap;
|
|
8
|
-
list-style: none;
|
|
9
|
-
padding: 0;
|
|
10
|
-
margin: ${size(-0.5)};
|
|
11
|
-
`;
|
|
12
|
-
export const Item = styled.li `
|
|
13
|
-
padding: ${size(0.5)};
|
|
14
|
-
`;
|
|
15
|
-
export const Action = styled(ButtonReset) `
|
|
16
|
-
position: relative;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
padding: ${size(1.5)} ${size(3)};
|
|
20
|
-
background-color: ${(props) => props.theme.color.accentDark};
|
|
21
|
-
border-radius: 3px;
|
|
22
|
-
font-size: 0.875rem;
|
|
23
|
-
line-height: 1;
|
|
24
|
-
transform-origin: 50% 50%;
|
|
25
|
-
transition: transform 150ms ease;
|
|
26
|
-
|
|
27
|
-
:before {
|
|
28
|
-
content: '';
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0;
|
|
31
|
-
left: 0;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
background-color: ${(props) => props.theme.color.hoverOverlay};
|
|
35
|
-
border-radius: 3px;
|
|
36
|
-
opacity: 0;
|
|
37
|
-
transition: opacity 150ms ease;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:hover {
|
|
41
|
-
:before {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:active {
|
|
47
|
-
transform: scale(0.95);
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
export const Label = styled.div `
|
|
51
|
-
z-index: 1;
|
|
52
|
-
`;
|
|
53
|
-
export const Indicator = styled.div `
|
|
54
|
-
flex-shrink: 0;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
padding: 0 ${size(0.375)};
|
|
59
|
-
margin-left: ${size(0.5)};
|
|
60
|
-
background-color: currentColor;
|
|
61
|
-
min-width: 1em;
|
|
62
|
-
height: 1em;
|
|
63
|
-
border-radius: 999px;
|
|
64
|
-
z-index: 1;
|
|
65
|
-
`;
|
|
66
|
-
export const IndicatorValue = styled.div `
|
|
67
|
-
font-family: sans-serif; // Default font to guarantee visibility
|
|
68
|
-
font-size: 0.75rem;
|
|
69
|
-
font-weight: bold;
|
|
70
|
-
color: white;
|
|
71
|
-
mix-blend-mode: difference;
|
|
72
|
-
`;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import Checklist from '../Checklist/index';
|
|
3
|
-
import OverflowBox from '../OverflowBox/index';
|
|
4
|
-
import useSearch from '../../State/Search/useSearch';
|
|
5
|
-
const ChecklistFacet = ({ facet }) => {
|
|
6
|
-
const { loading, error, onFilterUpdate } = useSearch();
|
|
7
|
-
const [selected, setSelected] = useState();
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
setSelected(undefined);
|
|
10
|
-
}, [facet, error]);
|
|
11
|
-
const onClick = useCallback((f) => {
|
|
12
|
-
if (!loading) {
|
|
13
|
-
setSelected({
|
|
14
|
-
...selected,
|
|
15
|
-
[f.displayName]: !f.selected,
|
|
16
|
-
});
|
|
17
|
-
onFilterUpdate(f.query);
|
|
18
|
-
}
|
|
19
|
-
}, [loading]);
|
|
20
|
-
return (React.createElement(OverflowBox, null,
|
|
21
|
-
React.createElement(Checklist, { items: facet.filters
|
|
22
|
-
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
23
|
-
.map((f) => ({
|
|
24
|
-
label: f.displayName,
|
|
25
|
-
onClick: () => onClick(f),
|
|
26
|
-
active: selected?.[f.displayName] !== undefined ? selected[f.displayName] : f.selected,
|
|
27
|
-
})) })));
|
|
28
|
-
};
|
|
29
|
-
export default ChecklistFacet;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import ColorSelect from '../ColorSelect/index';
|
|
3
|
-
import useSearch from '../../State/Search/useSearch';
|
|
4
|
-
import { getHexColorFromDisplayName } from '../../utils/converters';
|
|
5
|
-
const ColorSelectFacet = ({ facet }) => {
|
|
6
|
-
const { loading, error, onFilterUpdate } = useSearch();
|
|
7
|
-
const [selected, setSelected] = useState();
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
setSelected(undefined);
|
|
10
|
-
}, [facet, error]);
|
|
11
|
-
const onClick = useCallback((f) => {
|
|
12
|
-
if (!loading) {
|
|
13
|
-
setSelected({
|
|
14
|
-
...selected,
|
|
15
|
-
[f.displayName]: !f.selected,
|
|
16
|
-
});
|
|
17
|
-
onFilterUpdate(f.query);
|
|
18
|
-
}
|
|
19
|
-
}, [loading]);
|
|
20
|
-
return (React.createElement(ColorSelect, { items: facet.filters
|
|
21
|
-
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
22
|
-
.map((f) => ({
|
|
23
|
-
label: f.displayName,
|
|
24
|
-
onClick: () => onClick(f),
|
|
25
|
-
active: selected?.[f.displayName] !== undefined ? selected[f.displayName] : f.selected,
|
|
26
|
-
hex: [getHexColorFromDisplayName(f.displayName)],
|
|
27
|
-
})) }));
|
|
28
|
-
};
|
|
29
|
-
export default ColorSelectFacet;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CheckListFacet from './checkListFacet';
|
|
3
|
-
import ColorSelectFacet from './colorFacet';
|
|
4
|
-
import RangeFacet from './rangeFacet';
|
|
5
|
-
import { MANUFACTURER, MODEL_SERIES, FUEL_TYPE, GEARBOX_TYPE, ENVIRONMENT_CLASS, SEGMENT, DRIVING_WHEEL, COLOR, PRICE, BRANCH, MILEAGE, MODEL_YEAR, LEASING_PRICE, BUSINESS_LEASING_PRICE, } from '../../utils/constants';
|
|
6
|
-
const FacetSelector = ({ facet }) => {
|
|
7
|
-
switch (facet.id) {
|
|
8
|
-
case MANUFACTURER:
|
|
9
|
-
case MODEL_SERIES:
|
|
10
|
-
case FUEL_TYPE:
|
|
11
|
-
case GEARBOX_TYPE:
|
|
12
|
-
case BRANCH:
|
|
13
|
-
case ENVIRONMENT_CLASS:
|
|
14
|
-
case SEGMENT:
|
|
15
|
-
case DRIVING_WHEEL:
|
|
16
|
-
return React.createElement(CheckListFacet, { facet: facet });
|
|
17
|
-
case COLOR:
|
|
18
|
-
return React.createElement(ColorSelectFacet, { facet: facet });
|
|
19
|
-
case PRICE:
|
|
20
|
-
return React.createElement(RangeFacet, { facet: facet, unit: "kr", formatValues: true });
|
|
21
|
-
case BUSINESS_LEASING_PRICE:
|
|
22
|
-
case LEASING_PRICE:
|
|
23
|
-
return React.createElement(RangeFacet, { facet: facet, unit: "kr/m\u00E5n", formatValues: true });
|
|
24
|
-
case MILEAGE:
|
|
25
|
-
return React.createElement(RangeFacet, { facet: facet, unit: "mil", formatValues: true });
|
|
26
|
-
case MODEL_YEAR:
|
|
27
|
-
return React.createElement(RangeFacet, { facet: facet, unit: "\u00E5r" });
|
|
28
|
-
default:
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export default FacetSelector;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import Panel from '../Panel/index';
|
|
3
|
-
import { FooterAction, FooterActionItem } from '../Panel/wrapper';
|
|
4
|
-
import { ButtonSecondary, ButtonContent, ButtonPrimary } from '../Button/index';
|
|
5
|
-
import Accordion, { AccordionItem } from '../Accordion/index';
|
|
6
|
-
import { Repeat } from '../Repeat/index';
|
|
7
|
-
import FacetSelector from './faceSelector';
|
|
8
|
-
const FilterPanel = ({ facet, filteredFacets, numberOfHits, loading, onFilterUpdate, onClose, }) => {
|
|
9
|
-
const onClearFilters = useCallback(() => onFilterUpdate(''), []);
|
|
10
|
-
return (React.createElement(Panel, { title: "Filtrera", onClose: onClose, footer: React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement(FooterAction, null,
|
|
12
|
-
React.createElement(FooterActionItem, null,
|
|
13
|
-
React.createElement(ButtonSecondary, { fullWidth: true, disabled: loading, onClick: onClearFilters },
|
|
14
|
-
React.createElement(ButtonContent, null, "Rensa alla"))),
|
|
15
|
-
React.createElement(FooterActionItem, null,
|
|
16
|
-
React.createElement(ButtonPrimary, { fullWidth: true, disabled: loading, onClick: onClose },
|
|
17
|
-
React.createElement(ButtonContent, null, `Visa ${numberOfHits} ${numberOfHits === 1 ? 'bil' : 'bilar'}`))))) },
|
|
18
|
-
React.createElement(Accordion, null, filteredFacets
|
|
19
|
-
.filter((x) => x.filters.length)
|
|
20
|
-
.map((f) => (React.createElement(AccordionItem, { key: f.displayName, heading: f.displayName, isActive: f.id === facet?.id },
|
|
21
|
-
React.createElement(Repeat, null,
|
|
22
|
-
React.createElement(FacetSelector, { facet: f }))))))));
|
|
23
|
-
};
|
|
24
|
-
export default FilterPanel;
|