@wayke-se/components-react 4.0.0-beta.9 → 4.1.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 +88 -22
- package/dist/index.d.ts +150 -47
- package/dist/index.js +920 -920
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +876 -876
- package/dist/index.mjs.map +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -135,8 +135,8 @@ const App = ({}) => {
|
|
|
135
135
|
const id = 'd01f79a3-7552-49c4-9d4d-deb3aa581c31';
|
|
136
136
|
|
|
137
137
|
// Optional, get id when related vehicles are clicked
|
|
138
|
-
const onClickSearchItem = useCallback((
|
|
139
|
-
console.log(id);
|
|
138
|
+
const onClickSearchItem = useCallback((data) => {
|
|
139
|
+
console.log(data.id);
|
|
140
140
|
}, []);
|
|
141
141
|
|
|
142
142
|
return (
|
|
@@ -159,7 +159,7 @@ const App = ({}) => {
|
|
|
159
159
|
| Property | Type | Required | Value |
|
|
160
160
|
|--------------------------|------------|----------|----------------------|
|
|
161
161
|
| id | string | true | |
|
|
162
|
-
| marketCode | MarketCode | false |
|
|
162
|
+
| marketCode | MarketCode | false | SE | NO |
|
|
163
163
|
| pathRoute | string | false | |
|
|
164
164
|
| hashRoute | boolean | false | |
|
|
165
165
|
| disableResetScrollOnInit | boolean | false | |
|
|
@@ -183,7 +183,7 @@ const App = ({}) => {
|
|
|
183
183
|
### WaykeSearch
|
|
184
184
|
| Property | Type | Values |
|
|
185
185
|
|---------------------------|---------------------------|---------------------------|
|
|
186
|
-
| marketCode | MarketCode |
|
|
186
|
+
| marketCode | MarketCode | SE | NO |
|
|
187
187
|
| pathRoute | string | |
|
|
188
188
|
| hashRoute | boolean | |
|
|
189
189
|
| filterList | SearchFilterTypes[] | |
|
|
@@ -191,7 +191,7 @@ const App = ({}) => {
|
|
|
191
191
|
| removeSearchBar | boolean | |
|
|
192
192
|
| removeFilterOptions | boolean | |
|
|
193
193
|
| placeholderImage | string | |
|
|
194
|
-
| onClickSearchItem | function | (
|
|
194
|
+
| onClickSearchItem | function | (data: CallbackItemData) => void |
|
|
195
195
|
| modifyDocumentTitleSearch | string | |
|
|
196
196
|
| displayBranchName | string | |
|
|
197
197
|
|
|
@@ -338,7 +338,7 @@ import { WaykePubSub} from '@wayke-se/components-react';
|
|
|
338
338
|
|
|
339
339
|
const event = {
|
|
340
340
|
eventName: 'ItemClicked',
|
|
341
|
-
callback: (
|
|
341
|
+
callback: (data) => console.log('subscribed ItemClicked:', data),
|
|
342
342
|
};
|
|
343
343
|
|
|
344
344
|
WaykePubSub.subscribe(event);
|
|
@@ -353,24 +353,90 @@ WaykePubSub.unsubscribe(event);
|
|
|
353
353
|
| publish | eventName: string, ...arg: any |
|
|
354
354
|
|
|
355
355
|
### EventBase
|
|
356
|
-
| eventName
|
|
357
|
-
|
|
358
|
-
| HashRouteChange
|
|
359
|
-
| ItemClicked
|
|
360
|
-
|
|
|
361
|
-
|
|
|
362
|
-
|
|
|
363
|
-
|
|
|
364
|
-
|
|
|
365
|
-
|
|
|
366
|
-
|
|
|
367
|
-
|
|
|
368
|
-
|
|
|
369
|
-
| FinanceInterest
|
|
370
|
-
|
|
|
371
|
-
|
|
356
|
+
| eventName | callback | Data |
|
|
357
|
+
|-----------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------|
|
|
358
|
+
| HashRouteChange | (data) => void | CallbackHashRouteChangeData |
|
|
359
|
+
| ItemClicked | (data) => void | CallbackItemData |
|
|
360
|
+
| Ecom | (data) => void | CallbackEcomData |
|
|
361
|
+
| ImagesClick | (data) => void | CallbackItemData |
|
|
362
|
+
| OptionsClick | (data) => void | CallbackItemData |
|
|
363
|
+
| PhonenumberVisible | (data) => void | CallbackItemData |
|
|
364
|
+
| PhonenumberCall | (data) => void | CallbackItemData |
|
|
365
|
+
| MailVisible | (data) => void | CallbackItemData |
|
|
366
|
+
| InsuranceInterest | (data) => void | CallbackItemData |
|
|
367
|
+
| InsuranceOpen | (data) => void | CallbackItemData |
|
|
368
|
+
| InsuranceClose | (data) => void | CallbackItemData |
|
|
369
|
+
| FinanceInterest | (data) => void | CallbackItemData |
|
|
370
|
+
| FinanceOpen | (data) => void | CallbackItemData |
|
|
371
|
+
| FinanceClose | (data) => void | CallbackItemData |
|
|
372
|
+
| SearchClearQuery | (data) => void | CallbackSearchClearQueryData |
|
|
373
|
+
| SearchClearAllFilters | (data) => void | CallbackSearchClearAllFiltersQueryData |
|
|
374
|
+
| SearchInitiated | (data) => void | CallbackSearchInitiatedData |
|
|
375
|
+
| SearchCompleted | (data) => void | CallbackSearchCompletedData |
|
|
376
|
+
| Search | (data) => void | CallbackSearchData |
|
|
377
|
+
| FilterApply | (data) => void | CallbackFilterApplyData |
|
|
378
|
+
| All | (eventName, data) => void | CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchClearQueryData \| CallbackSearchClearAllFiltersQueryData \| CallbackSearchInitiatedData \| CallbackSearchCompletedData \| CallbackSearchData \| CallbackFilterApplyData |
|
|
372
379
|
* `All` - Subscribes to all events.
|
|
373
380
|
|
|
381
|
+
#### CallbackHashRouteChangeData
|
|
382
|
+
| Property | Type |
|
|
383
|
+
|-----------|-----------|
|
|
384
|
+
| id | string |
|
|
385
|
+
|
|
386
|
+
#### CallbackItemData
|
|
387
|
+
| Property | Type |
|
|
388
|
+
|---------------|-----------|
|
|
389
|
+
| id | string |
|
|
390
|
+
| branchName | string |
|
|
391
|
+
| branchId | string |
|
|
392
|
+
|
|
393
|
+
#### CallbackEcomData
|
|
394
|
+
| Property | Type |
|
|
395
|
+
|---------------|-----------------------|
|
|
396
|
+
| id | string |
|
|
397
|
+
| branchName | string |
|
|
398
|
+
| branchId | string |
|
|
399
|
+
| view | EcomView |
|
|
400
|
+
| event | EcomView |
|
|
401
|
+
| currentStep | EcomStep \| undefined |
|
|
402
|
+
| data | any \| undefined |
|
|
403
|
+
|
|
404
|
+
#### CallbackSearchClearQueryData
|
|
405
|
+
| Property | Type |
|
|
406
|
+
|-----------|-----------|
|
|
407
|
+
| query | string |
|
|
408
|
+
|
|
409
|
+
#### CallbackSearchClearAllFiltersQueryData
|
|
410
|
+
| Property | Type |
|
|
411
|
+
|-----------|-----------|
|
|
412
|
+
| query | string |
|
|
413
|
+
|
|
414
|
+
#### CallbackSearchInitiatedData
|
|
415
|
+
| Property | Type |
|
|
416
|
+
|-----------|-----------|
|
|
417
|
+
| query | string |
|
|
418
|
+
|
|
419
|
+
#### CallbackSearchCompletedData
|
|
420
|
+
| Property | Type |
|
|
421
|
+
|-----------|-----------|
|
|
422
|
+
| query | string |
|
|
423
|
+
| hits | number |
|
|
424
|
+
|
|
425
|
+
#### CallbackSearchData
|
|
426
|
+
| Property | Type |
|
|
427
|
+
|-----------|-----------|
|
|
428
|
+
| query | string |
|
|
429
|
+
|
|
430
|
+
#### CallbackFilterApplyData
|
|
431
|
+
| Property | Type |
|
|
432
|
+
|-----------|-----------------------|
|
|
433
|
+
| type | "checkbox" \| "range" |
|
|
434
|
+
| filter | string |
|
|
435
|
+
| value | string \| undefined |
|
|
436
|
+
| checked | boolean \| "range" |
|
|
437
|
+
| min | number \| "range" |
|
|
438
|
+
| max | number \| "range" |
|
|
439
|
+
|
|
374
440
|
## Theme
|
|
375
441
|
It is possible to apply a custom theme using *CSS*. The things that can be styled are:
|
|
376
442
|
- Primary brand color
|
package/dist/index.d.ts
CHANGED
|
@@ -913,10 +913,11 @@ declare module '@wayke-se/components-react/src/components/ActionList/index' {
|
|
|
913
913
|
import React from 'react';
|
|
914
914
|
import { Maybe, ContactOptions, Branch } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
915
915
|
interface ActionListProps {
|
|
916
|
+
id: string;
|
|
916
917
|
branch?: Maybe<Branch>;
|
|
917
918
|
contact?: Maybe<ContactOptions>;
|
|
918
919
|
}
|
|
919
|
-
const ActionList: ({ contact, branch }: ActionListProps) => React.JSX.Element | null;
|
|
920
|
+
const ActionList: ({ id, contact, branch }: ActionListProps) => React.JSX.Element | null;
|
|
920
921
|
export default ActionList;
|
|
921
922
|
|
|
922
923
|
}
|
|
@@ -1368,11 +1369,13 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/index' {
|
|
|
1368
1369
|
import React from 'react';
|
|
1369
1370
|
import { Facet } from '@wayke-se/components-react/src/@types/search';
|
|
1370
1371
|
import { SearchFilterTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
1372
|
+
import { QueryFilter } from '@wayke-se/components-react/src/@types/queryFilter';
|
|
1371
1373
|
export interface FilterProps {
|
|
1372
1374
|
label: string;
|
|
1373
1375
|
activeFilters?: number;
|
|
1374
1376
|
}
|
|
1375
1377
|
export interface Props {
|
|
1378
|
+
queryFilter: QueryFilter;
|
|
1376
1379
|
facet?: Facet;
|
|
1377
1380
|
loading: boolean;
|
|
1378
1381
|
filteredFacets: Facet[];
|
|
@@ -1381,7 +1384,7 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/index' {
|
|
|
1381
1384
|
onClose: () => void;
|
|
1382
1385
|
onFilterUpdate: (nextQuery: string) => void;
|
|
1383
1386
|
}
|
|
1384
|
-
const FilterPanel: ({ facet, filteredFacets, numberOfHits, loading, onFilterUpdate, onClose, }: Props) => React.JSX.Element;
|
|
1387
|
+
const FilterPanel: ({ queryFilter, facet, filteredFacets, numberOfHits, loading, onFilterUpdate, onClose, }: Props) => React.JSX.Element;
|
|
1385
1388
|
export default FilterPanel;
|
|
1386
1389
|
|
|
1387
1390
|
}
|
|
@@ -1399,24 +1402,26 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/rangeFacet
|
|
|
1399
1402
|
}
|
|
1400
1403
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/LoanModal' {
|
|
1401
1404
|
import React from 'react';
|
|
1402
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1405
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1403
1406
|
interface LoanModalProps {
|
|
1404
1407
|
id: string;
|
|
1408
|
+
branch?: Maybe<Branch>;
|
|
1405
1409
|
financialOption: FinancialOption;
|
|
1406
1410
|
onClose: () => void;
|
|
1407
1411
|
}
|
|
1408
|
-
const LoanModal: ({ id, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1412
|
+
const LoanModal: ({ id, branch, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1409
1413
|
export default LoanModal;
|
|
1410
1414
|
|
|
1411
1415
|
}
|
|
1412
1416
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/index' {
|
|
1413
1417
|
import React from 'react';
|
|
1414
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1418
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1415
1419
|
interface FinancialOptionsProps {
|
|
1416
1420
|
id: string;
|
|
1421
|
+
branch?: Maybe<Branch>;
|
|
1417
1422
|
financialOptions: FinancialOption[];
|
|
1418
1423
|
}
|
|
1419
|
-
const FinancialOptions: ({ id, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1424
|
+
const FinancialOptions: ({ id, branch, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1420
1425
|
export default FinancialOptions;
|
|
1421
1426
|
|
|
1422
1427
|
}
|
|
@@ -1432,12 +1437,13 @@ declare module '@wayke-se/components-react/src/components/FinancialOptions/leasi
|
|
|
1432
1437
|
}
|
|
1433
1438
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/loan' {
|
|
1434
1439
|
import React from 'react';
|
|
1435
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1440
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1436
1441
|
interface LoanProps {
|
|
1437
1442
|
id: string;
|
|
1443
|
+
branch?: Maybe<Branch>;
|
|
1438
1444
|
financialOption: FinancialOption;
|
|
1439
1445
|
}
|
|
1440
|
-
const Loan: ({ id, financialOption }: LoanProps) => React.JSX.Element;
|
|
1446
|
+
const Loan: ({ id, branch, financialOption }: LoanProps) => React.JSX.Element;
|
|
1441
1447
|
export default Loan;
|
|
1442
1448
|
|
|
1443
1449
|
}
|
|
@@ -1453,12 +1459,14 @@ declare module '@wayke-se/components-react/src/components/Gallery/MediaButton' {
|
|
|
1453
1459
|
}
|
|
1454
1460
|
declare module '@wayke-se/components-react/src/components/Gallery/index' {
|
|
1455
1461
|
import React from 'react';
|
|
1456
|
-
import { Media } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1462
|
+
import { Branch, Maybe, Media } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1457
1463
|
interface GalleryProps {
|
|
1464
|
+
id: string;
|
|
1465
|
+
branch?: Maybe<Branch>;
|
|
1458
1466
|
media?: Media[];
|
|
1459
1467
|
placeholderImage?: string;
|
|
1460
1468
|
}
|
|
1461
|
-
const Gallery: ({ media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1469
|
+
const Gallery: ({ id, branch, media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1462
1470
|
export default Gallery;
|
|
1463
1471
|
|
|
1464
1472
|
}
|
|
@@ -1489,6 +1497,7 @@ declare module '@wayke-se/components-react/src/components/Gallery/wrapper' {
|
|
|
1489
1497
|
}
|
|
1490
1498
|
declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
1491
1499
|
import React from 'react';
|
|
1500
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
1492
1501
|
import { Document } from '@wayke-se/components-react/src/@types/search';
|
|
1493
1502
|
interface GridProps {
|
|
1494
1503
|
documents?: Document[];
|
|
@@ -1496,7 +1505,7 @@ declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
|
1496
1505
|
pathRoute?: string;
|
|
1497
1506
|
placeholderImage?: string;
|
|
1498
1507
|
displayBranchName?: boolean;
|
|
1499
|
-
onClickItem?: (
|
|
1508
|
+
onClickItem?: (data: OnItemClick) => void;
|
|
1500
1509
|
}
|
|
1501
1510
|
const Grid: ({ documents, placeholderImage, hashRoute, pathRoute, displayBranchName, onClickItem, }: GridProps) => React.JSX.Element | null;
|
|
1502
1511
|
export default Grid;
|
|
@@ -1702,11 +1711,13 @@ declare module '@wayke-se/components-react/src/components/InsuranceOptions/Insur
|
|
|
1702
1711
|
}
|
|
1703
1712
|
declare module '@wayke-se/components-react/src/components/InsuranceOptions/InsuranceFree' {
|
|
1704
1713
|
import React from 'react';
|
|
1705
|
-
import { InsuranceOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1714
|
+
import { Branch, InsuranceOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1706
1715
|
interface InsuranceOptions {
|
|
1716
|
+
id: string;
|
|
1717
|
+
branch?: Maybe<Branch>;
|
|
1707
1718
|
insuranceOptions: InsuranceOption[];
|
|
1708
1719
|
}
|
|
1709
|
-
const Insurance: ({ insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1720
|
+
const Insurance: ({ id, branch, insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1710
1721
|
export default Insurance;
|
|
1711
1722
|
|
|
1712
1723
|
}
|
|
@@ -2103,13 +2114,19 @@ declare module '@wayke-se/components-react/src/components/PriceTable/wrapper' {
|
|
|
2103
2114
|
declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
2104
2115
|
import React from 'react';
|
|
2105
2116
|
import { ItemProps } from '@wayke-se/components-react/src/components/UspList/index';
|
|
2106
|
-
import { File } from '@wayke-se/components-react/src/@types/search';
|
|
2117
|
+
import { Branch, File } from '@wayke-se/components-react/src/@types/search';
|
|
2118
|
+
export interface OnItemClick {
|
|
2119
|
+
id: string;
|
|
2120
|
+
branchId?: string;
|
|
2121
|
+
branchName?: string;
|
|
2122
|
+
}
|
|
2107
2123
|
interface Props {
|
|
2108
2124
|
id: string;
|
|
2109
2125
|
title: string;
|
|
2110
2126
|
href?: string;
|
|
2111
2127
|
imageFile?: File;
|
|
2112
2128
|
pathRoute?: string;
|
|
2129
|
+
branch?: Branch;
|
|
2113
2130
|
placeholderImage?: string;
|
|
2114
2131
|
description?: string;
|
|
2115
2132
|
uspList?: ItemProps[];
|
|
@@ -2118,9 +2135,9 @@ declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
|
2118
2135
|
oldPrice?: string;
|
|
2119
2136
|
branchName?: string;
|
|
2120
2137
|
businessLeasingPrice?: string;
|
|
2121
|
-
onClick?: (
|
|
2138
|
+
onClick?: (data: OnItemClick) => void;
|
|
2122
2139
|
}
|
|
2123
|
-
const ProductCard: ({ id, title, href, imageFile, pathRoute, placeholderImage, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, onClick, }: Props) => React.JSX.Element;
|
|
2140
|
+
const ProductCard: ({ id, title, href, imageFile, pathRoute, placeholderImage, branch, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, onClick, }: Props) => React.JSX.Element;
|
|
2124
2141
|
export default ProductCard;
|
|
2125
2142
|
|
|
2126
2143
|
}
|
|
@@ -2843,8 +2860,8 @@ declare module '@wayke-se/components-react/src/index' {
|
|
|
2843
2860
|
import WaykeItemProvider, { WaykeItemProviderSettings } from '@wayke-se/components-react/src/providers/WaykeItemProvidet';
|
|
2844
2861
|
import WaykePubSub, { EventSubscriptions } from '@wayke-se/components-react/src/utils/pubsub/pubsub';
|
|
2845
2862
|
import type { SearchFilterTypes, SearchFilterNameTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
2846
|
-
import type { EventHashRouteChange, EventItemClicked,
|
|
2847
|
-
export { WaykeProvider, WaykeItemProvider, WaykeSearch, WaykeSearchItem, SearchBar, WaykeThemeProvider, WaykeItemProviderSettings, WaykePubSub, WaykeCompositeWithProviderProps, WaykeProviderSettings, WaykeSearchProps, WaykeSearchItemProps, SearchFilterTypes, SearchFilterNameTypes, EventSubscriptions, EventHashRouteChange, EventItemClicked,
|
|
2863
|
+
import type { EventHashRouteChange, EventItemClicked, EventEcom, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventInsuranceOpen, EventInsuranceClose, EventFinanceInterest, EventFinanceOpen, EventFinanceClose, EventSearch, EventFilterApply, EventAll, EventType, EventNames, CallbackHashRouteChange, CallbackEcom, CallbackEmpty } from '@wayke-se/components-react/src/utils/pubsub/Events';
|
|
2864
|
+
export { WaykeProvider, WaykeItemProvider, WaykeSearch, WaykeSearchItem, SearchBar, WaykeThemeProvider, WaykeItemProviderSettings, WaykePubSub, WaykeCompositeWithProviderProps, WaykeProviderSettings, WaykeSearchProps, WaykeSearchItemProps, SearchFilterTypes, SearchFilterNameTypes, EventSubscriptions, EventHashRouteChange, EventItemClicked, EventEcom, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventInsuranceOpen, EventInsuranceClose, EventFinanceInterest, EventFinanceOpen, EventFinanceClose, EventSearch, EventFilterApply, EventAll, EventType, EventNames, CallbackHashRouteChange, CallbackEcom, CallbackEmpty, };
|
|
2848
2865
|
export default WaykeComposite;
|
|
2849
2866
|
|
|
2850
2867
|
}
|
|
@@ -2935,6 +2952,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2935
2952
|
import React from 'react';
|
|
2936
2953
|
import { SearchFilterTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
2937
2954
|
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
2955
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
2938
2956
|
export interface WaykeSearchProps {
|
|
2939
2957
|
marketCode?: MarketCode;
|
|
2940
2958
|
filterList?: SearchFilterTypes[];
|
|
@@ -2946,7 +2964,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2946
2964
|
pathRoute?: string;
|
|
2947
2965
|
modifyDocumentTitleSearch?: string;
|
|
2948
2966
|
displayBranchName?: boolean;
|
|
2949
|
-
onClickSearchItem?: (
|
|
2967
|
+
onClickSearchItem?: (data: OnItemClick) => void;
|
|
2950
2968
|
}
|
|
2951
2969
|
const WaykeSearch: ({ marketCode, filterList, initialQueryParams, hashRoute, pathRoute, removeSearchBar, placeholderImage, removeFilterOptions, modifyDocumentTitleSearch, displayBranchName, onClickSearchItem, }: WaykeSearchProps) => React.JSX.Element | null;
|
|
2952
2970
|
export default WaykeSearch;
|
|
@@ -3000,7 +3018,10 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/BranchModal' {
|
|
|
3000
3018
|
declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
3001
3019
|
import React from 'react';
|
|
3002
3020
|
import { Manufacturer, PackageOption, Ecommerce, ContactOptions, Branch } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
3021
|
+
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
3003
3022
|
interface CheckList {
|
|
3023
|
+
id: string;
|
|
3024
|
+
marketCode?: MarketCode;
|
|
3004
3025
|
manufacturer?: Manufacturer | null;
|
|
3005
3026
|
packageOptions: PackageOption[];
|
|
3006
3027
|
ecommerce?: Ecommerce | null;
|
|
@@ -3010,7 +3031,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
|
3010
3031
|
availableFrom?: Date | null;
|
|
3011
3032
|
toggleEcomModal: () => void;
|
|
3012
3033
|
}
|
|
3013
|
-
const CheckList: ({ manufacturer, packageOptions, ecommerce, branch, contact, availableFrom, toggleEcomModal, loadingCentralStorageVehicle, }: CheckList) => React.JSX.Element;
|
|
3034
|
+
const CheckList: ({ id, marketCode, manufacturer, packageOptions, ecommerce, branch, contact, availableFrom, toggleEcomModal, loadingCentralStorageVehicle, }: CheckList) => React.JSX.Element;
|
|
3014
3035
|
export default CheckList;
|
|
3015
3036
|
|
|
3016
3037
|
}
|
|
@@ -3059,7 +3080,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/MetadataItem'
|
|
|
3059
3080
|
declare module '@wayke-se/components-react/src/layouts/searchItem/PackageOptionModal' {
|
|
3060
3081
|
import React from 'react';
|
|
3061
3082
|
interface ModelLink {
|
|
3062
|
-
|
|
3083
|
+
url?: string | null;
|
|
3063
3084
|
title?: string | null;
|
|
3064
3085
|
}
|
|
3065
3086
|
export interface PackageOptionModalData {
|
|
@@ -3144,11 +3165,12 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/index' {
|
|
|
3144
3165
|
declare module '@wayke-se/components-react/src/layouts/searchItem/useEcom' {
|
|
3145
3166
|
/// <reference types="react" />
|
|
3146
3167
|
import { SettingsContextProps } from '@wayke-se/components-react/src/State/Settings/SettingsContext';
|
|
3168
|
+
import { Branch, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
3147
3169
|
interface EcomWeb {
|
|
3148
3170
|
start: () => void;
|
|
3149
3171
|
destroy: () => void;
|
|
3150
3172
|
}
|
|
3151
|
-
function useEcom(id: string, ecomSettings: SettingsContextProps['ecomSettings']): import("react").MutableRefObject<EcomWeb | undefined>;
|
|
3173
|
+
function useEcom(id: string, ecomSettings: SettingsContextProps['ecomSettings'], branch?: Maybe<Branch>): import("react").MutableRefObject<EcomWeb | undefined>;
|
|
3152
3174
|
export default useEcom;
|
|
3153
3175
|
|
|
3154
3176
|
}
|
|
@@ -3264,6 +3286,9 @@ declare module '@wayke-se/components-react/src/utils/constants' {
|
|
|
3264
3286
|
export const LEASING_PRICE = "leasingPrice";
|
|
3265
3287
|
export const BUSINESS_LEASING_PRICE = "businessLeasingPrice";
|
|
3266
3288
|
export const ODOMETER_VALUE_AS_KM = "odometerValueAsKm";
|
|
3289
|
+
export const FUEL_TYPES = "fuelTypes";
|
|
3290
|
+
export const ENGINE_BASE_TYPE = "engineBaseType";
|
|
3291
|
+
export const ELECTRICAL_RANGE_WLTP = "enhancedProperties.electricalRangeWLTP.value";
|
|
3267
3292
|
export const COLOR_WHITE: {
|
|
3268
3293
|
displayName: string;
|
|
3269
3294
|
hex: string;
|
|
@@ -3330,11 +3355,12 @@ declare module '@wayke-se/components-react/src/utils/deep-copy' {
|
|
|
3330
3355
|
declare module '@wayke-se/components-react/src/utils/formats' {
|
|
3331
3356
|
export const notEmpty: <TValue>(value: TValue | null | undefined) => value is TValue;
|
|
3332
3357
|
export const numberSeparator: (value: number, n?: number, x?: number, s?: string, c?: string) => string | null;
|
|
3358
|
+
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
3333
3359
|
export const FacetIdToTitle: (f: string) => string;
|
|
3334
3360
|
export const dateTimeFormat: {
|
|
3335
3361
|
YearMonth: number;
|
|
3336
3362
|
DayMonth: number;
|
|
3337
|
-
format: (value: string | Date, format: number) => string;
|
|
3363
|
+
format: (value: string | Date, format: number, marketCode?: MarketCode) => string;
|
|
3338
3364
|
};
|
|
3339
3365
|
|
|
3340
3366
|
}
|
|
@@ -3362,75 +3388,152 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Actions' {
|
|
|
3362
3388
|
|
|
3363
3389
|
}
|
|
3364
3390
|
declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
|
|
3391
|
+
import { EcomEvent, EcomStep, EcomView } from '@wayke-se/ecom-web/src/Utils/ecomEvent';
|
|
3365
3392
|
interface EventBase<Callback> {
|
|
3366
3393
|
eventName: EventNames;
|
|
3367
3394
|
callback: Callback;
|
|
3368
3395
|
}
|
|
3369
3396
|
export type CallbackEmpty = () => void;
|
|
3370
|
-
|
|
3397
|
+
interface CallbackHashRouteChangeData {
|
|
3398
|
+
id: string;
|
|
3399
|
+
}
|
|
3400
|
+
export type CallbackHashRouteChange = (data: CallbackHashRouteChangeData) => void;
|
|
3401
|
+
interface CallbackItemData {
|
|
3402
|
+
id: string;
|
|
3403
|
+
branchId: string;
|
|
3404
|
+
branchName: string;
|
|
3405
|
+
}
|
|
3406
|
+
export type CallbackItem = (data: CallbackItemData) => void;
|
|
3407
|
+
export interface CallbackSearchData {
|
|
3408
|
+
query: string;
|
|
3409
|
+
}
|
|
3410
|
+
export type CallbackSearch = (data: CallbackSearchData) => void;
|
|
3411
|
+
export interface CallbackSearchClearQueryData {
|
|
3412
|
+
query: string;
|
|
3413
|
+
}
|
|
3414
|
+
export type CallbackSearchClearQuery = (data: CallbackSearchClearQueryData) => void;
|
|
3415
|
+
export interface CallbackSearchClearAllFiltersQueryData {
|
|
3416
|
+
query: string;
|
|
3417
|
+
}
|
|
3418
|
+
export type CallbackSearchClearAllFiltersQuery = (data: CallbackSearchClearAllFiltersQueryData) => void;
|
|
3419
|
+
export interface CallbackSearchInitiatedData {
|
|
3420
|
+
query: string;
|
|
3421
|
+
}
|
|
3422
|
+
export type CallbackSearchInitiated = (data: CallbackSearchInitiatedData) => void;
|
|
3423
|
+
export interface CallbackSearchCompletedData {
|
|
3424
|
+
query: string;
|
|
3425
|
+
hits: number;
|
|
3426
|
+
}
|
|
3427
|
+
export type CallbackSearchCompleted = (data: CallbackSearchCompletedData) => void;
|
|
3428
|
+
export interface CallbackEcomData extends CallbackItemData {
|
|
3429
|
+
view: EcomView;
|
|
3430
|
+
event: EcomEvent;
|
|
3431
|
+
currentStep?: EcomStep;
|
|
3432
|
+
data?: any;
|
|
3433
|
+
}
|
|
3434
|
+
export interface CallbackFilterApplyData {
|
|
3435
|
+
type: 'checkbox' | 'range';
|
|
3436
|
+
filter: string;
|
|
3437
|
+
value?: string;
|
|
3438
|
+
checked?: boolean;
|
|
3439
|
+
min?: number;
|
|
3440
|
+
max?: number;
|
|
3441
|
+
}
|
|
3442
|
+
export type CallbackFilterApply = (data: CallbackFilterApplyData) => void;
|
|
3443
|
+
export type CallbackEcom = (data: CallbackEcomData) => void;
|
|
3371
3444
|
export interface EventHashRouteChange extends EventBase<CallbackHashRouteChange> {
|
|
3372
3445
|
eventName: 'HashRouteChange';
|
|
3373
3446
|
}
|
|
3374
|
-
export
|
|
3375
|
-
export interface EventItemClicked extends EventBase<CallbackEventItemClicked> {
|
|
3447
|
+
export interface EventItemClicked extends EventBase<CallbackItem> {
|
|
3376
3448
|
eventName: 'ItemClicked';
|
|
3377
3449
|
}
|
|
3378
|
-
export interface
|
|
3379
|
-
eventName: '
|
|
3380
|
-
}
|
|
3381
|
-
export type CallbackEcomOnUserEvent = (userEvent: string, currentStep: string) => void;
|
|
3382
|
-
export interface EventEcomOnUser extends EventBase<CallbackEcomOnUserEvent> {
|
|
3383
|
-
eventName: 'EcomOnUserEvent';
|
|
3450
|
+
export interface EventEcom extends EventBase<CallbackEcom> {
|
|
3451
|
+
eventName: 'Ecom';
|
|
3384
3452
|
}
|
|
3385
|
-
export interface
|
|
3386
|
-
eventName: 'EcomOnExit';
|
|
3387
|
-
}
|
|
3388
|
-
export interface EventImagesClick extends EventBase<CallbackEmpty> {
|
|
3453
|
+
export interface EventImagesClick extends EventBase<CallbackItem> {
|
|
3389
3454
|
eventName: 'ImagesClick';
|
|
3390
3455
|
}
|
|
3391
|
-
export interface EventOptionsClick extends EventBase<
|
|
3456
|
+
export interface EventOptionsClick extends EventBase<CallbackItem> {
|
|
3392
3457
|
eventName: 'OptionsClick';
|
|
3393
3458
|
}
|
|
3394
|
-
export interface EventPhonenumberVisible extends EventBase<
|
|
3459
|
+
export interface EventPhonenumberVisible extends EventBase<CallbackItem> {
|
|
3395
3460
|
eventName: 'PhonenumberVisible';
|
|
3396
3461
|
}
|
|
3397
|
-
export interface EventPhonenumberCall extends EventBase<
|
|
3462
|
+
export interface EventPhonenumberCall extends EventBase<CallbackItem> {
|
|
3398
3463
|
eventName: 'PhonenumberCall';
|
|
3399
3464
|
}
|
|
3400
|
-
export interface EventMailVisible extends EventBase<
|
|
3465
|
+
export interface EventMailVisible extends EventBase<CallbackItem> {
|
|
3401
3466
|
eventName: 'MailVisible';
|
|
3402
3467
|
}
|
|
3403
|
-
export interface
|
|
3468
|
+
export interface EventInsuranceOpen extends EventBase<CallbackItem> {
|
|
3469
|
+
eventName: 'InsuranceOpen';
|
|
3470
|
+
}
|
|
3471
|
+
export interface EventInsuranceClose extends EventBase<CallbackItem> {
|
|
3472
|
+
eventName: 'InsuranceClose';
|
|
3473
|
+
}
|
|
3474
|
+
export interface EventInsuranceInterest extends EventBase<CallbackItem> {
|
|
3404
3475
|
eventName: 'InsuranceInterest';
|
|
3405
3476
|
}
|
|
3406
|
-
export interface
|
|
3477
|
+
export interface EventFinanceOpen extends EventBase<CallbackItem> {
|
|
3478
|
+
eventName: 'FinanceOpen';
|
|
3479
|
+
}
|
|
3480
|
+
export interface EventFinanceClose extends EventBase<CallbackItem> {
|
|
3481
|
+
eventName: 'FinanceClose';
|
|
3482
|
+
}
|
|
3483
|
+
export interface EventFinanceInterest extends EventBase<CallbackItem> {
|
|
3407
3484
|
eventName: 'FinanceInterest';
|
|
3408
3485
|
}
|
|
3486
|
+
export interface EventSearch extends EventBase<CallbackSearch> {
|
|
3487
|
+
eventName: 'Search';
|
|
3488
|
+
}
|
|
3489
|
+
export interface EventSearchClearQuery extends EventBase<CallbackSearchClearQuery> {
|
|
3490
|
+
eventName: 'SearchClearQuery';
|
|
3491
|
+
}
|
|
3492
|
+
export interface EventSearchClearAllFiltersQuery extends EventBase<CallbackSearchClearAllFiltersQuery> {
|
|
3493
|
+
eventName: 'SearchClearAllFilters';
|
|
3494
|
+
}
|
|
3495
|
+
export interface EventSearchInitiated extends EventBase<CallbackSearchInitiated> {
|
|
3496
|
+
eventName: 'SearchInitiated';
|
|
3497
|
+
}
|
|
3498
|
+
export interface EventSearchCompleted extends EventBase<CallbackSearchCompleted> {
|
|
3499
|
+
eventName: 'SearchCompleted';
|
|
3500
|
+
}
|
|
3501
|
+
export interface EventFilterApply extends EventBase<CallbackFilterApply> {
|
|
3502
|
+
eventName: 'FilterApply';
|
|
3503
|
+
}
|
|
3409
3504
|
export type CallbackAll = (eventName: Omit<EventNames, 'All'>, data: any) => void;
|
|
3410
3505
|
export interface EventAll extends EventBase<CallbackAll> {
|
|
3411
3506
|
eventName: 'All';
|
|
3412
3507
|
}
|
|
3413
|
-
export type EventType = EventHashRouteChange | EventItemClicked |
|
|
3508
|
+
export type EventType = EventHashRouteChange | EventItemClicked | EventEcom | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceOpen | EventInsuranceClose | EventInsuranceInterest | EventFinanceOpen | EventFinanceClose | EventFinanceInterest | EventSearch | EventSearchClearQuery | EventSearchClearAllFiltersQuery | EventSearchInitiated | EventSearchCompleted | EventFilterApply | EventAll;
|
|
3414
3509
|
export type EventNames = Pick<EventType, 'eventName'>['eventName'];
|
|
3415
3510
|
export {};
|
|
3416
3511
|
|
|
3417
3512
|
}
|
|
3418
3513
|
declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
|
|
3419
3514
|
import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from '@wayke-se/components-react/src/utils/pubsub/Actions';
|
|
3420
|
-
import { EventHashRouteChange, EventItemClicked,
|
|
3515
|
+
import { EventHashRouteChange, EventItemClicked, EventEcom, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventFinanceInterest, EventAll, EventType, EventNames, EventSearch, EventFinanceOpen, EventFinanceClose, EventInsuranceClose, EventInsuranceOpen, EventFilterApply, EventSearchCompleted, EventSearchInitiated, EventSearchClearQuery, EventSearchClearAllFiltersQuery } from '@wayke-se/components-react/src/utils/pubsub/Events';
|
|
3421
3516
|
export type EventSubscriptions = {
|
|
3422
3517
|
HashRouteChange: EventHashRouteChange[];
|
|
3423
3518
|
ItemClicked: EventItemClicked[];
|
|
3424
|
-
|
|
3425
|
-
EcomOnUserEvent: EventEcomOnUser[];
|
|
3426
|
-
EcomOnExit: EventEcomOnExit[];
|
|
3519
|
+
Ecom: EventEcom[];
|
|
3427
3520
|
ImagesClick: EventImagesClick[];
|
|
3428
3521
|
OptionsClick: EventOptionsClick[];
|
|
3429
3522
|
PhonenumberVisible: EventPhonenumberVisible[];
|
|
3430
3523
|
PhonenumberCall: EventPhonenumberCall[];
|
|
3431
3524
|
MailVisible: EventMailVisible[];
|
|
3525
|
+
InsuranceOpen: EventInsuranceOpen[];
|
|
3526
|
+
InsuranceClose: EventInsuranceClose[];
|
|
3432
3527
|
InsuranceInterest: EventInsuranceInterest[];
|
|
3528
|
+
FinanceOpen: EventFinanceOpen[];
|
|
3529
|
+
FinanceClose: EventFinanceClose[];
|
|
3433
3530
|
FinanceInterest: EventFinanceInterest[];
|
|
3531
|
+
Search: EventSearch[];
|
|
3532
|
+
SearchClearQuery: EventSearchClearQuery[];
|
|
3533
|
+
SearchClearAllFilters: EventSearchClearAllFiltersQuery[];
|
|
3534
|
+
SearchInitiated: EventSearchInitiated[];
|
|
3535
|
+
SearchCompleted: EventSearchCompleted[];
|
|
3536
|
+
FilterApply: EventFilterApply[];
|
|
3434
3537
|
All: EventAll[];
|
|
3435
3538
|
};
|
|
3436
3539
|
export type ActionSubscriptions = {
|