@wayke-se/components-react 3.5.1 → 3.5.2
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 +23 -5
- package/dist-node/index.js.map +1 -1
- package/dist-src/components/FinancialOptions/index.js +1 -1
- package/dist-src/components/FinancialOptions/leasing.js +7 -6
- package/dist-types/@types/codegen/types.d.ts +42 -42
- package/dist-types/@types/filter.d.ts +2 -2
- package/dist-types/State/Path/reducer.d.ts +2 -2
- package/dist-types/components/Content/index.d.ts +1 -1
- package/dist-types/components/Icon/index.d.ts +2 -2
- package/dist-types/components/InputCheckbox/index.d.ts +1 -1
- package/dist-types/components/InputSearch/index.d.ts +2 -2
- package/dist-types/components/InputText/index.d.ts +1 -1
- package/dist-types/components/Sphere/Sphere.d.ts +1 -1
- package/dist-types/components/Sphere/SphereLightbox.d.ts +1 -1
- package/dist-types/components/Sphere/SphereViewer.d.ts +1 -1
- package/dist-types/components/ThreeSixty/Rotation.d.ts +1 -1
- package/dist-types/components/ThreeSixty/ThreeSixtLightbox.d.ts +1 -1
- package/dist-types/components/ThreeSixty/ThreeSixty.d.ts +1 -1
- package/dist-types/components/Video/CustomPlayer.d.ts +1 -1
- package/dist-types/components/Video/EmbeddedVideoLightbox.d.ts +1 -1
- package/dist-types/components/Video/VimeoPlayer.d.ts +1 -1
- package/dist-types/components/Video/YoutubePlayer.d.ts +1 -1
- package/dist-types/layout/theme.d.ts +1 -1
- package/dist-types/layouts/WaykeComposite.d.ts +1 -1
- package/dist-types/providers/WaykeItemProvidet.d.ts +1 -1
- package/dist-types/providers/WaykeProvider.d.ts +1 -1
- package/dist-types/utils/pubsub/Actions.d.ts +5 -5
- package/dist-types/utils/pubsub/Events.d.ts +7 -7
- package/dist-types/utils/pubsub/pubsub.d.ts +2 -2
- package/dist-types/utils/sortOptions.d.ts +1 -1
- package/dist-types/utils/specification.d.ts +1 -1
- package/dist-web/index.js +8 -7
- package/dist-web/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,6 @@ const FinancialOptions = ({ id, financialOptions }) => (React.createElement(Repe
|
|
|
7
7
|
React.createElement(RepeatTiny, null,
|
|
8
8
|
React.createElement(VisualHeading, null, "Andra finansieringsalternativ")),
|
|
9
9
|
React.createElement(RepeatTiny, null, financialOptions.map((financialOption, index) => (React.createElement(Fragment, { key: index },
|
|
10
|
-
financialOption.type === 'leasing' && React.createElement(Leasing, { financialOption: financialOption }),
|
|
10
|
+
(financialOption.type === 'leasing' || financialOption.type === 'business-leasing') && (React.createElement(Leasing, { financialOption: financialOption })),
|
|
11
11
|
financialOption.type === 'loan' && React.createElement(Loan, { id: id, financialOption: financialOption })))))));
|
|
12
12
|
export default FinancialOptions;
|
|
@@ -11,10 +11,11 @@ import DataList from '../DataList/index';
|
|
|
11
11
|
const Leasing = ({ financialOption }) => {
|
|
12
12
|
const [modal, setModal] = useState(false);
|
|
13
13
|
const toggleModal = useCallback(() => setModal(!modal), [modal]);
|
|
14
|
-
const { image, description, monthlyCost, duration, mileage } = financialOption;
|
|
14
|
+
const { image, description, monthlyCost, duration, mileage, type, name } = financialOption;
|
|
15
|
+
const title = type === 'leasing' ? 'Privatleasa' : type === 'business-leasing' ? 'Företagsleasa' : type;
|
|
15
16
|
return (React.createElement(React.Fragment, null,
|
|
16
|
-
modal && (React.createElement(Modal, { title:
|
|
17
|
-
image && React.createElement(Image, { src: image, alt:
|
|
17
|
+
modal && (React.createElement(Modal, { title: title, onClose: toggleModal },
|
|
18
|
+
image && React.createElement(Image, { src: image, alt: title }),
|
|
18
19
|
description && React.createElement(Content, { dangerouslySetInnerHTML: { __html: description } }),
|
|
19
20
|
React.createElement(ModalFoldout, null,
|
|
20
21
|
React.createElement(ModalFoldoutBody, null,
|
|
@@ -36,7 +37,7 @@ const Leasing = ({ financialOption }) => {
|
|
|
36
37
|
React.createElement(React.Fragment, null, monthlyCost !== null && monthlyCost !== undefined && (React.createElement(OptionBoxHeading, null, `ca ${numberSeparator(monthlyCost)} kr/mån`))),
|
|
37
38
|
React.createElement(OptionBoxContent, null,
|
|
38
39
|
React.createElement("p", null,
|
|
39
|
-
|
|
40
|
+
title,
|
|
40
41
|
' ',
|
|
41
42
|
mileage?.current && duration?.current && (React.createElement(React.Fragment, null,
|
|
42
43
|
React.createElement(UtilityTextPrimary, null,
|
|
@@ -49,7 +50,7 @@ const Leasing = ({ financialOption }) => {
|
|
|
49
50
|
" m\u00E5n"),
|
|
50
51
|
".",
|
|
51
52
|
' '))),
|
|
52
|
-
React.createElement("p", null,
|
|
53
|
-
React.createElement(ButtonInline, { onClick: toggleModal }, "L\u00E4s mer"))))));
|
|
53
|
+
name && (React.createElement("p", null,
|
|
54
|
+
React.createElement(ButtonInline, { onClick: toggleModal }, "L\u00E4s mer")))))));
|
|
54
55
|
};
|
|
55
56
|
export default Leasing;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type Maybe<T> = T | null;
|
|
2
|
+
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
+
export type Exact<T extends {
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
}> = {
|
|
6
6
|
[K in keyof T]: T[K];
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
9
|
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
12
|
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
13
|
};
|
|
14
14
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
15
|
-
export
|
|
15
|
+
export type Scalars = {
|
|
16
16
|
ID: string;
|
|
17
17
|
String: string;
|
|
18
18
|
Boolean: boolean;
|
|
@@ -36,7 +36,7 @@ export declare type Scalars = {
|
|
|
36
36
|
};
|
|
37
37
|
VehicleDataPropertySet: any;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type Branch = {
|
|
40
40
|
__typename?: 'Branch';
|
|
41
41
|
connections: Array<BranchConnection>;
|
|
42
42
|
contact?: Maybe<ContactOptions>;
|
|
@@ -52,20 +52,20 @@ export declare type Branch = {
|
|
|
52
52
|
promos: Array<Promo>;
|
|
53
53
|
services: Array<Service>;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type BranchConnection = {
|
|
56
56
|
__typename?: 'BranchConnection';
|
|
57
57
|
id: Scalars['ID'];
|
|
58
58
|
location?: Maybe<Location>;
|
|
59
59
|
name?: Maybe<Scalars['String']>;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type BranchFlags = {
|
|
62
62
|
__typename?: 'BranchFlags';
|
|
63
63
|
authorizedReseller?: Maybe<Scalars['Boolean']>;
|
|
64
64
|
centralStorage?: Maybe<Scalars['Boolean']>;
|
|
65
65
|
ecommerce?: Maybe<Scalars['Boolean']>;
|
|
66
66
|
mrf?: Maybe<Scalars['Boolean']>;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type ContactOptions = {
|
|
69
69
|
__typename?: 'ContactOptions';
|
|
70
70
|
avatar?: Maybe<Scalars['URL']>;
|
|
71
71
|
email?: Maybe<Scalars['Email']>;
|
|
@@ -79,14 +79,14 @@ export declare enum DrivingDistance {
|
|
|
79
79
|
Between2000And2500 = "BETWEEN2000AND2500",
|
|
80
80
|
Over2500 = "OVER2500"
|
|
81
81
|
}
|
|
82
|
-
export
|
|
82
|
+
export type Ecommerce = {
|
|
83
83
|
__typename?: 'Ecommerce';
|
|
84
84
|
enabled?: Maybe<Scalars['Boolean']>;
|
|
85
85
|
reserved?: Maybe<Scalars['Boolean']>;
|
|
86
86
|
withHomeDelivery?: Maybe<Scalars['Boolean']>;
|
|
87
87
|
withTradeIn?: Maybe<Scalars['Boolean']>;
|
|
88
88
|
};
|
|
89
|
-
export
|
|
89
|
+
export type FinancialOption = {
|
|
90
90
|
__typename?: 'FinancialOption';
|
|
91
91
|
administrationFee?: Maybe<Scalars['Float']>;
|
|
92
92
|
description?: Maybe<Scalars['String']>;
|
|
@@ -111,7 +111,7 @@ export declare type FinancialOption = {
|
|
|
111
111
|
type: Scalars['String'];
|
|
112
112
|
url?: Maybe<Scalars['URL']>;
|
|
113
113
|
};
|
|
114
|
-
export
|
|
114
|
+
export type FinancialOptionDetail = {
|
|
115
115
|
__typename?: 'FinancialOptionDetail';
|
|
116
116
|
current: Scalars['Float'];
|
|
117
117
|
default: Scalars['Float'];
|
|
@@ -124,12 +124,12 @@ export declare enum FinancialOptionInclusion {
|
|
|
124
124
|
IncludesService = "INCLUDES_SERVICE",
|
|
125
125
|
IncludesWintertires = "INCLUDES_WINTERTIRES"
|
|
126
126
|
}
|
|
127
|
-
export
|
|
127
|
+
export type HoursOpen = {
|
|
128
128
|
__typename?: 'HoursOpen';
|
|
129
129
|
from?: Maybe<Scalars['Time']>;
|
|
130
130
|
until?: Maybe<Scalars['Time']>;
|
|
131
131
|
};
|
|
132
|
-
export
|
|
132
|
+
export type Insurance = {
|
|
133
133
|
__typename?: 'Insurance';
|
|
134
134
|
addons: Array<InsuranceAddon>;
|
|
135
135
|
description: Scalars['String'];
|
|
@@ -142,7 +142,7 @@ export declare type Insurance = {
|
|
|
142
142
|
unit: Scalars['String'];
|
|
143
143
|
url?: Maybe<Scalars['URL']>;
|
|
144
144
|
};
|
|
145
|
-
export
|
|
145
|
+
export type InsuranceAddon = {
|
|
146
146
|
__typename?: 'InsuranceAddon';
|
|
147
147
|
description?: Maybe<Scalars['String']>;
|
|
148
148
|
exclusions: Array<Scalars['String']>;
|
|
@@ -151,17 +151,17 @@ export declare type InsuranceAddon = {
|
|
|
151
151
|
title?: Maybe<Scalars['String']>;
|
|
152
152
|
unit: Scalars['String'];
|
|
153
153
|
};
|
|
154
|
-
export
|
|
154
|
+
export type InsuranceItem = {
|
|
155
155
|
__typename?: 'InsuranceItem';
|
|
156
156
|
description?: Maybe<Scalars['String']>;
|
|
157
157
|
name?: Maybe<Scalars['String']>;
|
|
158
158
|
};
|
|
159
|
-
export
|
|
159
|
+
export type InsuranceLegality = {
|
|
160
160
|
__typename?: 'InsuranceLegality';
|
|
161
161
|
description?: Maybe<Scalars['String']>;
|
|
162
162
|
url?: Maybe<Scalars['URL']>;
|
|
163
163
|
};
|
|
164
|
-
export
|
|
164
|
+
export type InsuranceOption = {
|
|
165
165
|
__typename?: 'InsuranceOption';
|
|
166
166
|
description?: Maybe<Scalars['String']>;
|
|
167
167
|
identifier?: Maybe<Scalars['String']>;
|
|
@@ -177,12 +177,12 @@ export declare type InsuranceOption = {
|
|
|
177
177
|
terms?: Maybe<Scalars['URL']>;
|
|
178
178
|
url?: Maybe<Scalars['URL']>;
|
|
179
179
|
};
|
|
180
|
-
export
|
|
180
|
+
export type Link = {
|
|
181
181
|
__typename?: 'Link';
|
|
182
182
|
title?: Maybe<Scalars['String']>;
|
|
183
183
|
url?: Maybe<Scalars['URL']>;
|
|
184
184
|
};
|
|
185
|
-
export
|
|
185
|
+
export type Location = {
|
|
186
186
|
__typename?: 'Location';
|
|
187
187
|
city?: Maybe<Scalars['String']>;
|
|
188
188
|
county?: Maybe<Scalars['String']>;
|
|
@@ -190,29 +190,29 @@ export declare type Location = {
|
|
|
190
190
|
postalCode?: Maybe<Scalars['String']>;
|
|
191
191
|
streetAddress?: Maybe<Scalars['String']>;
|
|
192
192
|
};
|
|
193
|
-
export
|
|
193
|
+
export type Manufacturer = {
|
|
194
194
|
__typename?: 'Manufacturer';
|
|
195
195
|
description?: Maybe<Scalars['String']>;
|
|
196
196
|
logotype?: Maybe<Scalars['URL']>;
|
|
197
197
|
name: Scalars['String'];
|
|
198
198
|
packageOption?: Maybe<PackageOption>;
|
|
199
199
|
};
|
|
200
|
-
export
|
|
200
|
+
export type Media = {
|
|
201
201
|
__typename?: 'Media';
|
|
202
202
|
files: Array<MediaFile>;
|
|
203
203
|
type: Scalars['String'];
|
|
204
204
|
};
|
|
205
|
-
export
|
|
205
|
+
export type MediaFile = {
|
|
206
206
|
__typename?: 'MediaFile';
|
|
207
207
|
formats: Array<Maybe<MediaFileFormat>>;
|
|
208
208
|
url: Scalars['URL'];
|
|
209
209
|
};
|
|
210
|
-
export
|
|
210
|
+
export type MediaFileFormat = {
|
|
211
211
|
__typename?: 'MediaFileFormat';
|
|
212
212
|
format: Scalars['String'];
|
|
213
213
|
url: Scalars['URL'];
|
|
214
214
|
};
|
|
215
|
-
export
|
|
215
|
+
export type OpeningHours = {
|
|
216
216
|
__typename?: 'OpeningHours';
|
|
217
217
|
friday?: Maybe<HoursOpen>;
|
|
218
218
|
monday?: Maybe<HoursOpen>;
|
|
@@ -222,7 +222,7 @@ export declare type OpeningHours = {
|
|
|
222
222
|
tuesday?: Maybe<HoursOpen>;
|
|
223
223
|
wednesday?: Maybe<HoursOpen>;
|
|
224
224
|
};
|
|
225
|
-
export
|
|
225
|
+
export type Organization = {
|
|
226
226
|
__typename?: 'Organization';
|
|
227
227
|
branches: Array<Maybe<Branch>>;
|
|
228
228
|
contact?: Maybe<ContactOptions>;
|
|
@@ -234,65 +234,65 @@ export declare type Organization = {
|
|
|
234
234
|
name?: Maybe<Scalars['String']>;
|
|
235
235
|
parent?: Maybe<Branch>;
|
|
236
236
|
};
|
|
237
|
-
export
|
|
237
|
+
export type PackageOption = {
|
|
238
238
|
__typename?: 'PackageOption';
|
|
239
239
|
description?: Maybe<Scalars['String']>;
|
|
240
240
|
image?: Maybe<Scalars['URL']>;
|
|
241
241
|
link?: Maybe<Link>;
|
|
242
242
|
title?: Maybe<Scalars['String']>;
|
|
243
243
|
};
|
|
244
|
-
export
|
|
244
|
+
export type Position = {
|
|
245
245
|
__typename?: 'Position';
|
|
246
246
|
latitude?: Maybe<Scalars['Float']>;
|
|
247
247
|
longitude?: Maybe<Scalars['Float']>;
|
|
248
248
|
};
|
|
249
|
-
export
|
|
249
|
+
export type Promo = {
|
|
250
250
|
__typename?: 'Promo';
|
|
251
251
|
description?: Maybe<Scalars['String']>;
|
|
252
252
|
image?: Maybe<Scalars['URL']>;
|
|
253
253
|
link?: Maybe<Link>;
|
|
254
254
|
title?: Maybe<Scalars['String']>;
|
|
255
255
|
};
|
|
256
|
-
export
|
|
256
|
+
export type Query = {
|
|
257
257
|
__typename?: 'Query';
|
|
258
258
|
branch?: Maybe<Branch>;
|
|
259
259
|
insurances: Array<Insurance>;
|
|
260
260
|
loan?: Maybe<FinancialOption>;
|
|
261
261
|
vehicle?: Maybe<Vehicle>;
|
|
262
262
|
};
|
|
263
|
-
export
|
|
263
|
+
export type QueryBranchArgs = {
|
|
264
264
|
id: Scalars['ID'];
|
|
265
265
|
};
|
|
266
|
-
export
|
|
266
|
+
export type QueryInsurancesArgs = {
|
|
267
267
|
branch?: InputMaybe<Scalars['ID']>;
|
|
268
268
|
drivingDistance: DrivingDistance;
|
|
269
269
|
id: Scalars['ID'];
|
|
270
270
|
personalNumber: Scalars['PersonalNumber'];
|
|
271
271
|
};
|
|
272
|
-
export
|
|
272
|
+
export type QueryLoanArgs = {
|
|
273
273
|
branch?: InputMaybe<Scalars['ID']>;
|
|
274
274
|
downPayment: Scalars['Int'];
|
|
275
275
|
duration: Scalars['Int'];
|
|
276
276
|
id: Scalars['ID'];
|
|
277
277
|
residual: Scalars['Float'];
|
|
278
278
|
};
|
|
279
|
-
export
|
|
279
|
+
export type QueryVehicleArgs = {
|
|
280
280
|
branch?: InputMaybe<Scalars['ID']>;
|
|
281
281
|
id: Scalars['ID'];
|
|
282
282
|
};
|
|
283
|
-
export
|
|
283
|
+
export type SafetyOption = {
|
|
284
284
|
__typename?: 'SafetyOption';
|
|
285
285
|
content?: Maybe<Scalars['String']>;
|
|
286
286
|
image?: Maybe<Scalars['URL']>;
|
|
287
287
|
name?: Maybe<Scalars['String']>;
|
|
288
288
|
title?: Maybe<Scalars['String']>;
|
|
289
289
|
};
|
|
290
|
-
export
|
|
290
|
+
export type Service = {
|
|
291
291
|
__typename?: 'Service';
|
|
292
292
|
markdown?: Maybe<Scalars['String']>;
|
|
293
293
|
title?: Maybe<Scalars['String']>;
|
|
294
294
|
};
|
|
295
|
-
export
|
|
295
|
+
export type Vehicle = {
|
|
296
296
|
__typename?: 'Vehicle';
|
|
297
297
|
availableFrom?: Maybe<Scalars['DateTime']>;
|
|
298
298
|
branch?: Maybe<Branch>;
|
|
@@ -316,7 +316,7 @@ export declare type Vehicle = {
|
|
|
316
316
|
shortDescription?: Maybe<Scalars['String']>;
|
|
317
317
|
title: Scalars['String'];
|
|
318
318
|
};
|
|
319
|
-
export
|
|
319
|
+
export type VehicleData = {
|
|
320
320
|
__typename?: 'VehicleData';
|
|
321
321
|
enginePower?: Maybe<Scalars['Float']>;
|
|
322
322
|
equipmentLevel?: Maybe<Scalars['String']>;
|
|
@@ -336,17 +336,17 @@ export declare type VehicleData = {
|
|
|
336
336
|
salesName?: Maybe<Scalars['String']>;
|
|
337
337
|
vin?: Maybe<Scalars['String']>;
|
|
338
338
|
};
|
|
339
|
-
export
|
|
339
|
+
export type VehicleDataPropertySetArgs = {
|
|
340
340
|
category?: InputMaybe<Scalars['String']>;
|
|
341
341
|
properties?: InputMaybe<Array<Scalars['String']>>;
|
|
342
342
|
};
|
|
343
|
-
export
|
|
343
|
+
export type VehicleFlags = {
|
|
344
344
|
__typename?: 'VehicleFlags';
|
|
345
345
|
auction?: Maybe<Scalars['Boolean']>;
|
|
346
346
|
demoVersion?: Maybe<Scalars['Boolean']>;
|
|
347
347
|
testDrive?: Maybe<Scalars['Boolean']>;
|
|
348
348
|
};
|
|
349
|
-
export
|
|
349
|
+
export type _Service = {
|
|
350
350
|
__typename?: '_Service';
|
|
351
351
|
sdl: Scalars['String'];
|
|
352
352
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type SearchFilterNameTypes = 'manufacturer' | 'modelSeries' | 'fuelType' | 'gearboxType' | 'branch' | 'color' | 'environmentClass' | 'properties.segment' | 'drivingWheel' | 'price' | 'mileage' | 'modelYear' | 'leasingPrice' | 'businessLeasingPrice';
|
|
2
|
+
export type SearchFilterTypes = {
|
|
3
3
|
filterName: SearchFilterNameTypes;
|
|
4
4
|
displayName?: string;
|
|
5
5
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseAction } from '../../@types/action';
|
|
2
2
|
export declare const SET_PATH = "SET_PATH";
|
|
3
|
-
|
|
3
|
+
type SET_PATH_TYPE = BaseAction<typeof SET_PATH> & {
|
|
4
4
|
path: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type PathAction = SET_PATH_TYPE;
|
|
7
7
|
interface PathState {
|
|
8
8
|
path: string;
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type Props = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
|
|
3
3
|
small?: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare const Content: ({ children, small, dangerouslySetInnerHTML }: Props) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type SharedIconProps = {
|
|
3
3
|
block?: boolean;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type IconInfoProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & SharedIconProps;
|
|
6
6
|
export declare const IconInfo: ({ block }: IconInfoProps) => JSX.Element;
|
|
7
7
|
export declare const IconCancel: ({ block }: IconInfoProps) => JSX.Element;
|
|
8
8
|
export declare const IconChevronDown: ({ block }: IconInfoProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
3
3
|
id: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type InputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
3
|
+
type Props = InputProps & {
|
|
4
4
|
placeholder: string;
|
|
5
5
|
label: string;
|
|
6
6
|
value?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
3
3
|
value: string;
|
|
4
4
|
placeholder: string;
|
|
5
5
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WaykeSearchProps } from './search/index';
|
|
3
3
|
import { WaykeSearchItemProps } from './searchItem/index';
|
|
4
|
-
export
|
|
4
|
+
export type WaykeCompositeProps = Omit<WaykeSearchProps & WaykeSearchItemProps, 'id'>;
|
|
5
5
|
declare const WaykeComposite: ({ filterList, initialQueryParams, removeSearchBar, removeFilterOptions, disableResetScrollOnInit, placeholderImage, pathRoute, modifyDocumentTitleItem, modifyDocumentTitleSearch, displayBranchName, }: WaykeCompositeProps) => JSX.Element;
|
|
6
6
|
export default WaykeComposite;
|
|
@@ -15,7 +15,7 @@ export interface WaykeItemProviderSettings {
|
|
|
15
15
|
googleMapsApiKey?: string;
|
|
16
16
|
googleMapsMarker?: string;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type WaykeItemProviderProps = WaykeItemProviderSettings & {
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
};
|
|
21
21
|
declare const WaykeItemProvider: ({ url, urlMlt, apiKey, ecomSettings, graphQlUrl, googleMapsApiKey, googleMapsMarker, children, }: WaykeItemProviderProps) => JSX.Element;
|
|
@@ -17,7 +17,7 @@ export interface WaykeProviderSettings {
|
|
|
17
17
|
useQueryParamsFromUrl?: boolean;
|
|
18
18
|
pathRoute?: string;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type WaykeProviderProps = WaykeProviderSettings & {
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
};
|
|
23
23
|
declare const WaykeProvider: ({ url, urlMlt, apiKey, ecomSettings, graphQlUrl, googleMapsApiKey, googleMapsMarker, useQueryParamsFromUrl, pathRoute, children, }: WaykeProviderProps) => JSX.Element;
|
|
@@ -2,15 +2,15 @@ interface ActionBase<Callback> {
|
|
|
2
2
|
actionName: ActionNames;
|
|
3
3
|
callback: Callback;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type ActionCallbackEmpty = () => void;
|
|
6
|
+
export type CallbackOnFilterUpdate = (query: string) => void;
|
|
7
7
|
export interface ActionOnFilterUpdate extends ActionBase<CallbackOnFilterUpdate> {
|
|
8
8
|
actionName: 'onFilterUpdate';
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ActionCallbackAll = (eventName: Omit<ActionNames, 'All'>, data: any) => void;
|
|
11
11
|
export interface ActionAll extends ActionBase<ActionCallbackAll> {
|
|
12
12
|
actionName: 'All';
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export type ActionTypes = ActionOnFilterUpdate | ActionAll;
|
|
15
|
+
export type ActionNames = Pick<ActionTypes, 'actionName'>['actionName'];
|
|
16
16
|
export {};
|
|
@@ -2,19 +2,19 @@ interface EventBase<Callback> {
|
|
|
2
2
|
eventName: EventNames;
|
|
3
3
|
callback: Callback;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type CallbackEmpty = () => void;
|
|
6
|
+
export type CallbackHashRouteChange = (id?: string) => void;
|
|
7
7
|
export interface EventHashRouteChange extends EventBase<CallbackHashRouteChange> {
|
|
8
8
|
eventName: 'HashRouteChange';
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type CallbackEventItemClicked = (id: string) => void;
|
|
11
11
|
export interface EventItemClicked extends EventBase<CallbackEventItemClicked> {
|
|
12
12
|
eventName: 'ItemClicked';
|
|
13
13
|
}
|
|
14
14
|
export interface EventEcomOnInit extends EventBase<CallbackEmpty> {
|
|
15
15
|
eventName: 'EcomOnInit';
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type CallbackEcomOnUserEvent = (userEvent: string, currentStep: string) => void;
|
|
18
18
|
export interface EventEcomOnUser extends EventBase<CallbackEcomOnUserEvent> {
|
|
19
19
|
eventName: 'EcomOnUserEvent';
|
|
20
20
|
}
|
|
@@ -42,10 +42,10 @@ export interface EventInsuranceInterest extends EventBase<CallbackEmpty> {
|
|
|
42
42
|
export interface EventFinanceInterest extends EventBase<CallbackEmpty> {
|
|
43
43
|
eventName: 'FinanceInterest';
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type CallbackAll = (eventName: Omit<EventNames, 'All'>, data: any) => void;
|
|
46
46
|
export interface EventAll extends EventBase<CallbackAll> {
|
|
47
47
|
eventName: 'All';
|
|
48
48
|
}
|
|
49
|
-
export
|
|
50
|
-
export
|
|
49
|
+
export type EventType = EventHashRouteChange | EventItemClicked | EventEcomOnInit | EventEcomOnUser | EventEcomOnExit | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceInterest | EventFinanceInterest | EventAll;
|
|
50
|
+
export type EventNames = Pick<EventType, 'eventName'>['eventName'];
|
|
51
51
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from './Actions';
|
|
2
2
|
import { EventHashRouteChange, EventItemClicked, EventEcomOnInit, EventEcomOnUser, EventEcomOnExit, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventFinanceInterest, EventAll, EventType, EventNames } from './Events';
|
|
3
|
-
export
|
|
3
|
+
export type EventSubscriptions = {
|
|
4
4
|
HashRouteChange: EventHashRouteChange[];
|
|
5
5
|
ItemClicked: EventItemClicked[];
|
|
6
6
|
EcomOnInit: EventEcomOnInit[];
|
|
@@ -15,7 +15,7 @@ export declare type EventSubscriptions = {
|
|
|
15
15
|
FinanceInterest: EventFinanceInterest[];
|
|
16
16
|
All: EventAll[];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ActionSubscriptions = {
|
|
19
19
|
onFilterUpdate: ActionOnFilterUpdate[];
|
|
20
20
|
All: ActionAll[];
|
|
21
21
|
};
|
|
@@ -8,6 +8,6 @@ declare const SortOptionDisplayName: {
|
|
|
8
8
|
MileageAsc: string;
|
|
9
9
|
Mileagedesc: string;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type SortOptionDisplayName = 'relevance' | 'published-asc' | 'published-desc' | 'price-asc' | 'price-desc' | 'model-asc' | 'model-desc' | 'mileage-asc' | 'mileage-desc';
|
|
12
12
|
export declare const getTranslatedSortOptionDisplayName: (str: string | SortOptionDisplayName) => string;
|
|
13
13
|
export {};
|
|
@@ -8,7 +8,7 @@ export interface ItemPropertyType {
|
|
|
8
8
|
value: string | null;
|
|
9
9
|
modal?: ItemPropertModalType;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
type ValueTypes = number | string | null | undefined | string[] | boolean | {
|
|
12
12
|
[key: string]: string | number | boolean;
|
|
13
13
|
};
|
|
14
14
|
export interface SpecPropertyType {
|