@wayke-se/components-react 4.0.0-beta.9 → 4.0.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 +64 -22
- package/dist/index.d.ts +111 -46
- package/dist/index.js +898 -898
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +878 -878
- 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,66 @@ 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
|
+
| Search | (data) => void | CallbackSearchData |
|
|
373
|
+
| Search | (data) => void | CallbackSearchData |
|
|
374
|
+
| FilterApply | (data) => void | CallbackFilterApplyData |
|
|
375
|
+
| All | (eventName, data) => void | CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchData \| CallbackFilterApplyData |
|
|
372
376
|
* `All` - Subscribes to all events.
|
|
373
377
|
|
|
378
|
+
#### CallbackHashRouteChangeData
|
|
379
|
+
| Property | Type |
|
|
380
|
+
|-----------|-----------|
|
|
381
|
+
| id | string |
|
|
382
|
+
|
|
383
|
+
#### CallbackItemData
|
|
384
|
+
| Property | Type |
|
|
385
|
+
|---------------|-----------|
|
|
386
|
+
| id | string |
|
|
387
|
+
| branchName | string |
|
|
388
|
+
| branchId | string |
|
|
389
|
+
|
|
390
|
+
#### CallbackEcomData
|
|
391
|
+
| Property | Type |
|
|
392
|
+
|---------------|-----------------------|
|
|
393
|
+
| id | string |
|
|
394
|
+
| branchName | string |
|
|
395
|
+
| branchId | string |
|
|
396
|
+
| view | EcomView |
|
|
397
|
+
| event | EcomView |
|
|
398
|
+
| currentStep | EcomStep \| undefined |
|
|
399
|
+
| data | any \| undefined |
|
|
400
|
+
|
|
401
|
+
#### CallbackSearchData
|
|
402
|
+
| Property | Type |
|
|
403
|
+
|-----------|-----------|
|
|
404
|
+
| query | string |
|
|
405
|
+
|
|
406
|
+
#### CallbackFilterApplyData
|
|
407
|
+
| Property | Type |
|
|
408
|
+
|-----------|-----------------------|
|
|
409
|
+
| type | "checkbox" \| "range" |
|
|
410
|
+
| filter | string |
|
|
411
|
+
| value | string \| undefined |
|
|
412
|
+
| checked | boolean \| "range" |
|
|
413
|
+
| min | number \| "range" |
|
|
414
|
+
| max | number \| "range" |
|
|
415
|
+
|
|
374
416
|
## Theme
|
|
375
417
|
It is possible to apply a custom theme using *CSS*. The things that can be styled are:
|
|
376
418
|
- 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
|
}
|
|
@@ -1399,24 +1400,26 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/rangeFacet
|
|
|
1399
1400
|
}
|
|
1400
1401
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/LoanModal' {
|
|
1401
1402
|
import React from 'react';
|
|
1402
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1403
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1403
1404
|
interface LoanModalProps {
|
|
1404
1405
|
id: string;
|
|
1406
|
+
branch?: Maybe<Branch>;
|
|
1405
1407
|
financialOption: FinancialOption;
|
|
1406
1408
|
onClose: () => void;
|
|
1407
1409
|
}
|
|
1408
|
-
const LoanModal: ({ id, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1410
|
+
const LoanModal: ({ id, branch, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1409
1411
|
export default LoanModal;
|
|
1410
1412
|
|
|
1411
1413
|
}
|
|
1412
1414
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/index' {
|
|
1413
1415
|
import React from 'react';
|
|
1414
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1416
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1415
1417
|
interface FinancialOptionsProps {
|
|
1416
1418
|
id: string;
|
|
1419
|
+
branch?: Maybe<Branch>;
|
|
1417
1420
|
financialOptions: FinancialOption[];
|
|
1418
1421
|
}
|
|
1419
|
-
const FinancialOptions: ({ id, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1422
|
+
const FinancialOptions: ({ id, branch, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1420
1423
|
export default FinancialOptions;
|
|
1421
1424
|
|
|
1422
1425
|
}
|
|
@@ -1432,12 +1435,13 @@ declare module '@wayke-se/components-react/src/components/FinancialOptions/leasi
|
|
|
1432
1435
|
}
|
|
1433
1436
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/loan' {
|
|
1434
1437
|
import React from 'react';
|
|
1435
|
-
import { FinancialOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1438
|
+
import { Branch, FinancialOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1436
1439
|
interface LoanProps {
|
|
1437
1440
|
id: string;
|
|
1441
|
+
branch?: Maybe<Branch>;
|
|
1438
1442
|
financialOption: FinancialOption;
|
|
1439
1443
|
}
|
|
1440
|
-
const Loan: ({ id, financialOption }: LoanProps) => React.JSX.Element;
|
|
1444
|
+
const Loan: ({ id, branch, financialOption }: LoanProps) => React.JSX.Element;
|
|
1441
1445
|
export default Loan;
|
|
1442
1446
|
|
|
1443
1447
|
}
|
|
@@ -1453,12 +1457,14 @@ declare module '@wayke-se/components-react/src/components/Gallery/MediaButton' {
|
|
|
1453
1457
|
}
|
|
1454
1458
|
declare module '@wayke-se/components-react/src/components/Gallery/index' {
|
|
1455
1459
|
import React from 'react';
|
|
1456
|
-
import { Media } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1460
|
+
import { Branch, Maybe, Media } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1457
1461
|
interface GalleryProps {
|
|
1462
|
+
id: string;
|
|
1463
|
+
branch?: Maybe<Branch>;
|
|
1458
1464
|
media?: Media[];
|
|
1459
1465
|
placeholderImage?: string;
|
|
1460
1466
|
}
|
|
1461
|
-
const Gallery: ({ media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1467
|
+
const Gallery: ({ id, branch, media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1462
1468
|
export default Gallery;
|
|
1463
1469
|
|
|
1464
1470
|
}
|
|
@@ -1489,6 +1495,7 @@ declare module '@wayke-se/components-react/src/components/Gallery/wrapper' {
|
|
|
1489
1495
|
}
|
|
1490
1496
|
declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
1491
1497
|
import React from 'react';
|
|
1498
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
1492
1499
|
import { Document } from '@wayke-se/components-react/src/@types/search';
|
|
1493
1500
|
interface GridProps {
|
|
1494
1501
|
documents?: Document[];
|
|
@@ -1496,7 +1503,7 @@ declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
|
1496
1503
|
pathRoute?: string;
|
|
1497
1504
|
placeholderImage?: string;
|
|
1498
1505
|
displayBranchName?: boolean;
|
|
1499
|
-
onClickItem?: (
|
|
1506
|
+
onClickItem?: (data: OnItemClick) => void;
|
|
1500
1507
|
}
|
|
1501
1508
|
const Grid: ({ documents, placeholderImage, hashRoute, pathRoute, displayBranchName, onClickItem, }: GridProps) => React.JSX.Element | null;
|
|
1502
1509
|
export default Grid;
|
|
@@ -1702,11 +1709,13 @@ declare module '@wayke-se/components-react/src/components/InsuranceOptions/Insur
|
|
|
1702
1709
|
}
|
|
1703
1710
|
declare module '@wayke-se/components-react/src/components/InsuranceOptions/InsuranceFree' {
|
|
1704
1711
|
import React from 'react';
|
|
1705
|
-
import { InsuranceOption } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1712
|
+
import { Branch, InsuranceOption, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
1706
1713
|
interface InsuranceOptions {
|
|
1714
|
+
id: string;
|
|
1715
|
+
branch?: Maybe<Branch>;
|
|
1707
1716
|
insuranceOptions: InsuranceOption[];
|
|
1708
1717
|
}
|
|
1709
|
-
const Insurance: ({ insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1718
|
+
const Insurance: ({ id, branch, insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1710
1719
|
export default Insurance;
|
|
1711
1720
|
|
|
1712
1721
|
}
|
|
@@ -2103,13 +2112,19 @@ declare module '@wayke-se/components-react/src/components/PriceTable/wrapper' {
|
|
|
2103
2112
|
declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
2104
2113
|
import React from 'react';
|
|
2105
2114
|
import { ItemProps } from '@wayke-se/components-react/src/components/UspList/index';
|
|
2106
|
-
import { File } from '@wayke-se/components-react/src/@types/search';
|
|
2115
|
+
import { Branch, File } from '@wayke-se/components-react/src/@types/search';
|
|
2116
|
+
export interface OnItemClick {
|
|
2117
|
+
id: string;
|
|
2118
|
+
branchId?: string;
|
|
2119
|
+
branchName?: string;
|
|
2120
|
+
}
|
|
2107
2121
|
interface Props {
|
|
2108
2122
|
id: string;
|
|
2109
2123
|
title: string;
|
|
2110
2124
|
href?: string;
|
|
2111
2125
|
imageFile?: File;
|
|
2112
2126
|
pathRoute?: string;
|
|
2127
|
+
branch?: Branch;
|
|
2113
2128
|
placeholderImage?: string;
|
|
2114
2129
|
description?: string;
|
|
2115
2130
|
uspList?: ItemProps[];
|
|
@@ -2118,9 +2133,9 @@ declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
|
2118
2133
|
oldPrice?: string;
|
|
2119
2134
|
branchName?: string;
|
|
2120
2135
|
businessLeasingPrice?: string;
|
|
2121
|
-
onClick?: (
|
|
2136
|
+
onClick?: (data: OnItemClick) => void;
|
|
2122
2137
|
}
|
|
2123
|
-
const ProductCard: ({ id, title, href, imageFile, pathRoute, placeholderImage, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, onClick, }: Props) => React.JSX.Element;
|
|
2138
|
+
const ProductCard: ({ id, title, href, imageFile, pathRoute, placeholderImage, branch, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, onClick, }: Props) => React.JSX.Element;
|
|
2124
2139
|
export default ProductCard;
|
|
2125
2140
|
|
|
2126
2141
|
}
|
|
@@ -2843,8 +2858,8 @@ declare module '@wayke-se/components-react/src/index' {
|
|
|
2843
2858
|
import WaykeItemProvider, { WaykeItemProviderSettings } from '@wayke-se/components-react/src/providers/WaykeItemProvidet';
|
|
2844
2859
|
import WaykePubSub, { EventSubscriptions } from '@wayke-se/components-react/src/utils/pubsub/pubsub';
|
|
2845
2860
|
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,
|
|
2861
|
+
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';
|
|
2862
|
+
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
2863
|
export default WaykeComposite;
|
|
2849
2864
|
|
|
2850
2865
|
}
|
|
@@ -2935,6 +2950,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2935
2950
|
import React from 'react';
|
|
2936
2951
|
import { SearchFilterTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
2937
2952
|
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
2953
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
2938
2954
|
export interface WaykeSearchProps {
|
|
2939
2955
|
marketCode?: MarketCode;
|
|
2940
2956
|
filterList?: SearchFilterTypes[];
|
|
@@ -2946,7 +2962,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2946
2962
|
pathRoute?: string;
|
|
2947
2963
|
modifyDocumentTitleSearch?: string;
|
|
2948
2964
|
displayBranchName?: boolean;
|
|
2949
|
-
onClickSearchItem?: (
|
|
2965
|
+
onClickSearchItem?: (data: OnItemClick) => void;
|
|
2950
2966
|
}
|
|
2951
2967
|
const WaykeSearch: ({ marketCode, filterList, initialQueryParams, hashRoute, pathRoute, removeSearchBar, placeholderImage, removeFilterOptions, modifyDocumentTitleSearch, displayBranchName, onClickSearchItem, }: WaykeSearchProps) => React.JSX.Element | null;
|
|
2952
2968
|
export default WaykeSearch;
|
|
@@ -3000,7 +3016,10 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/BranchModal' {
|
|
|
3000
3016
|
declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
3001
3017
|
import React from 'react';
|
|
3002
3018
|
import { Manufacturer, PackageOption, Ecommerce, ContactOptions, Branch } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
3019
|
+
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
3003
3020
|
interface CheckList {
|
|
3021
|
+
id: string;
|
|
3022
|
+
marketCode?: MarketCode;
|
|
3004
3023
|
manufacturer?: Manufacturer | null;
|
|
3005
3024
|
packageOptions: PackageOption[];
|
|
3006
3025
|
ecommerce?: Ecommerce | null;
|
|
@@ -3010,7 +3029,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
|
3010
3029
|
availableFrom?: Date | null;
|
|
3011
3030
|
toggleEcomModal: () => void;
|
|
3012
3031
|
}
|
|
3013
|
-
const CheckList: ({ manufacturer, packageOptions, ecommerce, branch, contact, availableFrom, toggleEcomModal, loadingCentralStorageVehicle, }: CheckList) => React.JSX.Element;
|
|
3032
|
+
const CheckList: ({ id, marketCode, manufacturer, packageOptions, ecommerce, branch, contact, availableFrom, toggleEcomModal, loadingCentralStorageVehicle, }: CheckList) => React.JSX.Element;
|
|
3014
3033
|
export default CheckList;
|
|
3015
3034
|
|
|
3016
3035
|
}
|
|
@@ -3059,7 +3078,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/MetadataItem'
|
|
|
3059
3078
|
declare module '@wayke-se/components-react/src/layouts/searchItem/PackageOptionModal' {
|
|
3060
3079
|
import React from 'react';
|
|
3061
3080
|
interface ModelLink {
|
|
3062
|
-
|
|
3081
|
+
url?: string | null;
|
|
3063
3082
|
title?: string | null;
|
|
3064
3083
|
}
|
|
3065
3084
|
export interface PackageOptionModalData {
|
|
@@ -3144,11 +3163,12 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/index' {
|
|
|
3144
3163
|
declare module '@wayke-se/components-react/src/layouts/searchItem/useEcom' {
|
|
3145
3164
|
/// <reference types="react" />
|
|
3146
3165
|
import { SettingsContextProps } from '@wayke-se/components-react/src/State/Settings/SettingsContext';
|
|
3166
|
+
import { Branch, Maybe } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
3147
3167
|
interface EcomWeb {
|
|
3148
3168
|
start: () => void;
|
|
3149
3169
|
destroy: () => void;
|
|
3150
3170
|
}
|
|
3151
|
-
function useEcom(id: string, ecomSettings: SettingsContextProps['ecomSettings']): import("react").MutableRefObject<EcomWeb | undefined>;
|
|
3171
|
+
function useEcom(id: string, ecomSettings: SettingsContextProps['ecomSettings'], branch?: Maybe<Branch>): import("react").MutableRefObject<EcomWeb | undefined>;
|
|
3152
3172
|
export default useEcom;
|
|
3153
3173
|
|
|
3154
3174
|
}
|
|
@@ -3330,11 +3350,12 @@ declare module '@wayke-se/components-react/src/utils/deep-copy' {
|
|
|
3330
3350
|
declare module '@wayke-se/components-react/src/utils/formats' {
|
|
3331
3351
|
export const notEmpty: <TValue>(value: TValue | null | undefined) => value is TValue;
|
|
3332
3352
|
export const numberSeparator: (value: number, n?: number, x?: number, s?: string, c?: string) => string | null;
|
|
3353
|
+
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
3333
3354
|
export const FacetIdToTitle: (f: string) => string;
|
|
3334
3355
|
export const dateTimeFormat: {
|
|
3335
3356
|
YearMonth: number;
|
|
3336
3357
|
DayMonth: number;
|
|
3337
|
-
format: (value: string | Date, format: number) => string;
|
|
3358
|
+
format: (value: string | Date, format: number, marketCode?: MarketCode) => string;
|
|
3338
3359
|
};
|
|
3339
3360
|
|
|
3340
3361
|
}
|
|
@@ -3362,75 +3383,119 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Actions' {
|
|
|
3362
3383
|
|
|
3363
3384
|
}
|
|
3364
3385
|
declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
|
|
3386
|
+
import { EcomEvent, EcomStep, EcomView } from '@wayke-se/ecom-web/src/Utils/ecomEvent';
|
|
3365
3387
|
interface EventBase<Callback> {
|
|
3366
3388
|
eventName: EventNames;
|
|
3367
3389
|
callback: Callback;
|
|
3368
3390
|
}
|
|
3369
3391
|
export type CallbackEmpty = () => void;
|
|
3370
|
-
|
|
3392
|
+
interface CallbackHashRouteChangeData {
|
|
3393
|
+
id: string;
|
|
3394
|
+
}
|
|
3395
|
+
export type CallbackHashRouteChange = (data: CallbackHashRouteChangeData) => void;
|
|
3396
|
+
interface CallbackItemData {
|
|
3397
|
+
id: string;
|
|
3398
|
+
branchId: string;
|
|
3399
|
+
branchName: string;
|
|
3400
|
+
}
|
|
3401
|
+
export type CallbackItem = (data: CallbackItemData) => void;
|
|
3402
|
+
export interface CallbackSearchData {
|
|
3403
|
+
query: string;
|
|
3404
|
+
}
|
|
3405
|
+
export type CallbackSearch = (data: CallbackSearchData) => void;
|
|
3406
|
+
export interface CallbackEcomData extends CallbackItemData {
|
|
3407
|
+
view: EcomView;
|
|
3408
|
+
event: EcomEvent;
|
|
3409
|
+
currentStep?: EcomStep;
|
|
3410
|
+
data?: any;
|
|
3411
|
+
}
|
|
3412
|
+
export interface CallbackFilterApplyData {
|
|
3413
|
+
type: 'checkbox' | 'range';
|
|
3414
|
+
filter: string;
|
|
3415
|
+
value?: string;
|
|
3416
|
+
checked?: boolean;
|
|
3417
|
+
min?: number;
|
|
3418
|
+
max?: number;
|
|
3419
|
+
}
|
|
3420
|
+
export type CallbackFilterApply = (data: CallbackFilterApplyData) => void;
|
|
3421
|
+
export type CallbackEcom = (data: CallbackEcomData) => void;
|
|
3371
3422
|
export interface EventHashRouteChange extends EventBase<CallbackHashRouteChange> {
|
|
3372
3423
|
eventName: 'HashRouteChange';
|
|
3373
3424
|
}
|
|
3374
|
-
export
|
|
3375
|
-
export interface EventItemClicked extends EventBase<CallbackEventItemClicked> {
|
|
3425
|
+
export interface EventItemClicked extends EventBase<CallbackItem> {
|
|
3376
3426
|
eventName: 'ItemClicked';
|
|
3377
3427
|
}
|
|
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';
|
|
3428
|
+
export interface EventEcom extends EventBase<CallbackEcom> {
|
|
3429
|
+
eventName: 'Ecom';
|
|
3384
3430
|
}
|
|
3385
|
-
export interface
|
|
3386
|
-
eventName: 'EcomOnExit';
|
|
3387
|
-
}
|
|
3388
|
-
export interface EventImagesClick extends EventBase<CallbackEmpty> {
|
|
3431
|
+
export interface EventImagesClick extends EventBase<CallbackItem> {
|
|
3389
3432
|
eventName: 'ImagesClick';
|
|
3390
3433
|
}
|
|
3391
|
-
export interface EventOptionsClick extends EventBase<
|
|
3434
|
+
export interface EventOptionsClick extends EventBase<CallbackItem> {
|
|
3392
3435
|
eventName: 'OptionsClick';
|
|
3393
3436
|
}
|
|
3394
|
-
export interface EventPhonenumberVisible extends EventBase<
|
|
3437
|
+
export interface EventPhonenumberVisible extends EventBase<CallbackItem> {
|
|
3395
3438
|
eventName: 'PhonenumberVisible';
|
|
3396
3439
|
}
|
|
3397
|
-
export interface EventPhonenumberCall extends EventBase<
|
|
3440
|
+
export interface EventPhonenumberCall extends EventBase<CallbackItem> {
|
|
3398
3441
|
eventName: 'PhonenumberCall';
|
|
3399
3442
|
}
|
|
3400
|
-
export interface EventMailVisible extends EventBase<
|
|
3443
|
+
export interface EventMailVisible extends EventBase<CallbackItem> {
|
|
3401
3444
|
eventName: 'MailVisible';
|
|
3402
3445
|
}
|
|
3403
|
-
export interface
|
|
3446
|
+
export interface EventInsuranceOpen extends EventBase<CallbackItem> {
|
|
3447
|
+
eventName: 'InsuranceOpen';
|
|
3448
|
+
}
|
|
3449
|
+
export interface EventInsuranceClose extends EventBase<CallbackItem> {
|
|
3450
|
+
eventName: 'InsuranceClose';
|
|
3451
|
+
}
|
|
3452
|
+
export interface EventInsuranceInterest extends EventBase<CallbackItem> {
|
|
3404
3453
|
eventName: 'InsuranceInterest';
|
|
3405
3454
|
}
|
|
3406
|
-
export interface
|
|
3455
|
+
export interface EventFinanceOpen extends EventBase<CallbackItem> {
|
|
3456
|
+
eventName: 'FinanceOpen';
|
|
3457
|
+
}
|
|
3458
|
+
export interface EventFinanceClose extends EventBase<CallbackItem> {
|
|
3459
|
+
eventName: 'FinanceClose';
|
|
3460
|
+
}
|
|
3461
|
+
export interface EventFinanceInterest extends EventBase<CallbackItem> {
|
|
3407
3462
|
eventName: 'FinanceInterest';
|
|
3408
3463
|
}
|
|
3464
|
+
export interface EventSearch extends EventBase<CallbackSearch> {
|
|
3465
|
+
eventName: 'Search';
|
|
3466
|
+
}
|
|
3467
|
+
export interface EventFilterApply extends EventBase<CallbackFilterApply> {
|
|
3468
|
+
eventName: 'FilterApply';
|
|
3469
|
+
}
|
|
3409
3470
|
export type CallbackAll = (eventName: Omit<EventNames, 'All'>, data: any) => void;
|
|
3410
3471
|
export interface EventAll extends EventBase<CallbackAll> {
|
|
3411
3472
|
eventName: 'All';
|
|
3412
3473
|
}
|
|
3413
|
-
export type EventType = EventHashRouteChange | EventItemClicked |
|
|
3474
|
+
export type EventType = EventHashRouteChange | EventItemClicked | EventEcom | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceOpen | EventInsuranceClose | EventInsuranceInterest | EventFinanceOpen | EventFinanceClose | EventFinanceInterest | EventSearch | EventFilterApply | EventAll;
|
|
3414
3475
|
export type EventNames = Pick<EventType, 'eventName'>['eventName'];
|
|
3415
3476
|
export {};
|
|
3416
3477
|
|
|
3417
3478
|
}
|
|
3418
3479
|
declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
|
|
3419
3480
|
import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from '@wayke-se/components-react/src/utils/pubsub/Actions';
|
|
3420
|
-
import { EventHashRouteChange, EventItemClicked,
|
|
3481
|
+
import { EventHashRouteChange, EventItemClicked, EventEcom, EventImagesClick, EventOptionsClick, EventPhonenumberVisible, EventPhonenumberCall, EventMailVisible, EventInsuranceInterest, EventFinanceInterest, EventAll, EventType, EventNames, EventSearch, EventFinanceOpen, EventFinanceClose, EventInsuranceClose, EventInsuranceOpen, EventFilterApply } from '@wayke-se/components-react/src/utils/pubsub/Events';
|
|
3421
3482
|
export type EventSubscriptions = {
|
|
3422
3483
|
HashRouteChange: EventHashRouteChange[];
|
|
3423
3484
|
ItemClicked: EventItemClicked[];
|
|
3424
|
-
|
|
3425
|
-
EcomOnUserEvent: EventEcomOnUser[];
|
|
3426
|
-
EcomOnExit: EventEcomOnExit[];
|
|
3485
|
+
Ecom: EventEcom[];
|
|
3427
3486
|
ImagesClick: EventImagesClick[];
|
|
3428
3487
|
OptionsClick: EventOptionsClick[];
|
|
3429
3488
|
PhonenumberVisible: EventPhonenumberVisible[];
|
|
3430
3489
|
PhonenumberCall: EventPhonenumberCall[];
|
|
3431
3490
|
MailVisible: EventMailVisible[];
|
|
3491
|
+
InsuranceOpen: EventInsuranceOpen[];
|
|
3492
|
+
InsuranceClose: EventInsuranceClose[];
|
|
3432
3493
|
InsuranceInterest: EventInsuranceInterest[];
|
|
3494
|
+
FinanceOpen: EventFinanceOpen[];
|
|
3495
|
+
FinanceClose: EventFinanceClose[];
|
|
3433
3496
|
FinanceInterest: EventFinanceInterest[];
|
|
3497
|
+
Search: EventSearch[];
|
|
3498
|
+
FilterApply: EventFilterApply[];
|
|
3434
3499
|
All: EventAll[];
|
|
3435
3500
|
};
|
|
3436
3501
|
export type ActionSubscriptions = {
|