@wayke-se/components-react 5.2.0 → 6.0.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 +260 -140
- package/dist/assets/StyreneA-Bold-Web-4CXEYQLA-4CXEYQLA.woff2 +0 -0
- package/dist/assets/StyreneA-Bold-Web-AGBUOKS2-AGBUOKS2.woff +0 -0
- package/dist/assets/StyreneA-Light-Web-DAMPSUFB-DAMPSUFB.woff +0 -0
- package/dist/assets/StyreneA-Light-Web-EE4AJECE-EE4AJECE.woff2 +0 -0
- package/dist/assets/StyreneA-Medium-Web-53Q6X35A-53Q6X35A.woff +0 -0
- package/dist/assets/StyreneA-Medium-Web-7KYQNCKQ-7KYQNCKQ.woff2 +0 -0
- package/dist/assets/StyreneA-Regular-Web-7SAOGHB5-7SAOGHB5.woff2 +0 -0
- package/dist/assets/StyreneA-Regular-Web-XFBCXNPA-XFBCXNPA.woff +0 -0
- package/dist/chunks/chunk-XBJKSIMP.js +2 -0
- package/dist/chunks/chunk-XBJKSIMP.js.map +7 -0
- package/dist/chunks/dist-3TYBTGV5.js +1969 -0
- package/dist/chunks/dist-3TYBTGV5.js.map +7 -0
- package/dist/index.js +1037 -3129
- package/dist/index.js.map +4 -4
- package/dist/style.css +1 -0
- package/dist/types/src/@types/filter.d.ts +7 -1
- package/dist/types/src/Gql/ad/legacyWaykeId.d.ts +1 -0
- package/dist/types/src/Gql/ad/propertyTree.d.ts +5 -0
- package/dist/types/src/Gql/ad/queries.d.ts +9 -0
- package/dist/types/src/Gql/ad/types.d.ts +378 -0
- package/dist/types/src/Gql/ad/useAd.d.ts +8 -0
- package/dist/types/src/Gql/ad/useInsuranceInquiry.d.ts +11 -0
- package/dist/types/src/Gql/ad/useLoanCalculation.d.ts +14 -0
- package/dist/types/src/Gql/ad/useRelatedAds.d.ts +12 -0
- package/dist/types/src/Gql/ad/view.d.ts +94 -0
- package/dist/types/src/Gql/client.d.ts +11 -0
- package/dist/types/src/Gql/config.d.ts +9 -0
- package/dist/types/src/Gql/facets.d.ts +19 -0
- package/dist/types/src/Gql/hit.d.ts +5 -0
- package/dist/types/src/Gql/legacyParams.d.ts +7 -0
- package/dist/types/src/Gql/queries.d.ts +17 -0
- package/dist/types/src/Gql/searchParams.d.ts +55 -0
- package/dist/types/src/Gql/suggest.d.ts +8 -0
- package/dist/types/src/Gql/types.d.ts +131 -0
- package/dist/types/src/Gql/useAdsSearch.d.ts +21 -0
- package/dist/types/src/State/Ad/AdContext.d.ts +5 -0
- package/dist/types/src/State/Router/RouterContext.d.ts +15 -0
- package/dist/types/src/State/Router/RouterProvider.d.ts +6 -0
- package/dist/types/src/State/Router/useRouter.d.ts +2 -0
- package/dist/types/src/State/Search/SearchContext.d.ts +15 -9
- package/dist/types/src/State/Search/SearchProvider.d.ts +1 -5
- package/dist/types/src/State/Settings/SettingsContext.d.ts +2 -12
- package/dist/types/src/State/Settings/settings.d.ts +62 -0
- package/dist/types/src/State/Settings/useSettings.d.ts +1 -1
- package/dist/types/src/components/ActionList/index.d.ts +3 -10
- package/dist/types/src/components/DocumentList/index.d.ts +3 -3
- package/dist/types/src/components/Filter/index.d.ts +1 -3
- package/dist/types/src/components/FilterPanel/checkListFacet.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/colorFacet.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/faceSelector.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/index.d.ts +8 -15
- package/dist/types/src/components/FilterPanel/rangeFacet.d.ts +3 -3
- package/dist/types/src/components/FinancialOptions/LoanModal.d.ts +3 -7
- package/dist/types/src/components/FinancialOptions/index.d.ts +5 -7
- package/dist/types/src/components/FinancialOptions/leasing.d.ts +3 -3
- package/dist/types/src/components/FinancialOptions/loan.d.ts +3 -7
- package/dist/types/src/components/Gallery/index.d.ts +3 -5
- package/dist/types/src/components/Grid/index.d.ts +3 -7
- package/dist/types/src/components/InsuranceOptions/Insurance.d.ts +4 -6
- package/dist/types/src/components/InsuranceOptions/InsuranceFree.d.ts +5 -7
- package/dist/types/src/components/InsuranceOptions/InsuranceFreeModal.d.ts +4 -4
- package/dist/types/src/components/InsuranceOptions/InsuranceModal.d.ts +4 -6
- package/dist/types/src/components/InsuranceOptions/index.d.ts +5 -6
- package/dist/types/src/components/LeadForm/index.d.ts +1 -6
- package/dist/types/src/components/Lightbox/index.d.ts +2 -2
- package/dist/types/src/components/Map/index.d.ts +4 -2
- package/dist/types/src/components/OpeningHours/index.d.ts +2 -2
- package/dist/types/src/components/ProductCard/HitCard.d.ts +10 -0
- package/dist/types/src/components/ProductCard/index.d.ts +9 -13
- package/dist/types/src/components/SearchBar/index.d.ts +4 -1
- package/dist/types/src/components/SearchBar/wrapper.d.ts +10 -0
- package/dist/types/src/components/SortSelect/index.d.ts +1 -2
- package/dist/types/src/hooks/useSubmitLead.d.ts +1 -1
- package/dist/types/src/index.d.ts +5 -4
- package/dist/types/src/layouts/WaykeComposite.d.ts +3 -8
- package/dist/types/src/layouts/WaykeCompositeWithProvider.d.ts +1 -1
- package/dist/types/src/layouts/search/index.d.ts +6 -7
- package/dist/types/src/layouts/searchItem/Accessories/AccessoryModal.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/Accessories/index.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/Branch.d.ts +3 -4
- package/dist/types/src/layouts/searchItem/CheckList.d.ts +3 -15
- package/dist/types/src/layouts/searchItem/Documents.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/ManufacturerPackagesOption.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/PackageOptions.d.ts +3 -3
- package/dist/types/src/layouts/searchItem/Property.d.ts +1 -6
- package/dist/types/src/layouts/searchItem/Related.d.ts +5 -6
- package/dist/types/src/layouts/searchItem/index.d.ts +8 -6
- package/dist/types/src/layouts/searchItem/useEcom.d.ts +7 -3
- package/dist/types/src/providers/WaykeProvider.d.ts +7 -21
- package/dist/types/src/utils/image.d.ts +14 -0
- package/dist/types/src/utils/sortOptions.d.ts +4 -13
- package/package.json +26 -22
- package/dist/assets/default.css +0 -1
- package/dist/assets/fonts/slick.svg +0 -14
- package/dist/index.mjs +0 -5511
- package/dist/index.mjs.map +0 -7
- package/dist/types/src/@types/action.d.ts +0 -3
- package/dist/types/src/@types/codegen/types.d.ts +0 -433
- package/dist/types/src/@types/queryFilter.d.ts +0 -5
- package/dist/types/src/@types/search.d.ts +0 -114
- package/dist/types/src/State/CentralStorage/CentralStorageContext.d.ts +0 -5
- package/dist/types/src/State/CentralStorage/CentralStorageProvider.d.ts +0 -6
- package/dist/types/src/State/CentralStorage/useCentralStorage.d.ts +0 -6
- package/dist/types/src/State/Path/PathContext.d.ts +0 -8
- package/dist/types/src/State/Path/PathProvider.d.ts +0 -6
- package/dist/types/src/State/Path/reducer.d.ts +0 -14
- package/dist/types/src/State/Path/usePath.d.ts +0 -3
- package/dist/types/src/State/RelatedSearch/RelatedSearchContext.d.ts +0 -9
- package/dist/types/src/State/RelatedSearch/RelatedSearchProvider.d.ts +0 -9
- package/dist/types/src/State/RelatedSearch/useRelatedSearch.d.ts +0 -2
- package/dist/types/src/State/Settings/SettingsProvider.d.ts +0 -11
- package/dist/types/src/components/Video/QuickNavVideo.d.ts +0 -7
- package/dist/types/src/hooks/apolloTypes.d.ts +0 -6
- package/dist/types/src/hooks/useHasBeenVisible.d.ts +0 -2
- package/dist/types/src/hooks/useHashGuid.d.ts +0 -2
- package/dist/types/src/hooks/useInsurance.d.ts +0 -4
- package/dist/types/src/hooks/useLoan.d.ts +0 -4
- package/dist/types/src/hooks/useOnScreen.d.ts +0 -2
- package/dist/types/src/hooks/usePrevious.d.ts +0 -2
- package/dist/types/src/hooks/useSearchItem.d.ts +0 -4
- package/dist/types/src/hooks/useSearchItemBranch.d.ts +0 -4
- package/dist/types/src/hooks/useSessionStorage.d.ts +0 -7
- package/dist/types/src/layouts/searchItem/BranchModal.d.ts +0 -9
- package/dist/types/src/providers/WaykeItemProvidet.d.ts +0 -24
- package/dist/types/src/providers/graphqlProvider.d.ts +0 -6
- package/dist/types/src/queries/INSURANCE_CALCULATION.d.ts +0 -2
- package/dist/types/src/queries/LOAN_CALCULATION.d.ts +0 -2
- package/dist/types/src/queries/SEARCH_ITEM_BRANCH_QUERY.d.ts +0 -2
- package/dist/types/src/queries/SEARCH_ITEM_QUERY.d.ts +0 -2
- package/dist/types/src/utils/deep-copy.d.ts +0 -5
- package/dist/types/src/utils/regex.d.ts +0 -3
- package/dist/types/src/utils/specification.d.ts +0 -28
- package/dist/types/src/utils/url.d.ts +0 -1
- package/dist/types/src/utils/vehicle-properties/compare-basic-properties.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/compare-categories.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/compare-properties.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/custom-property-adder.d.ts +0 -13
- package/dist/types/src/utils/vehicle-properties/property-remover.d.ts +0 -7
- package/dist/types/src/utils/vehicle-properties/property-tree-creator.d.ts +0 -31
- package/dist/types/src/utils/vehicle-properties/property-tree-sorter.d.ts +0 -3
- /package/dist/assets/{ajax-loader.gif → ajax-loader-BOAPMZMT.gif} +0 -0
- /package/dist/assets/{fonts/slick.eot → slick-EVLS6IWX.eot} +0 -0
- /package/dist/assets/{fonts/slick.woff → slick-MU5EZO5G.woff} +0 -0
- /package/dist/assets/{fonts/slick.ttf → slick-NKQ64RRA.ttf} +0 -0
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface FilterProps {
|
|
6
|
-
label: string;
|
|
7
|
-
activeFilters?: number;
|
|
2
|
+
export interface PanelFilter {
|
|
3
|
+
id: string;
|
|
4
|
+
displayName: string;
|
|
8
5
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
filteredFacets: Facet[];
|
|
14
|
-
filterList?: SearchFilterTypes[];
|
|
15
|
-
numberOfHits: number;
|
|
6
|
+
interface Props {
|
|
7
|
+
filters: PanelFilter[];
|
|
8
|
+
/** The filter whose section is open */
|
|
9
|
+
open: string;
|
|
16
10
|
onClose: () => void;
|
|
17
|
-
onFilterUpdate: (nextQuery: string) => void;
|
|
18
11
|
}
|
|
19
|
-
declare const FilterPanel: ({
|
|
12
|
+
declare const FilterPanel: ({ filters, open, onClose }: Props) => React.JSX.Element;
|
|
20
13
|
export default FilterPanel;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { RangeFilter } from '../../Gql/searchParams';
|
|
3
3
|
interface RangeFacetProps {
|
|
4
|
-
|
|
4
|
+
id: RangeFilter;
|
|
5
5
|
unit?: string;
|
|
6
6
|
formatValues?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const RangeFacet: ({
|
|
8
|
+
declare const RangeFacet: ({ id, unit, formatValues }: RangeFacetProps) => React.JSX.Element | null;
|
|
9
9
|
export default RangeFacet;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MarketCode } from '../../@types/market';
|
|
2
|
+
import { PaymentResponse } from '../../Gql/ad/types';
|
|
4
3
|
interface LoanModalProps {
|
|
5
|
-
|
|
6
|
-
branch?: Maybe<Branch>;
|
|
7
|
-
financialOption: FinancialOption;
|
|
8
|
-
marketCode?: MarketCode;
|
|
4
|
+
loan: PaymentResponse;
|
|
9
5
|
onClose: () => void;
|
|
10
6
|
}
|
|
11
|
-
declare const LoanModal: ({
|
|
7
|
+
declare const LoanModal: ({ loan: option, onClose }: LoanModalProps) => React.JSX.Element;
|
|
12
8
|
export default LoanModal;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PaymentResponse } from '../../Gql/ad/types';
|
|
3
|
+
import { LeasingOffer } from '../../Gql/ad/view';
|
|
4
4
|
interface FinancialOptionsProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
financialOptions: FinancialOption[];
|
|
8
|
-
marketCode?: MarketCode;
|
|
5
|
+
loans: PaymentResponse[];
|
|
6
|
+
leasing: LeasingOffer[];
|
|
9
7
|
}
|
|
10
|
-
declare const FinancialOptions: ({
|
|
8
|
+
declare const FinancialOptions: ({ loans, leasing }: FinancialOptionsProps) => React.JSX.Element;
|
|
11
9
|
export default FinancialOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { LeasingOffer } from '../../Gql/ad/view';
|
|
3
3
|
interface LeasingProps {
|
|
4
|
-
|
|
4
|
+
offer: LeasingOffer;
|
|
5
5
|
}
|
|
6
|
-
declare const Leasing: ({
|
|
6
|
+
declare const Leasing: ({ offer }: LeasingProps) => React.JSX.Element;
|
|
7
7
|
export default Leasing;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MarketCode } from '../../@types/market';
|
|
2
|
+
import { PaymentResponse } from '../../Gql/ad/types';
|
|
4
3
|
interface LoanProps {
|
|
5
|
-
|
|
6
|
-
branch?: Maybe<Branch>;
|
|
7
|
-
financialOption: FinancialOption;
|
|
8
|
-
marketCode?: MarketCode;
|
|
4
|
+
loan: PaymentResponse;
|
|
9
5
|
}
|
|
10
|
-
declare const Loan: ({
|
|
6
|
+
declare const Loan: ({ loan }: LoanProps) => React.JSX.Element;
|
|
11
7
|
export default Loan;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GalleryMedia } from '../../Gql/ad/view';
|
|
3
3
|
interface GalleryProps {
|
|
4
|
-
|
|
5
|
-
branch?: Maybe<Branch>;
|
|
6
|
-
media?: Media[];
|
|
4
|
+
media: GalleryMedia[];
|
|
7
5
|
placeholderImage?: string;
|
|
8
6
|
}
|
|
9
|
-
declare const Gallery: ({
|
|
7
|
+
declare const Gallery: ({ media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
10
8
|
export default Gallery;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { OnItemClick } from '../ProductCard';
|
|
2
|
+
import { SearchHit } from '../../Gql/types';
|
|
4
3
|
interface GridProps {
|
|
5
|
-
|
|
6
|
-
hashRoute?: boolean;
|
|
7
|
-
pathRoute?: string;
|
|
4
|
+
hits: SearchHit[];
|
|
8
5
|
placeholderImage?: string;
|
|
9
6
|
displayBranchName?: boolean;
|
|
10
|
-
onClickItem?: (data: OnItemClick) => void;
|
|
11
7
|
}
|
|
12
|
-
declare const Grid: ({
|
|
8
|
+
declare const Grid: ({ hits, placeholderImage, displayBranchName }: GridProps) => React.JSX.Element;
|
|
13
9
|
export default Grid;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
branch?: Branch | null;
|
|
6
|
-
insuranceOptions: InsuranceOption[];
|
|
2
|
+
import { InsuranceProvider } from '../../Gql/ad/types';
|
|
3
|
+
interface InsuranceProps {
|
|
4
|
+
provider: InsuranceProvider;
|
|
7
5
|
}
|
|
8
|
-
declare const Insurance: ({
|
|
6
|
+
declare const Insurance: ({ provider }: InsuranceProps) => React.JSX.Element;
|
|
9
7
|
export default Insurance;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
branch?: Maybe<Branch>;
|
|
6
|
-
insuranceOptions: InsuranceOption[];
|
|
2
|
+
import { InsuranceProvider } from '../../Gql/ad/types';
|
|
3
|
+
interface InsuranceFreeProps {
|
|
4
|
+
provider: InsuranceProvider;
|
|
7
5
|
}
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
6
|
+
declare const InsuranceFree: ({ provider }: InsuranceFreeProps) => React.JSX.Element;
|
|
7
|
+
export default InsuranceFree;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
2
|
+
import { InsuranceProvider } from '../../Gql/ad/types';
|
|
3
|
+
interface InsuranceFreeModalProps {
|
|
4
4
|
onClose: () => void;
|
|
5
|
-
|
|
5
|
+
provider: InsuranceProvider;
|
|
6
6
|
}
|
|
7
|
-
declare const InsuranceFreeModal: ({ onClose,
|
|
7
|
+
declare const InsuranceFreeModal: ({ onClose, provider }: InsuranceFreeModalProps) => React.JSX.Element;
|
|
8
8
|
export default InsuranceFreeModal;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
4
|
-
id: string;
|
|
5
|
-
branch?: Branch | null;
|
|
2
|
+
import { InsuranceProvider } from '../../Gql/ad/types';
|
|
3
|
+
interface InsuranceModalProps {
|
|
6
4
|
onClose: () => void;
|
|
7
|
-
|
|
5
|
+
provider: InsuranceProvider;
|
|
8
6
|
}
|
|
9
|
-
declare const InsuranceModal: ({
|
|
7
|
+
declare const InsuranceModal: ({ onClose, provider }: InsuranceModalProps) => React.JSX.Element;
|
|
10
8
|
export default InsuranceModal;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
4
|
-
|
|
5
|
-
branch?: Branch | null;
|
|
6
|
-
insuranceOptions: InsuranceOption[];
|
|
2
|
+
import { InsuranceProvider } from '../../Gql/ad/types';
|
|
3
|
+
interface InsuranceOptionsProps {
|
|
4
|
+
provider: InsuranceProvider;
|
|
7
5
|
}
|
|
8
|
-
|
|
6
|
+
/** A quote needs a personal number and a distance; without them the offer is just described. */
|
|
7
|
+
declare const InsuranceOptions: ({ provider }: InsuranceOptionsProps) => React.JSX.Element;
|
|
9
8
|
export default InsuranceOptions;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Branch, Maybe } from '../../@types/codegen/types';
|
|
3
|
-
import { MarketCode } from '../../@types/market';
|
|
4
2
|
import { LeadCommunication } from '../../hooks/useSubmitLead';
|
|
5
3
|
export type { LeadCommunication };
|
|
6
4
|
interface LeadFormProps {
|
|
7
|
-
id: string;
|
|
8
|
-
branch?: Maybe<Branch>;
|
|
9
|
-
marketCode?: MarketCode;
|
|
10
5
|
communication: LeadCommunication;
|
|
11
6
|
onClose: () => void;
|
|
12
7
|
}
|
|
13
8
|
export declare const normalizeRegistrationNumber: (value: string) => string;
|
|
14
|
-
declare const LeadForm: ({
|
|
9
|
+
declare const LeadForm: ({ communication, onClose }: LeadFormProps) => React.JSX.Element;
|
|
15
10
|
export default LeadForm;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GalleryMedia } from '../../Gql/ad/view';
|
|
3
3
|
interface LightboxProps {
|
|
4
4
|
index: number;
|
|
5
|
-
media:
|
|
5
|
+
media: GalleryMedia[];
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
}
|
|
8
8
|
declare const Lightbox: ({ index, media, onClose }: LightboxProps) => React.JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Maybe, Position } from '../../@types/codegen/types';
|
|
3
2
|
interface StaticMapProps {
|
|
4
|
-
position?:
|
|
3
|
+
position?: {
|
|
4
|
+
latitude: number;
|
|
5
|
+
longitude: number;
|
|
6
|
+
};
|
|
5
7
|
}
|
|
6
8
|
declare const StaticMap: ({ position }: StaticMapProps) => React.JSX.Element | null;
|
|
7
9
|
export default StaticMap;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WeekOpeningHours } from '../../Gql/ad/view';
|
|
3
3
|
interface OpeningHoursProps {
|
|
4
|
-
openingHours?:
|
|
4
|
+
openingHours?: WeekOpeningHours;
|
|
5
5
|
}
|
|
6
6
|
declare const OpeningHours: ({ openingHours }: OpeningHoursProps) => React.JSX.Element | null;
|
|
7
7
|
export default OpeningHours;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchHit } from '../../Gql/types';
|
|
3
|
+
interface HitCardProps {
|
|
4
|
+
hit: SearchHit;
|
|
5
|
+
placeholderImage?: string;
|
|
6
|
+
displayBranchName?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** A search hit as a product card: the search result and the related cars share it. */
|
|
9
|
+
declare const HitCard: ({ hit, placeholderImage, displayBranchName }: HitCardProps) => React.JSX.Element;
|
|
10
|
+
export default HitCard;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Branch, File } from '../../@types/search';
|
|
3
2
|
import { ItemProps } from '../UspList';
|
|
4
|
-
export interface OnItemClick {
|
|
5
|
-
id: string;
|
|
6
|
-
branchId?: string;
|
|
7
|
-
branchName?: string;
|
|
8
|
-
}
|
|
9
3
|
interface Props {
|
|
10
4
|
id: string;
|
|
11
5
|
title: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
/** The ad's first image (a cfit url) */
|
|
7
|
+
image?: string;
|
|
8
|
+
branch?: {
|
|
9
|
+
id: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
};
|
|
16
12
|
placeholderImage?: string;
|
|
17
13
|
description?: string;
|
|
18
14
|
uspList?: ItemProps[];
|
|
19
|
-
price
|
|
15
|
+
/** Left out when the ad has no cash price (0), as on wayke.se */
|
|
16
|
+
price?: string;
|
|
20
17
|
leasingPrice?: string;
|
|
21
18
|
oldPrice?: string;
|
|
22
19
|
branchName?: string;
|
|
23
20
|
businessLeasingPrice?: string;
|
|
24
|
-
onClick?: (data: OnItemClick) => void;
|
|
25
21
|
}
|
|
26
|
-
declare const ProductCard: ({ id, title,
|
|
22
|
+
declare const ProductCard: ({ id, title, image, placeholderImage, branch, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, }: Props) => React.JSX.Element;
|
|
27
23
|
export default ProductCard;
|
|
@@ -3,6 +3,9 @@ interface SearchBarProps {
|
|
|
3
3
|
value: string;
|
|
4
4
|
setValue: (value: string) => void;
|
|
5
5
|
onSearch: (value: string) => void;
|
|
6
|
+
/** Typeahead labels shown under the field */
|
|
7
|
+
suggestions?: string[];
|
|
8
|
+
onSelectSuggestion?: (index: number) => void;
|
|
6
9
|
}
|
|
7
|
-
declare const SearchBar: ({ value, setValue, onSearch }: SearchBarProps) => React.JSX.Element;
|
|
10
|
+
declare const SearchBar: ({ value, setValue, onSearch, suggestions, onSelectSuggestion, }: SearchBarProps) => React.JSX.Element;
|
|
8
11
|
export default SearchBar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Suggestions: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "style"> & {
|
|
2
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
3
|
+
}, "className"> & Partial<Pick<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "style"> & {
|
|
4
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
5
|
+
}, "className">>> & string;
|
|
6
|
+
export declare const Suggestion: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
7
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
$active: boolean;
|
|
10
|
+
}>> & string;
|
|
@@ -21,7 +21,7 @@ export interface SubmitLeadProps {
|
|
|
21
21
|
* website-components-react so leads from any Wayke-powered site look the same in Dealer.
|
|
22
22
|
* `source` (hostname) + `sourceMechanism` is what gives the dealer traceability.
|
|
23
23
|
*/
|
|
24
|
-
declare const useSubmitLead: (
|
|
24
|
+
declare const useSubmitLead: (leadUrl: string, marketCode?: MarketCode) => {
|
|
25
25
|
isLoading: boolean;
|
|
26
26
|
error: string | null;
|
|
27
27
|
submitLead: ({ itemId, branchId, communication, firstName, lastName, phoneNumber, email, message, tradeInCarRegNo, tradeInCarMileage, }: SubmitLeadProps) => Promise<LeadResponse>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ConversionOption, ConversionOptionType, ConversionOptionVehicle } from './@types/conversion';
|
|
2
2
|
import type { SearchFilterNameTypes, SearchFilterTypes } from './@types/filter';
|
|
3
|
+
import type { MarketCode } from './@types/market';
|
|
3
4
|
import SearchBar from './components/SearchBar';
|
|
4
5
|
import WaykeSearch, { WaykeSearchProps } from './layouts/search';
|
|
5
6
|
import WaykeSearchItem, { WaykeSearchItemProps } from './layouts/searchItem';
|
|
6
7
|
import WaykeComposite, { WaykeCompositeWithProviderProps } from './layouts/WaykeCompositeWithProvider';
|
|
7
8
|
import WaykeThemeProvider from './providers/themeProvider';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import type { CallbackEcom, CallbackEmpty, CallbackHashRouteChange, EventAll, EventEcom, EventFilterApply, EventFinanceClose, EventFinanceInterest, EventFinanceOpen, EventHashRouteChange, EventImagesClick, EventInsuranceClose, EventInsuranceInterest, EventInsuranceOpen, EventItemClicked, EventMailVisible, EventNames, EventOptionsClick, EventPhonenumberCall, EventPhonenumberVisible, EventSearch, EventType, EventView } from './utils/pubsub/Events';
|
|
9
|
+
import WaykeProvider, { EcomSettings, WaykeProviderSettings } from './providers/WaykeProvider';
|
|
10
|
+
import type { Environment, RoutingMode, RoutingSettings } from './State/Settings/settings';
|
|
11
11
|
import WaykePubSub, { EventSubscriptions } from './utils/pubsub/pubsub';
|
|
12
|
-
export {
|
|
12
|
+
export { ConversionOption, ConversionOptionType, ConversionOptionVehicle, EcomSettings, Environment, EventSubscriptions, MarketCode, RoutingMode, RoutingSettings, SearchBar, SearchFilterNameTypes, SearchFilterTypes, WaykeCompositeWithProviderProps, WaykeProvider, WaykeProviderSettings, WaykePubSub, WaykeSearch, WaykeSearchItem, WaykeSearchItemProps, WaykeSearchProps, WaykeThemeProvider, };
|
|
13
13
|
export default WaykeComposite;
|
|
14
|
+
export type * from './utils/pubsub/Events';
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WaykeSearchProps } from './search';
|
|
3
3
|
import { WaykeSearchItemProps } from './searchItem';
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
hashRoute?: WaykeCompositeBaseProps['hashRoute'];
|
|
8
|
-
/** @deprecated Has no effect. Subscribe to the `ItemClicked` event with `WaykePubSub` instead. */
|
|
9
|
-
onClickSearchItem?: WaykeCompositeBaseProps['onClickSearchItem'];
|
|
10
|
-
};
|
|
11
|
-
declare const WaykeComposite: ({ marketCode, filterList, initialQueryParams, removeSearchBar, removeFilterOptions, disableResetScrollOnInit, placeholderImage, pathRoute, modifyDocumentTitleItem, modifyDocumentTitleSearch, displayBranchName, conversionOptions, }: WaykeCompositeProps) => React.JSX.Element | null;
|
|
4
|
+
export type WaykeCompositeProps = WaykeSearchProps & Omit<WaykeSearchItemProps, 'id'>;
|
|
5
|
+
/** The search, switching to the vehicle page when a vehicle is opened. */
|
|
6
|
+
declare const WaykeComposite: ({ filterList, initialQueryParams, removeSearchBar, removeFilterOptions, disableResetScrollOnInit, placeholderImage, modifyDocumentTitleItem, modifyDocumentTitleSearch, displayBranchName, conversionOptions, }: WaykeCompositeProps) => React.JSX.Element;
|
|
12
7
|
export default WaykeComposite;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { WaykeProviderProps } from '../providers/WaykeProvider';
|
|
3
3
|
import { WaykeCompositeProps } from './WaykeComposite';
|
|
4
4
|
export interface WaykeCompositeWithProviderProps {
|
|
5
|
-
provider
|
|
5
|
+
provider?: WaykeProviderProps;
|
|
6
6
|
composite?: WaykeCompositeProps;
|
|
7
7
|
}
|
|
8
8
|
declare const WaykeCompositeWithProvider: ({ provider, composite }: WaykeCompositeWithProviderProps) => React.JSX.Element;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchFilterTypes } from '../../@types/filter';
|
|
3
|
-
import { MarketCode } from '../../@types/market';
|
|
4
|
-
import { OnItemClick } from '../../components/ProductCard';
|
|
5
3
|
export interface WaykeSearchProps {
|
|
6
|
-
|
|
4
|
+
/** The filters to show, in this order. By default all filters. */
|
|
7
5
|
filterList?: SearchFilterTypes[];
|
|
6
|
+
/** Filters applied when the search loads. */
|
|
8
7
|
initialQueryParams?: URLSearchParams | string;
|
|
9
8
|
removeSearchBar?: boolean;
|
|
10
9
|
removeFilterOptions?: boolean;
|
|
10
|
+
/** Url to an image for vehicles without images. */
|
|
11
11
|
placeholderImage?: string;
|
|
12
|
-
|
|
13
|
-
pathRoute?: string;
|
|
12
|
+
/** Sets the page title. */
|
|
14
13
|
modifyDocumentTitleSearch?: string;
|
|
14
|
+
/** Shows the branch name on the vehicles. */
|
|
15
15
|
displayBranchName?: boolean;
|
|
16
|
-
onClickSearchItem?: (data: OnItemClick) => void;
|
|
17
16
|
}
|
|
18
|
-
declare const WaykeSearch: ({
|
|
17
|
+
declare const WaykeSearch: ({ filterList, initialQueryParams, removeSearchBar, placeholderImage, removeFilterOptions, modifyDocumentTitleSearch, displayBranchName, }: WaykeSearchProps) => React.JSX.Element;
|
|
19
18
|
export default WaykeSearch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdAccessory } from '../../../Gql/ad/types';
|
|
3
3
|
interface AccesoryModalProps {
|
|
4
|
-
accessory:
|
|
4
|
+
accessory: AdAccessory;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
}
|
|
7
7
|
declare const AccesoryModal: ({ accessory, onClose }: AccesoryModalProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdAccessory } from '../../../Gql/ad/types';
|
|
3
3
|
interface AccessoriesSectionProps {
|
|
4
|
-
accessories
|
|
4
|
+
accessories: AdAccessory[];
|
|
5
5
|
}
|
|
6
6
|
declare const AccessoriesSection: ({ accessories }: AccessoriesSectionProps) => React.JSX.Element | null;
|
|
7
7
|
export default AccessoriesSection;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Ad } from '../../Gql/ad/types';
|
|
3
3
|
interface BranchProps {
|
|
4
|
-
branch
|
|
5
|
-
loading: boolean;
|
|
4
|
+
branch: Ad['branch'];
|
|
6
5
|
displayBranchName?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare const Branch: ({ branch,
|
|
7
|
+
declare const Branch: ({ branch, displayBranchName }: BranchProps) => React.JSX.Element;
|
|
9
8
|
export default Branch;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Branch, ContactOptions, Ecommerce, Manufacturer, PackageOption, VehicleData } from '../../@types/codegen/types';
|
|
3
2
|
import { ConversionOption } from '../../@types/conversion';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
id: string;
|
|
7
|
-
title?: string | null;
|
|
8
|
-
vehicleData?: VehicleData | null;
|
|
3
|
+
interface CheckListProps {
|
|
4
|
+
title: string;
|
|
9
5
|
conversionOptions?: ConversionOption[];
|
|
10
|
-
marketCode?: MarketCode;
|
|
11
|
-
manufacturer?: Manufacturer | null;
|
|
12
|
-
packageOptions: PackageOption[];
|
|
13
|
-
ecommerce?: Ecommerce | null;
|
|
14
|
-
branch?: Branch | null;
|
|
15
|
-
contact?: ContactOptions | null;
|
|
16
|
-
loadingCentralStorageVehicle: boolean;
|
|
17
|
-
availableFrom?: Date | null;
|
|
18
6
|
toggleEcomModal?: () => void;
|
|
19
7
|
}
|
|
20
|
-
declare const CheckList: ({
|
|
8
|
+
declare const CheckList: ({ title, conversionOptions, toggleEcomModal }: CheckListProps) => React.JSX.Element;
|
|
21
9
|
export default CheckList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdDocument } from '../../Gql/ad/types';
|
|
3
3
|
interface DocumentsProps {
|
|
4
|
-
documents:
|
|
4
|
+
documents: AdDocument[];
|
|
5
5
|
}
|
|
6
6
|
declare const Documents: ({ documents }: DocumentsProps) => React.JSX.Element | null;
|
|
7
7
|
export default Documents;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PackageOffer } from '../../Gql/ad/view';
|
|
3
3
|
interface ManufacturerPackageOption {
|
|
4
|
-
packageOption?:
|
|
4
|
+
packageOption?: PackageOffer;
|
|
5
5
|
}
|
|
6
6
|
declare const ManufacturerPackageOption: ({ packageOption }: ManufacturerPackageOption) => React.JSX.Element | null;
|
|
7
7
|
export default ManufacturerPackageOption;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PackageOffer } from '../../Gql/ad/view';
|
|
3
3
|
interface PackageOptionsProps {
|
|
4
|
-
packageOptions
|
|
4
|
+
packageOptions: PackageOffer[];
|
|
5
5
|
}
|
|
6
|
-
declare const PackageOptions: ({ packageOptions }: PackageOptionsProps) => React.JSX.Element
|
|
6
|
+
declare const PackageOptions: ({ packageOptions }: PackageOptionsProps) => React.JSX.Element;
|
|
7
7
|
export default PackageOptions;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
interface PropertySetProps {
|
|
4
|
-
propertySet: any;
|
|
5
|
-
vehicleData: VehicleData;
|
|
6
|
-
}
|
|
7
|
-
declare const PropertySet: ({ propertySet, vehicleData }: PropertySetProps) => React.JSX.Element;
|
|
2
|
+
declare const PropertySet: () => React.JSX.Element;
|
|
8
3
|
export default PropertySet;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface RelatedProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
authorizedReseller?: boolean;
|
|
3
|
+
adId: string;
|
|
4
|
+
manufacturer?: string;
|
|
5
|
+
placeholderImage?: string;
|
|
7
6
|
displayBranchName?: boolean;
|
|
8
|
-
onClickSearchItem?: (id: string) => void;
|
|
9
7
|
}
|
|
10
|
-
|
|
8
|
+
/** The latest cars of the same make. */
|
|
9
|
+
declare const Related: ({ adId, manufacturer, placeholderImage, displayBranchName }: RelatedProps) => React.JSX.Element | null;
|
|
11
10
|
export default Related;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConversionOption } from '../../@types/conversion';
|
|
3
|
-
import { MarketCode } from '../../@types/market';
|
|
4
3
|
export interface WaykeSearchItemProps {
|
|
5
|
-
|
|
4
|
+
/** The id of the vehicle. Older ids are resolved, and the url is updated to the new one. */
|
|
6
5
|
id: string;
|
|
7
|
-
|
|
8
|
-
pathRoute?: string;
|
|
6
|
+
/** Keeps the scroll position when the vehicle page opens. By default it scrolls to the top. */
|
|
9
7
|
disableResetScrollOnInit?: boolean;
|
|
8
|
+
/** Url to an image for vehicles without images. */
|
|
10
9
|
placeholderImage?: string;
|
|
10
|
+
/** Sets the page title to the vehicle. */
|
|
11
11
|
modifyDocumentTitleItem?: boolean;
|
|
12
|
+
/** Shows the branch name on related vehicles and where the vehicle is located. */
|
|
12
13
|
displayBranchName?: boolean;
|
|
14
|
+
/** The buttons on the vehicle page. */
|
|
13
15
|
conversionOptions?: ConversionOption[];
|
|
14
|
-
onClickSearchItem?: (id: string) => void;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
/** The vehicle page. */
|
|
18
|
+
declare const WaykeSearchItem: ({ id, disableResetScrollOnInit, ...props }: WaykeSearchItemProps) => React.JSX.Element;
|
|
17
19
|
export default WaykeSearchItem;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Ad } from '../../Gql/ad/types';
|
|
2
|
+
import { Settings } from '../../State/Settings/settings';
|
|
3
3
|
interface EcomWeb {
|
|
4
4
|
start: () => void;
|
|
5
5
|
destroy: () => void;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Buy online. ecom-web is keyed on the legacy waykeId: the commerce order flow
|
|
9
|
+
* answers 404 on ad.id for ads from before ads-service.
|
|
10
|
+
*/
|
|
11
|
+
declare function useEcom(ad: Ad, ecom: Settings['ecom'], marketCode: Settings['marketCode']): import("react").RefObject<EcomWeb | undefined>;
|
|
8
12
|
export default useEcom;
|