@wayke-se/components-react 2.11.0 → 2.15.0
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/dist-node/index.js +941 -2922
- package/dist-node/index.js.map +1 -1
- package/dist-src/components/Ecom/index.js +1 -1
- package/dist-src/components/Gallery/index.js +1 -1
- package/dist-src/components/InputCheckbox/index.js +1 -1
- package/dist-src/components/InputCheckbox/wrapper.js +2 -2
- package/dist-src/components/Page/index.js +1 -7
- package/dist-src/components/Pdf/index.js +11 -0
- package/dist-src/components/Pdf/wrapper.js +55 -0
- package/dist-src/components/RangeSlider/RangeSliderSimple.js +1 -1
- package/dist-src/components/RangeSlider/handle.js +2 -2
- package/dist-src/components/RangeSlider/index.js +1 -1
- package/dist-src/components/RangeSlider/track.js +2 -2
- package/dist-src/layouts/WaykeCompositeWithProvider.js +2 -2
- package/dist-src/layouts/searchItem/ManufacturerPackagesOption.js +1 -1
- package/dist-src/layouts/searchItem/MetadataItem.js +2 -2
- package/dist-src/layouts/searchItem/PackageOptionModal.js +1 -1
- package/dist-src/layouts/searchItem/PackageOptions.js +1 -1
- package/dist-src/layouts/searchItem/index.js +10 -1
- package/dist-src/queries/SEARCH_ITEM_QUERY.js +1 -0
- package/dist-src/utils/phonenumbers.js +1 -1
- package/dist-types/@types/codegen/types.d.ts +57 -42
- package/dist-types/components/Page/index.d.ts +1 -1
- package/dist-types/components/Pdf/index.d.ts +11 -0
- package/dist-types/components/Pdf/wrapper.d.ts +11 -0
- package/dist-types/index.d.ts +14 -8
- package/dist-web/index.js +89 -23
- package/dist-web/index.js.map +1 -1
- package/package.json +40 -40
|
@@ -43,6 +43,6 @@ const Ecom = ({ vehicle, manufacturer, onExit, onUserEvent }) => {
|
|
|
43
43
|
useBankId: ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.useBankId,
|
|
44
44
|
displayBankIdAlert: ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.displayBankIdAlert,
|
|
45
45
|
};
|
|
46
|
-
return React.createElement(EcomBase,
|
|
46
|
+
return React.createElement(EcomBase, { ...ecomData });
|
|
47
47
|
};
|
|
48
48
|
export default Ecom;
|
|
@@ -88,7 +88,7 @@ const Gallery = ({ media, placeholderImage }) => {
|
|
|
88
88
|
React.createElement(Wrapper, null,
|
|
89
89
|
React.createElement(Main, null,
|
|
90
90
|
React.createElement(SliderWrapper, { onMouseDown: onMouseDown, onMouseMove: onMouseMove, onClick: onClick },
|
|
91
|
-
React.createElement(Slider,
|
|
91
|
+
React.createElement(Slider, { ...sliderSettings, swipe: !navigationDisabled, touchMove: !navigationDisabled, swipeToSlide: !navigationDisabled, ref: slider, beforeChange: beforeChange }, !!(media === null || media === void 0 ? void 0 : media.length) ? (media.map((m, i) => {
|
|
92
92
|
var _a;
|
|
93
93
|
return (React.createElement(Item, { key: m.files[0].url || i },
|
|
94
94
|
m.type === 'image' && (React.createElement(Image, { src: (_a = m.files[0].formats.filter(notEmpty).find((x) => x.format === '1170x')) === null || _a === void 0 ? void 0 : _a.url, alt: `Bild ${i + 1}` })),
|
|
@@ -3,7 +3,7 @@ import { Input, Label, LabelText, Wrapper } from './wrapper';
|
|
|
3
3
|
const InputCheckbox = ({ children, ...props }) => {
|
|
4
4
|
const { id } = props;
|
|
5
5
|
return (React.createElement(Wrapper, { "aria-labelledby": id ? `${id}-label` : undefined },
|
|
6
|
-
React.createElement(Input,
|
|
6
|
+
React.createElement(Input, { ...props }),
|
|
7
7
|
React.createElement(Label, { id: `${id}-label`, htmlFor: id },
|
|
8
8
|
React.createElement(LabelText, null, children))));
|
|
9
9
|
};
|
|
@@ -31,7 +31,7 @@ export const Label = styled.label.attrs(() => ({
|
|
|
31
31
|
margin-top: -2px;
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
|
-
export const Wrapper = styled((props) => React.createElement("div",
|
|
34
|
+
export const Wrapper = styled((props) => React.createElement("div", { ...props })).attrs(({ type, checked }) => ({
|
|
35
35
|
role: type || 'checkbox',
|
|
36
36
|
'aria-checked': checked,
|
|
37
37
|
})) `
|
|
@@ -46,7 +46,7 @@ export const Wrapper = styled((props) => React.createElement("div", Object.assig
|
|
|
46
46
|
}
|
|
47
47
|
`}
|
|
48
48
|
`;
|
|
49
|
-
export const Input = styled((props) => (React.createElement("input",
|
|
49
|
+
export const Input = styled((props) => (React.createElement("input", { ...props, className: `${props.checked ? 'checked' : undefined} ${props.className}` }))).attrs(({ type, checked }) => ({
|
|
50
50
|
checked,
|
|
51
51
|
type: type || 'checkbox',
|
|
52
52
|
})) `
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { size } from '../../layout/helpers';
|
|
3
|
-
export const Page = styled.
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
min-height: 100vh;
|
|
7
|
-
min-height: -webkit-fill-available;
|
|
8
|
-
padding-top: ${size(4)};
|
|
9
|
-
`;
|
|
3
|
+
export const Page = styled.div ``;
|
|
10
4
|
export const PageSection = styled.section `
|
|
11
5
|
margin-bottom: ${size(4)};
|
|
12
6
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PdfListItem, PdfSubtitle, PdfTitle, PdfContainer, PdfListInner, PdfLink, PdfColumn, } from './wrapper';
|
|
3
|
+
export const PdfDownloadItem = ({ document }) => (React.createElement(PdfListItem, null,
|
|
4
|
+
React.createElement(PdfListInner, null,
|
|
5
|
+
React.createElement(PdfColumn, null,
|
|
6
|
+
React.createElement(PdfTitle, null, document.name),
|
|
7
|
+
React.createElement(PdfSubtitle, null, document.contentType)),
|
|
8
|
+
React.createElement(PdfColumn, null,
|
|
9
|
+
React.createElement(PdfLink, { href: document.url, rel: "noopener noreferrer nofollow", target: "_blank" }, "\u00D6ppna")))));
|
|
10
|
+
export const PdfDownloadContainer = ({ documents }) => (React.createElement(PdfContainer, null, documents.map((document, i) => (React.createElement(PdfDownloadItem, { key: `${document.url}-${i}`, document: document })))));
|
|
11
|
+
export default PdfDownloadContainer;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 PdfContainer = 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
|
+
`;
|
|
@@ -16,7 +16,7 @@ const RangeSliderSimple = ({ loading, values, domain, steps, unit, formatValues,
|
|
|
16
16
|
return (React.createElement(React.Fragment, null,
|
|
17
17
|
React.createElement(OwnSlider, null,
|
|
18
18
|
React.createElement(Slider, { disabled: loading, mode: 1, step: step, domain: domain, onChange: onChange, onUpdate: onUpdate, values: values, rootStyle: { position: 'relative' } },
|
|
19
|
-
React.createElement(Rail, null, ({ getRailProps }) => React.createElement(Bar,
|
|
19
|
+
React.createElement(Rail, null, ({ getRailProps }) => React.createElement(Bar, { ...getRailProps() })),
|
|
20
20
|
React.createElement(Handles, null, ({ handles, getHandleProps }) => (React.createElement("div", { className: "slider-handles" }, handles.map((handle) => (React.createElement(Handle, { key: handle.id, handle: handle, domain: domain, getHandleProps: getHandleProps })))))),
|
|
21
21
|
React.createElement(Tracks, { right: false }, ({ tracks, getTrackProps }) => (React.createElement("div", { className: "slider-tracks" }, tracks.map(({ id, source, target }) => (React.createElement(Track, { key: id, source: source, target: target, getTrackProps: getTrackProps })))))))),
|
|
22
22
|
false && (React.createElement(RangeSpan, null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Handle as OwnHandle } from './wrapper';
|
|
3
|
-
export const Handle = ({ domain: [min, max], handle: { id, value, percent }, getHandleProps, }) => (React.createElement(OwnHandle,
|
|
3
|
+
export const Handle = ({ domain: [min, max], handle: { id, value, percent }, getHandleProps, }) => (React.createElement(OwnHandle, { role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, style: {
|
|
4
4
|
left: `${percent}%`,
|
|
5
|
-
}
|
|
5
|
+
}, ...getHandleProps(id) }));
|
|
@@ -40,7 +40,7 @@ const RangeSlider = ({ loading, values, domain, steps, unit, formatValues, maxPr
|
|
|
40
40
|
React.createElement(OwnHandle, { role: "slider", "aria-disabled": true, style: { left: '0' } }),
|
|
41
41
|
React.createElement(OwnHandle, { role: "slider", "aria-disabled": true, style: { left: '100%' } })))) : (React.createElement(OwnSlider, null,
|
|
42
42
|
React.createElement(Slider, { disabled: loading, mode: 1, step: step, domain: domain, onChange: onChange, onUpdate: onUpdate, values: values, rootStyle: { position: 'relative' } },
|
|
43
|
-
React.createElement(Rail, null, ({ getRailProps }) => React.createElement(Bar,
|
|
43
|
+
React.createElement(Rail, null, ({ getRailProps }) => React.createElement(Bar, { ...getRailProps() })),
|
|
44
44
|
React.createElement(Handles, null, ({ handles, getHandleProps }) => (React.createElement("div", { className: "slider-handles" }, handles.map((handle) => (React.createElement(Handle, { key: handle.id, handle: handle, domain: domain, getHandleProps: getHandleProps })))))),
|
|
45
45
|
React.createElement(Tracks, { left: false, right: false }, ({ tracks, getTrackProps }) => (React.createElement("div", { className: "slider-tracks" }, tracks.map(({ id, source, target }) => (React.createElement(Track, { key: id, source: source, target: target, getTrackProps: getTrackProps }))))))))),
|
|
46
46
|
React.createElement(RangeSpan, null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Track as OwnTrack } from './wrapper';
|
|
3
|
-
export const Track = ({ source, target, getTrackProps }) => (React.createElement(OwnTrack,
|
|
3
|
+
export const Track = ({ source, target, getTrackProps }) => (React.createElement(OwnTrack, { style: {
|
|
4
4
|
left: `${source.percent}%`,
|
|
5
5
|
width: `${target.percent - source.percent}%`,
|
|
6
|
-
}
|
|
6
|
+
}, ...getTrackProps() }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import WaykeProvider from '../providers/WaykeProvider';
|
|
3
3
|
import WaykeComposite from './WaykeComposite';
|
|
4
|
-
const WaykeCompositeWithProvider = ({ provider, composite }) => (React.createElement(WaykeProvider,
|
|
5
|
-
React.createElement(WaykeComposite,
|
|
4
|
+
const WaykeCompositeWithProvider = ({ provider, composite }) => (React.createElement(WaykeProvider, { ...provider },
|
|
5
|
+
React.createElement(WaykeComposite, { ...composite })));
|
|
6
6
|
export default WaykeCompositeWithProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import marked from 'marked';
|
|
2
|
+
import { marked } from 'marked';
|
|
3
3
|
import { Repeat } from '../../components/Repeat/index';
|
|
4
4
|
import { ProductPageMainSection } from '../../components/ProductPage/index';
|
|
5
5
|
import Content from '../../components/Content/index';
|
|
@@ -2,7 +2,7 @@ import React, { useState, useCallback } from 'react';
|
|
|
2
2
|
import { TableListItem, TableListKey, TableListValue, TableListBooleanPos, TableListBooleanNeg, } from '../../components/TableList/index';
|
|
3
3
|
import { IconCheck, IconCancel } from '../../components/Icon/index';
|
|
4
4
|
import { SrOnly } from '../../components/SrOnly/index';
|
|
5
|
-
import {
|
|
5
|
+
import { ButtonInline } from '../../components/Button/index';
|
|
6
6
|
import Modal from '../../components/Modal/index';
|
|
7
7
|
import Content from '../../components/Content/index';
|
|
8
8
|
const formatValue = (value, unit) => {
|
|
@@ -26,7 +26,7 @@ const MetadataItem = ({ name, hint, value, unit }) => {
|
|
|
26
26
|
const onToggleFoldout = useCallback(() => setFoldout(!foldout), [foldout]);
|
|
27
27
|
const presentedValue = formatValue(value, unit);
|
|
28
28
|
return (React.createElement(TableListItem, null,
|
|
29
|
-
React.createElement(TableListKey, null, hint ? (React.createElement(
|
|
29
|
+
React.createElement(TableListKey, null, hint ? (React.createElement(ButtonInline, { onClick: onToggleFoldout, title: `Mer information om ${name}` }, name)) : (name)),
|
|
30
30
|
React.createElement(TableListValue, null, value !== undefined ? presentedValue : 'Uppgift saknas'),
|
|
31
31
|
hint && foldout && (React.createElement(Modal, { title: name, onClose: onToggleFoldout },
|
|
32
32
|
React.createElement(Content, { dangerouslySetInnerHTML: { __html: hint } })))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import marked from 'marked';
|
|
2
|
+
import { marked } from 'marked';
|
|
3
3
|
import { Repeat } from '../../components/Repeat/index';
|
|
4
4
|
import { ProductPageMainSection } from '../../components/ProductPage/index';
|
|
5
5
|
import Content from '../../components/Content/index';
|
|
@@ -31,6 +31,7 @@ import Page404 from './Page404';
|
|
|
31
31
|
import PageLoading from './PageLoading';
|
|
32
32
|
import PubSub from '../../utils/pubsub/pubsub';
|
|
33
33
|
import Property from './Property';
|
|
34
|
+
import PdfDownloadContainer from '../../components/Pdf/index';
|
|
34
35
|
const WaykeSearchItem = ({ id, hashRoute, pathRoute, disableResetScrollOnInit, placeholderImage, modifyDocumentTitleItem, onClickSearchItem, }) => {
|
|
35
36
|
var _a, _b, _c;
|
|
36
37
|
const [ecomModal, setEcomModal] = useState(false);
|
|
@@ -61,7 +62,7 @@ const WaykeSearchItem = ({ id, hashRoute, pathRoute, disableResetScrollOnInit, p
|
|
|
61
62
|
const { vehicle } = result;
|
|
62
63
|
const contact = centralStorageVehicle === null || centralStorageVehicle === void 0 ? void 0 : centralStorageVehicle.contact;
|
|
63
64
|
const branch = centralStorageVehicle === null || centralStorageVehicle === void 0 ? void 0 : centralStorageVehicle.branch;
|
|
64
|
-
const { title, shortDescription, media, description, price, financialOptions, insuranceOptions, manufacturer, ecommerce, packageOptions, publishedAt, } = vehicle;
|
|
65
|
+
const { title, shortDescription, media, description, price, financialOptions, insuranceOptions, manufacturer, ecommerce, packageOptions, publishedAt, documents, } = vehicle;
|
|
65
66
|
const { fuelType, mileage, gearbox, modelYear, propertySet } = vehicle.data;
|
|
66
67
|
const uspList = [
|
|
67
68
|
{
|
|
@@ -131,6 +132,14 @@ const WaykeSearchItem = ({ id, hashRoute, pathRoute, disableResetScrollOnInit, p
|
|
|
131
132
|
React.createElement(Repeat, null,
|
|
132
133
|
React.createElement(ExtendContent, { actionTitle: "Visa mer", onClick: onShowMoreOptionsClick },
|
|
133
134
|
React.createElement(UspList, { items: options }))))),
|
|
135
|
+
(documents.length || 0) > 0 && (React.createElement(ProductPageMainSection, null,
|
|
136
|
+
React.createElement(Repeat, null,
|
|
137
|
+
React.createElement(H2, { noMargin: true }, "Dokument")),
|
|
138
|
+
React.createElement(Repeat, null,
|
|
139
|
+
React.createElement(Content, null,
|
|
140
|
+
React.createElement("p", null, "Tillh\u00F6rande dokument f\u00F6r bilen."))),
|
|
141
|
+
React.createElement(Repeat, null,
|
|
142
|
+
React.createElement(PdfDownloadContainer, { documents: documents })))),
|
|
134
143
|
React.createElement(ProductPageMainSection, null,
|
|
135
144
|
React.createElement(Branch, { branch: branch, loading: loadingCentralStorageVehicle }),
|
|
136
145
|
ecommerce && ecommerce.enabled && (React.createElement(Repeat, null,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare type Maybe<T> = T | null;
|
|
2
|
+
export declare type InputMaybe<T> = Maybe<T>;
|
|
2
3
|
export declare type Exact<T extends {
|
|
3
4
|
[key: string]: unknown;
|
|
4
5
|
}> = {
|
|
@@ -19,6 +20,11 @@ export declare type Scalars = {
|
|
|
19
20
|
Float: number;
|
|
20
21
|
DateTime: Date;
|
|
21
22
|
Email: string;
|
|
23
|
+
FileDocument: {
|
|
24
|
+
contentType: string;
|
|
25
|
+
name: string;
|
|
26
|
+
url: string;
|
|
27
|
+
};
|
|
22
28
|
PersonalNumber: string;
|
|
23
29
|
PhoneNumber: string;
|
|
24
30
|
Time: string;
|
|
@@ -30,38 +36,38 @@ export declare type Scalars = {
|
|
|
30
36
|
};
|
|
31
37
|
export declare type Branch = {
|
|
32
38
|
__typename?: 'Branch';
|
|
33
|
-
|
|
39
|
+
connections: Array<BranchConnection>;
|
|
40
|
+
contact?: Maybe<ContactOptions>;
|
|
34
41
|
description?: Maybe<Scalars['String']>;
|
|
35
42
|
flags?: Maybe<BranchFlags>;
|
|
36
|
-
name?: Maybe<Scalars['String']>;
|
|
37
|
-
contact?: Maybe<ContactOptions>;
|
|
38
43
|
homepage?: Maybe<Scalars['URL']>;
|
|
44
|
+
id: Scalars['ID'];
|
|
45
|
+
location?: Maybe<Location>;
|
|
39
46
|
logotype?: Maybe<Scalars['URL']>;
|
|
47
|
+
name?: Maybe<Scalars['String']>;
|
|
40
48
|
openingHours?: Maybe<OpeningHours>;
|
|
41
49
|
organization?: Maybe<Organization>;
|
|
42
|
-
location?: Maybe<Location>;
|
|
43
50
|
promos: Array<Promo>;
|
|
44
51
|
services: Array<Service>;
|
|
45
|
-
connections: Array<BranchConnection>;
|
|
46
52
|
};
|
|
47
53
|
export declare type BranchConnection = {
|
|
48
54
|
__typename?: 'BranchConnection';
|
|
49
55
|
id: Scalars['ID'];
|
|
50
|
-
name?: Maybe<Scalars['String']>;
|
|
51
56
|
location?: Maybe<Location>;
|
|
57
|
+
name?: Maybe<Scalars['String']>;
|
|
52
58
|
};
|
|
53
59
|
export declare type BranchFlags = {
|
|
54
60
|
__typename?: 'BranchFlags';
|
|
55
|
-
mrf?: Maybe<Scalars['Boolean']>;
|
|
56
61
|
centralStorage?: Maybe<Scalars['Boolean']>;
|
|
57
62
|
ecommerce?: Maybe<Scalars['Boolean']>;
|
|
63
|
+
mrf?: Maybe<Scalars['Boolean']>;
|
|
58
64
|
};
|
|
59
65
|
export declare type ContactOptions = {
|
|
60
66
|
__typename?: 'ContactOptions';
|
|
61
|
-
|
|
67
|
+
avatar?: Maybe<Scalars['URL']>;
|
|
62
68
|
email?: Maybe<Scalars['Email']>;
|
|
69
|
+
name?: Maybe<Scalars['String']>;
|
|
63
70
|
phonenumber?: Maybe<Scalars['PhoneNumber']>;
|
|
64
|
-
avatar?: Maybe<Scalars['URL']>;
|
|
65
71
|
};
|
|
66
72
|
export declare enum DrivingDistance {
|
|
67
73
|
Between0And1000 = "BETWEEN0AND1000",
|
|
@@ -74,8 +80,8 @@ export declare type Ecommerce = {
|
|
|
74
80
|
__typename?: 'Ecommerce';
|
|
75
81
|
enabled?: Maybe<Scalars['Boolean']>;
|
|
76
82
|
reserved?: Maybe<Scalars['Boolean']>;
|
|
77
|
-
withTradeIn?: Maybe<Scalars['Boolean']>;
|
|
78
83
|
withHomeDelivery?: Maybe<Scalars['Boolean']>;
|
|
84
|
+
withTradeIn?: Maybe<Scalars['Boolean']>;
|
|
79
85
|
};
|
|
80
86
|
export declare type FinancialOption = {
|
|
81
87
|
__typename?: 'FinancialOption';
|
|
@@ -122,30 +128,30 @@ export declare type HoursOpen = {
|
|
|
122
128
|
};
|
|
123
129
|
export declare type Insurance = {
|
|
124
130
|
__typename?: 'Insurance';
|
|
125
|
-
name: Scalars['String'];
|
|
126
|
-
price: Scalars['Float'];
|
|
127
|
-
unit: Scalars['String'];
|
|
128
|
-
description: Scalars['String'];
|
|
129
|
-
logotype?: Maybe<Scalars['URL']>;
|
|
130
131
|
addons: Array<InsuranceAddon>;
|
|
132
|
+
description: Scalars['String'];
|
|
131
133
|
items: Array<InsuranceItem>;
|
|
132
134
|
legality?: Maybe<InsuranceLegality>;
|
|
135
|
+
logotype?: Maybe<Scalars['URL']>;
|
|
136
|
+
name: Scalars['String'];
|
|
137
|
+
price: Scalars['Float'];
|
|
133
138
|
terms?: Maybe<Scalars['URL']>;
|
|
139
|
+
unit: Scalars['String'];
|
|
134
140
|
url?: Maybe<Scalars['URL']>;
|
|
135
141
|
};
|
|
136
142
|
export declare type InsuranceAddon = {
|
|
137
143
|
__typename?: 'InsuranceAddon';
|
|
138
|
-
id: Scalars['ID'];
|
|
139
|
-
title?: Maybe<Scalars['String']>;
|
|
140
144
|
description?: Maybe<Scalars['String']>;
|
|
145
|
+
exclusions: Array<Scalars['String']>;
|
|
146
|
+
id: Scalars['ID'];
|
|
141
147
|
price: Scalars['Float'];
|
|
148
|
+
title?: Maybe<Scalars['String']>;
|
|
142
149
|
unit: Scalars['String'];
|
|
143
|
-
exclusions: Array<Scalars['String']>;
|
|
144
150
|
};
|
|
145
151
|
export declare type InsuranceItem = {
|
|
146
152
|
__typename?: 'InsuranceItem';
|
|
147
|
-
name?: Maybe<Scalars['String']>;
|
|
148
153
|
description?: Maybe<Scalars['String']>;
|
|
154
|
+
name?: Maybe<Scalars['String']>;
|
|
149
155
|
};
|
|
150
156
|
export declare type InsuranceLegality = {
|
|
151
157
|
__typename?: 'InsuranceLegality';
|
|
@@ -169,9 +175,9 @@ export declare type Location = {
|
|
|
169
175
|
__typename?: 'Location';
|
|
170
176
|
city?: Maybe<Scalars['String']>;
|
|
171
177
|
county?: Maybe<Scalars['String']>;
|
|
172
|
-
streetAddress?: Maybe<Scalars['String']>;
|
|
173
|
-
postalCode?: Maybe<Scalars['String']>;
|
|
174
178
|
position?: Maybe<Position>;
|
|
179
|
+
postalCode?: Maybe<Scalars['String']>;
|
|
180
|
+
streetAddress?: Maybe<Scalars['String']>;
|
|
175
181
|
};
|
|
176
182
|
export declare type Manufacturer = {
|
|
177
183
|
__typename?: 'Manufacturer';
|
|
@@ -182,8 +188,8 @@ export declare type Manufacturer = {
|
|
|
182
188
|
};
|
|
183
189
|
export declare type Media = {
|
|
184
190
|
__typename?: 'Media';
|
|
185
|
-
type: Scalars['String'];
|
|
186
191
|
files: Array<MediaFile>;
|
|
192
|
+
type: Scalars['String'];
|
|
187
193
|
};
|
|
188
194
|
export declare type MediaFile = {
|
|
189
195
|
__typename?: 'MediaFile';
|
|
@@ -197,17 +203,24 @@ export declare type MediaFileFormat = {
|
|
|
197
203
|
};
|
|
198
204
|
export declare type OpeningHours = {
|
|
199
205
|
__typename?: 'OpeningHours';
|
|
200
|
-
monday?: Maybe<HoursOpen>;
|
|
201
|
-
tuesday?: Maybe<HoursOpen>;
|
|
202
|
-
wednesday?: Maybe<HoursOpen>;
|
|
203
|
-
thursday?: Maybe<HoursOpen>;
|
|
204
206
|
friday?: Maybe<HoursOpen>;
|
|
207
|
+
monday?: Maybe<HoursOpen>;
|
|
205
208
|
saturday?: Maybe<HoursOpen>;
|
|
206
209
|
sunday?: Maybe<HoursOpen>;
|
|
210
|
+
thursday?: Maybe<HoursOpen>;
|
|
211
|
+
tuesday?: Maybe<HoursOpen>;
|
|
212
|
+
wednesday?: Maybe<HoursOpen>;
|
|
207
213
|
};
|
|
208
214
|
export declare type Organization = {
|
|
209
215
|
__typename?: 'Organization';
|
|
210
216
|
branches: Array<Maybe<Branch>>;
|
|
217
|
+
contact?: Maybe<ContactOptions>;
|
|
218
|
+
description?: Maybe<Scalars['String']>;
|
|
219
|
+
flags?: Maybe<BranchFlags>;
|
|
220
|
+
homepage?: Maybe<Scalars['URL']>;
|
|
221
|
+
id: Scalars['ID'];
|
|
222
|
+
logotype?: Maybe<Scalars['URL']>;
|
|
223
|
+
name?: Maybe<Scalars['String']>;
|
|
211
224
|
parent?: Maybe<Branch>;
|
|
212
225
|
};
|
|
213
226
|
export declare type PackageOption = {
|
|
@@ -231,35 +244,36 @@ export declare type Promo = {
|
|
|
231
244
|
};
|
|
232
245
|
export declare type Query = {
|
|
233
246
|
__typename?: 'Query';
|
|
234
|
-
vehicle?: Maybe<Vehicle>;
|
|
235
247
|
branch?: Maybe<Branch>;
|
|
236
|
-
loan?: Maybe<FinancialOption>;
|
|
237
248
|
insurances: Array<Insurance>;
|
|
249
|
+
loan?: Maybe<FinancialOption>;
|
|
250
|
+
vehicle?: Maybe<Vehicle>;
|
|
238
251
|
};
|
|
239
|
-
export declare type
|
|
252
|
+
export declare type QueryBranchArgs = {
|
|
240
253
|
id: Scalars['ID'];
|
|
241
|
-
branch?: Maybe<Scalars['ID']>;
|
|
242
254
|
};
|
|
243
|
-
export declare type
|
|
255
|
+
export declare type QueryInsurancesArgs = {
|
|
256
|
+
drivingDistance: DrivingDistance;
|
|
244
257
|
id: Scalars['ID'];
|
|
258
|
+
personalNumber: Scalars['PersonalNumber'];
|
|
245
259
|
};
|
|
246
260
|
export declare type QueryLoanArgs = {
|
|
247
|
-
|
|
248
|
-
duration: Scalars['Int'];
|
|
261
|
+
branch?: InputMaybe<Scalars['ID']>;
|
|
249
262
|
downPayment: Scalars['Int'];
|
|
263
|
+
duration: Scalars['Int'];
|
|
264
|
+
id: Scalars['ID'];
|
|
250
265
|
residual: Scalars['Float'];
|
|
251
266
|
};
|
|
252
|
-
export declare type
|
|
267
|
+
export declare type QueryVehicleArgs = {
|
|
268
|
+
branch?: InputMaybe<Scalars['ID']>;
|
|
253
269
|
id: Scalars['ID'];
|
|
254
|
-
personalNumber: Scalars['PersonalNumber'];
|
|
255
|
-
drivingDistance: DrivingDistance;
|
|
256
270
|
};
|
|
257
271
|
export declare type SafetyOption = {
|
|
258
272
|
__typename?: 'SafetyOption';
|
|
259
273
|
content?: Maybe<Scalars['String']>;
|
|
274
|
+
image?: Maybe<Scalars['URL']>;
|
|
260
275
|
name?: Maybe<Scalars['String']>;
|
|
261
276
|
title?: Maybe<Scalars['String']>;
|
|
262
|
-
image?: Maybe<Scalars['URL']>;
|
|
263
277
|
};
|
|
264
278
|
export declare type Service = {
|
|
265
279
|
__typename?: 'Service';
|
|
@@ -268,22 +282,23 @@ export declare type Service = {
|
|
|
268
282
|
};
|
|
269
283
|
export declare type Vehicle = {
|
|
270
284
|
__typename?: 'Vehicle';
|
|
271
|
-
id: Scalars['ID'];
|
|
272
285
|
branch?: Maybe<Branch>;
|
|
273
286
|
contact?: Maybe<ContactOptions>;
|
|
274
287
|
data: VehicleData;
|
|
275
288
|
description?: Maybe<Scalars['String']>;
|
|
276
289
|
discount?: Maybe<Scalars['Float']>;
|
|
290
|
+
documents: Array<Scalars['FileDocument']>;
|
|
277
291
|
ecommerce?: Maybe<Ecommerce>;
|
|
278
292
|
financialOptions: Array<FinancialOption>;
|
|
279
293
|
flags?: Maybe<VehicleFlags>;
|
|
294
|
+
id: Scalars['ID'];
|
|
280
295
|
insuranceOptions: Array<InsuranceOption>;
|
|
281
|
-
|
|
296
|
+
location?: Maybe<Location>;
|
|
282
297
|
manufacturer?: Maybe<Manufacturer>;
|
|
283
298
|
media: Array<Media>;
|
|
284
|
-
location?: Maybe<Location>;
|
|
285
299
|
packageOptions: Array<PackageOption>;
|
|
286
300
|
price: Scalars['Float'];
|
|
301
|
+
publishedAt?: Maybe<Scalars['DateTime']>;
|
|
287
302
|
safety: Array<SafetyOption>;
|
|
288
303
|
shortDescription?: Maybe<Scalars['String']>;
|
|
289
304
|
title: Scalars['String'];
|
|
@@ -309,8 +324,8 @@ export declare type VehicleData = {
|
|
|
309
324
|
vin?: Maybe<Scalars['String']>;
|
|
310
325
|
};
|
|
311
326
|
export declare type VehicleDataPropertySetArgs = {
|
|
312
|
-
|
|
313
|
-
|
|
327
|
+
category?: InputMaybe<Scalars['String']>;
|
|
328
|
+
properties?: InputMaybe<Array<Scalars['String']>>;
|
|
314
329
|
};
|
|
315
330
|
export declare type VehicleFlags = {
|
|
316
331
|
__typename?: 'VehicleFlags';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Page: import("styled-components").StyledComponent<"
|
|
2
|
+
export declare const Page: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export declare const PageSection: import("styled-components").StyledComponent<"section", import("styled-components").DefaultTheme, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
accent?: boolean | undefined;
|
|
5
5
|
large?: boolean | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Scalars } from '../../@types/codegen/types';
|
|
3
|
+
interface PdfDownloadItemProps {
|
|
4
|
+
document: Scalars['FileDocument'];
|
|
5
|
+
}
|
|
6
|
+
export declare const PdfDownloadItem: ({ document }: PdfDownloadItemProps) => JSX.Element;
|
|
7
|
+
interface PdfDownloadContainerProps {
|
|
8
|
+
documents: Scalars['FileDocument'][];
|
|
9
|
+
}
|
|
10
|
+
export declare const PdfDownloadContainer: ({ documents }: PdfDownloadContainerProps) => JSX.Element;
|
|
11
|
+
export default PdfDownloadContainer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const PdfListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
|
|
2
|
+
className: "wayke__theme wayke__color--primary-text";
|
|
3
|
+
}, "className">;
|
|
4
|
+
export declare const PdfContainer: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const PdfLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {
|
|
6
|
+
className: "wayke__theme wayke__color--primary-text wayke__font--bold";
|
|
7
|
+
}, "className">;
|
|
8
|
+
export declare const PdfTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const PdfSubtitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const PdfColumn: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const PdfListInner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import WaykeSearch
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import WaykeSearch from './layouts/search/index';
|
|
2
|
+
import type { WaykeSearchProps } from './layouts/search/index';
|
|
3
|
+
import WaykeSearchItem from './layouts/searchItem/index';
|
|
4
|
+
import type { WaykeSearchItemProps } from './layouts/searchItem/index';
|
|
5
|
+
import WaykeProvider from './providers/WaykeProvider';
|
|
6
|
+
import type { WaykeProviderSettings } from './providers/WaykeProvider';
|
|
7
|
+
import WaykeComposite from './layouts/WaykeCompositeWithProvider';
|
|
8
|
+
import type { WaykeCompositeWithProviderProps } from './layouts/WaykeCompositeWithProvider';
|
|
5
9
|
import SearchBar from './components/SearchBar/index';
|
|
6
10
|
import WaykeThemeProvider from './providers/themeProvider';
|
|
7
|
-
import WaykeItemProvider
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
+
import WaykeItemProvider from './providers/WaykeItemProvidet';
|
|
12
|
+
import type { WaykeItemProviderSettings } from './providers/WaykeItemProvidet';
|
|
13
|
+
import WaykePubSub from './utils/pubsub/pubsub';
|
|
14
|
+
import type { EventSubscriptions } from './utils/pubsub/pubsub';
|
|
15
|
+
import type { SearchFilterTypes, SearchFilterNameTypes } from './@types/filter';
|
|
16
|
+
import type { EventHashRouteChange, EventItemClicked, EventEcomOnInit, EventEcomOnUser, EventEcomOnExit, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventFinanceInterest, EventAll, EventType, EventNames, CallbackHashRouteChange, CallbackEventItemClicked, CallbackEcomOnUserEvent, CallbackEmpty } from './utils/pubsub/Events';
|
|
11
17
|
export { WaykeProvider, WaykeItemProvider, WaykeSearch, WaykeSearchItem, SearchBar, WaykeThemeProvider, WaykeItemProviderSettings, WaykePubSub, WaykeCompositeWithProviderProps, WaykeProviderSettings, WaykeSearchProps, WaykeSearchItemProps, SearchFilterTypes, SearchFilterNameTypes, EventSubscriptions, EventHashRouteChange, EventItemClicked, EventEcomOnInit, EventEcomOnUser, EventEcomOnExit, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventFinanceInterest, EventAll, EventType, EventNames, CallbackHashRouteChange, CallbackEventItemClicked, CallbackEcomOnUserEvent, CallbackEmpty, };
|
|
12
18
|
export default WaykeComposite;
|