@wayke-se/components-react 4.0.0-beta.8 → 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 +114 -46
- package/dist/index.js +914 -914
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +761 -761
- 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
|
@@ -529,6 +529,8 @@ declare module '@wayke-se/components-react/src/@types/search' {
|
|
|
529
529
|
format: string;
|
|
530
530
|
id: string;
|
|
531
531
|
url: string;
|
|
532
|
+
webp: string;
|
|
533
|
+
jpeg: string;
|
|
532
534
|
}
|
|
533
535
|
export interface File {
|
|
534
536
|
formats: Format[];
|
|
@@ -911,10 +913,11 @@ declare module '@wayke-se/components-react/src/components/ActionList/index' {
|
|
|
911
913
|
import React from 'react';
|
|
912
914
|
import { Maybe, ContactOptions, Branch } from '@wayke-se/components-react/src/@types/codegen/types';
|
|
913
915
|
interface ActionListProps {
|
|
916
|
+
id: string;
|
|
914
917
|
branch?: Maybe<Branch>;
|
|
915
918
|
contact?: Maybe<ContactOptions>;
|
|
916
919
|
}
|
|
917
|
-
const ActionList: ({ contact, branch }: ActionListProps) => React.JSX.Element | null;
|
|
920
|
+
const ActionList: ({ id, contact, branch }: ActionListProps) => React.JSX.Element | null;
|
|
918
921
|
export default ActionList;
|
|
919
922
|
|
|
920
923
|
}
|
|
@@ -1397,24 +1400,26 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/rangeFacet
|
|
|
1397
1400
|
}
|
|
1398
1401
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/LoanModal' {
|
|
1399
1402
|
import React from 'react';
|
|
1400
|
-
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';
|
|
1401
1404
|
interface LoanModalProps {
|
|
1402
1405
|
id: string;
|
|
1406
|
+
branch?: Maybe<Branch>;
|
|
1403
1407
|
financialOption: FinancialOption;
|
|
1404
1408
|
onClose: () => void;
|
|
1405
1409
|
}
|
|
1406
|
-
const LoanModal: ({ id, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1410
|
+
const LoanModal: ({ id, branch, financialOption, onClose }: LoanModalProps) => React.JSX.Element;
|
|
1407
1411
|
export default LoanModal;
|
|
1408
1412
|
|
|
1409
1413
|
}
|
|
1410
1414
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/index' {
|
|
1411
1415
|
import React from 'react';
|
|
1412
|
-
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';
|
|
1413
1417
|
interface FinancialOptionsProps {
|
|
1414
1418
|
id: string;
|
|
1419
|
+
branch?: Maybe<Branch>;
|
|
1415
1420
|
financialOptions: FinancialOption[];
|
|
1416
1421
|
}
|
|
1417
|
-
const FinancialOptions: ({ id, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1422
|
+
const FinancialOptions: ({ id, branch, financialOptions }: FinancialOptionsProps) => React.JSX.Element;
|
|
1418
1423
|
export default FinancialOptions;
|
|
1419
1424
|
|
|
1420
1425
|
}
|
|
@@ -1430,12 +1435,13 @@ declare module '@wayke-se/components-react/src/components/FinancialOptions/leasi
|
|
|
1430
1435
|
}
|
|
1431
1436
|
declare module '@wayke-se/components-react/src/components/FinancialOptions/loan' {
|
|
1432
1437
|
import React from 'react';
|
|
1433
|
-
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';
|
|
1434
1439
|
interface LoanProps {
|
|
1435
1440
|
id: string;
|
|
1441
|
+
branch?: Maybe<Branch>;
|
|
1436
1442
|
financialOption: FinancialOption;
|
|
1437
1443
|
}
|
|
1438
|
-
const Loan: ({ id, financialOption }: LoanProps) => React.JSX.Element;
|
|
1444
|
+
const Loan: ({ id, branch, financialOption }: LoanProps) => React.JSX.Element;
|
|
1439
1445
|
export default Loan;
|
|
1440
1446
|
|
|
1441
1447
|
}
|
|
@@ -1451,12 +1457,14 @@ declare module '@wayke-se/components-react/src/components/Gallery/MediaButton' {
|
|
|
1451
1457
|
}
|
|
1452
1458
|
declare module '@wayke-se/components-react/src/components/Gallery/index' {
|
|
1453
1459
|
import React from 'react';
|
|
1454
|
-
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';
|
|
1455
1461
|
interface GalleryProps {
|
|
1462
|
+
id: string;
|
|
1463
|
+
branch?: Maybe<Branch>;
|
|
1456
1464
|
media?: Media[];
|
|
1457
1465
|
placeholderImage?: string;
|
|
1458
1466
|
}
|
|
1459
|
-
const Gallery: ({ media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1467
|
+
const Gallery: ({ id, branch, media, placeholderImage }: GalleryProps) => React.JSX.Element;
|
|
1460
1468
|
export default Gallery;
|
|
1461
1469
|
|
|
1462
1470
|
}
|
|
@@ -1487,6 +1495,7 @@ declare module '@wayke-se/components-react/src/components/Gallery/wrapper' {
|
|
|
1487
1495
|
}
|
|
1488
1496
|
declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
1489
1497
|
import React from 'react';
|
|
1498
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
1490
1499
|
import { Document } from '@wayke-se/components-react/src/@types/search';
|
|
1491
1500
|
interface GridProps {
|
|
1492
1501
|
documents?: Document[];
|
|
@@ -1494,7 +1503,7 @@ declare module '@wayke-se/components-react/src/components/Grid/index' {
|
|
|
1494
1503
|
pathRoute?: string;
|
|
1495
1504
|
placeholderImage?: string;
|
|
1496
1505
|
displayBranchName?: boolean;
|
|
1497
|
-
onClickItem?: (
|
|
1506
|
+
onClickItem?: (data: OnItemClick) => void;
|
|
1498
1507
|
}
|
|
1499
1508
|
const Grid: ({ documents, placeholderImage, hashRoute, pathRoute, displayBranchName, onClickItem, }: GridProps) => React.JSX.Element | null;
|
|
1500
1509
|
export default Grid;
|
|
@@ -1700,11 +1709,13 @@ declare module '@wayke-se/components-react/src/components/InsuranceOptions/Insur
|
|
|
1700
1709
|
}
|
|
1701
1710
|
declare module '@wayke-se/components-react/src/components/InsuranceOptions/InsuranceFree' {
|
|
1702
1711
|
import React from 'react';
|
|
1703
|
-
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';
|
|
1704
1713
|
interface InsuranceOptions {
|
|
1714
|
+
id: string;
|
|
1715
|
+
branch?: Maybe<Branch>;
|
|
1705
1716
|
insuranceOptions: InsuranceOption[];
|
|
1706
1717
|
}
|
|
1707
|
-
const Insurance: ({ insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1718
|
+
const Insurance: ({ id, branch, insuranceOptions }: InsuranceOptions) => React.JSX.Element | null;
|
|
1708
1719
|
export default Insurance;
|
|
1709
1720
|
|
|
1710
1721
|
}
|
|
@@ -2101,12 +2112,19 @@ declare module '@wayke-se/components-react/src/components/PriceTable/wrapper' {
|
|
|
2101
2112
|
declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
2102
2113
|
import React from 'react';
|
|
2103
2114
|
import { ItemProps } from '@wayke-se/components-react/src/components/UspList/index';
|
|
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
|
+
}
|
|
2104
2121
|
interface Props {
|
|
2105
2122
|
id: string;
|
|
2106
2123
|
title: string;
|
|
2107
2124
|
href?: string;
|
|
2108
|
-
|
|
2125
|
+
imageFile?: File;
|
|
2109
2126
|
pathRoute?: string;
|
|
2127
|
+
branch?: Branch;
|
|
2110
2128
|
placeholderImage?: string;
|
|
2111
2129
|
description?: string;
|
|
2112
2130
|
uspList?: ItemProps[];
|
|
@@ -2115,9 +2133,9 @@ declare module '@wayke-se/components-react/src/components/ProductCard/index' {
|
|
|
2115
2133
|
oldPrice?: string;
|
|
2116
2134
|
branchName?: string;
|
|
2117
2135
|
businessLeasingPrice?: string;
|
|
2118
|
-
onClick?: (
|
|
2136
|
+
onClick?: (data: OnItemClick) => void;
|
|
2119
2137
|
}
|
|
2120
|
-
const ProductCard: ({ id, title, href,
|
|
2138
|
+
const ProductCard: ({ id, title, href, imageFile, pathRoute, placeholderImage, branch, branchName, description, uspList, price, oldPrice, leasingPrice, businessLeasingPrice, onClick, }: Props) => React.JSX.Element;
|
|
2121
2139
|
export default ProductCard;
|
|
2122
2140
|
|
|
2123
2141
|
}
|
|
@@ -2840,8 +2858,8 @@ declare module '@wayke-se/components-react/src/index' {
|
|
|
2840
2858
|
import WaykeItemProvider, { WaykeItemProviderSettings } from '@wayke-se/components-react/src/providers/WaykeItemProvidet';
|
|
2841
2859
|
import WaykePubSub, { EventSubscriptions } from '@wayke-se/components-react/src/utils/pubsub/pubsub';
|
|
2842
2860
|
import type { SearchFilterTypes, SearchFilterNameTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
2843
|
-
import type { EventHashRouteChange, EventItemClicked,
|
|
2844
|
-
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, };
|
|
2845
2863
|
export default WaykeComposite;
|
|
2846
2864
|
|
|
2847
2865
|
}
|
|
@@ -2932,6 +2950,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2932
2950
|
import React from 'react';
|
|
2933
2951
|
import { SearchFilterTypes } from '@wayke-se/components-react/src/@types/filter';
|
|
2934
2952
|
import { MarketCode } from '@wayke-se/components-react/src/@types/market';
|
|
2953
|
+
import { OnItemClick } from '@wayke-se/components-react/src/components/ProductCard/index';
|
|
2935
2954
|
export interface WaykeSearchProps {
|
|
2936
2955
|
marketCode?: MarketCode;
|
|
2937
2956
|
filterList?: SearchFilterTypes[];
|
|
@@ -2943,7 +2962,7 @@ declare module '@wayke-se/components-react/src/layouts/search/index' {
|
|
|
2943
2962
|
pathRoute?: string;
|
|
2944
2963
|
modifyDocumentTitleSearch?: string;
|
|
2945
2964
|
displayBranchName?: boolean;
|
|
2946
|
-
onClickSearchItem?: (
|
|
2965
|
+
onClickSearchItem?: (data: OnItemClick) => void;
|
|
2947
2966
|
}
|
|
2948
2967
|
const WaykeSearch: ({ marketCode, filterList, initialQueryParams, hashRoute, pathRoute, removeSearchBar, placeholderImage, removeFilterOptions, modifyDocumentTitleSearch, displayBranchName, onClickSearchItem, }: WaykeSearchProps) => React.JSX.Element | null;
|
|
2949
2968
|
export default WaykeSearch;
|
|
@@ -2997,7 +3016,10 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/BranchModal' {
|
|
|
2997
3016
|
declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
2998
3017
|
import React from 'react';
|
|
2999
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';
|
|
3000
3020
|
interface CheckList {
|
|
3021
|
+
id: string;
|
|
3022
|
+
marketCode?: MarketCode;
|
|
3001
3023
|
manufacturer?: Manufacturer | null;
|
|
3002
3024
|
packageOptions: PackageOption[];
|
|
3003
3025
|
ecommerce?: Ecommerce | null;
|
|
@@ -3007,7 +3029,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/CheckList' {
|
|
|
3007
3029
|
availableFrom?: Date | null;
|
|
3008
3030
|
toggleEcomModal: () => void;
|
|
3009
3031
|
}
|
|
3010
|
-
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;
|
|
3011
3033
|
export default CheckList;
|
|
3012
3034
|
|
|
3013
3035
|
}
|
|
@@ -3056,7 +3078,7 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/MetadataItem'
|
|
|
3056
3078
|
declare module '@wayke-se/components-react/src/layouts/searchItem/PackageOptionModal' {
|
|
3057
3079
|
import React from 'react';
|
|
3058
3080
|
interface ModelLink {
|
|
3059
|
-
|
|
3081
|
+
url?: string | null;
|
|
3060
3082
|
title?: string | null;
|
|
3061
3083
|
}
|
|
3062
3084
|
export interface PackageOptionModalData {
|
|
@@ -3141,11 +3163,12 @@ declare module '@wayke-se/components-react/src/layouts/searchItem/index' {
|
|
|
3141
3163
|
declare module '@wayke-se/components-react/src/layouts/searchItem/useEcom' {
|
|
3142
3164
|
/// <reference types="react" />
|
|
3143
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';
|
|
3144
3167
|
interface EcomWeb {
|
|
3145
3168
|
start: () => void;
|
|
3146
3169
|
destroy: () => void;
|
|
3147
3170
|
}
|
|
3148
|
-
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>;
|
|
3149
3172
|
export default useEcom;
|
|
3150
3173
|
|
|
3151
3174
|
}
|
|
@@ -3327,11 +3350,12 @@ declare module '@wayke-se/components-react/src/utils/deep-copy' {
|
|
|
3327
3350
|
declare module '@wayke-se/components-react/src/utils/formats' {
|
|
3328
3351
|
export const notEmpty: <TValue>(value: TValue | null | undefined) => value is TValue;
|
|
3329
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';
|
|
3330
3354
|
export const FacetIdToTitle: (f: string) => string;
|
|
3331
3355
|
export const dateTimeFormat: {
|
|
3332
3356
|
YearMonth: number;
|
|
3333
3357
|
DayMonth: number;
|
|
3334
|
-
format: (value: string | Date, format: number) => string;
|
|
3358
|
+
format: (value: string | Date, format: number, marketCode?: MarketCode) => string;
|
|
3335
3359
|
};
|
|
3336
3360
|
|
|
3337
3361
|
}
|
|
@@ -3359,75 +3383,119 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Actions' {
|
|
|
3359
3383
|
|
|
3360
3384
|
}
|
|
3361
3385
|
declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
|
|
3386
|
+
import { EcomEvent, EcomStep, EcomView } from '@wayke-se/ecom-web/src/Utils/ecomEvent';
|
|
3362
3387
|
interface EventBase<Callback> {
|
|
3363
3388
|
eventName: EventNames;
|
|
3364
3389
|
callback: Callback;
|
|
3365
3390
|
}
|
|
3366
3391
|
export type CallbackEmpty = () => void;
|
|
3367
|
-
|
|
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;
|
|
3368
3422
|
export interface EventHashRouteChange extends EventBase<CallbackHashRouteChange> {
|
|
3369
3423
|
eventName: 'HashRouteChange';
|
|
3370
3424
|
}
|
|
3371
|
-
export
|
|
3372
|
-
export interface EventItemClicked extends EventBase<CallbackEventItemClicked> {
|
|
3425
|
+
export interface EventItemClicked extends EventBase<CallbackItem> {
|
|
3373
3426
|
eventName: 'ItemClicked';
|
|
3374
3427
|
}
|
|
3375
|
-
export interface
|
|
3376
|
-
eventName: '
|
|
3377
|
-
}
|
|
3378
|
-
export type CallbackEcomOnUserEvent = (userEvent: string, currentStep: string) => void;
|
|
3379
|
-
export interface EventEcomOnUser extends EventBase<CallbackEcomOnUserEvent> {
|
|
3380
|
-
eventName: 'EcomOnUserEvent';
|
|
3428
|
+
export interface EventEcom extends EventBase<CallbackEcom> {
|
|
3429
|
+
eventName: 'Ecom';
|
|
3381
3430
|
}
|
|
3382
|
-
export interface
|
|
3383
|
-
eventName: 'EcomOnExit';
|
|
3384
|
-
}
|
|
3385
|
-
export interface EventImagesClick extends EventBase<CallbackEmpty> {
|
|
3431
|
+
export interface EventImagesClick extends EventBase<CallbackItem> {
|
|
3386
3432
|
eventName: 'ImagesClick';
|
|
3387
3433
|
}
|
|
3388
|
-
export interface EventOptionsClick extends EventBase<
|
|
3434
|
+
export interface EventOptionsClick extends EventBase<CallbackItem> {
|
|
3389
3435
|
eventName: 'OptionsClick';
|
|
3390
3436
|
}
|
|
3391
|
-
export interface EventPhonenumberVisible extends EventBase<
|
|
3437
|
+
export interface EventPhonenumberVisible extends EventBase<CallbackItem> {
|
|
3392
3438
|
eventName: 'PhonenumberVisible';
|
|
3393
3439
|
}
|
|
3394
|
-
export interface EventPhonenumberCall extends EventBase<
|
|
3440
|
+
export interface EventPhonenumberCall extends EventBase<CallbackItem> {
|
|
3395
3441
|
eventName: 'PhonenumberCall';
|
|
3396
3442
|
}
|
|
3397
|
-
export interface EventMailVisible extends EventBase<
|
|
3443
|
+
export interface EventMailVisible extends EventBase<CallbackItem> {
|
|
3398
3444
|
eventName: 'MailVisible';
|
|
3399
3445
|
}
|
|
3400
|
-
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> {
|
|
3401
3453
|
eventName: 'InsuranceInterest';
|
|
3402
3454
|
}
|
|
3403
|
-
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> {
|
|
3404
3462
|
eventName: 'FinanceInterest';
|
|
3405
3463
|
}
|
|
3464
|
+
export interface EventSearch extends EventBase<CallbackSearch> {
|
|
3465
|
+
eventName: 'Search';
|
|
3466
|
+
}
|
|
3467
|
+
export interface EventFilterApply extends EventBase<CallbackFilterApply> {
|
|
3468
|
+
eventName: 'FilterApply';
|
|
3469
|
+
}
|
|
3406
3470
|
export type CallbackAll = (eventName: Omit<EventNames, 'All'>, data: any) => void;
|
|
3407
3471
|
export interface EventAll extends EventBase<CallbackAll> {
|
|
3408
3472
|
eventName: 'All';
|
|
3409
3473
|
}
|
|
3410
|
-
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;
|
|
3411
3475
|
export type EventNames = Pick<EventType, 'eventName'>['eventName'];
|
|
3412
3476
|
export {};
|
|
3413
3477
|
|
|
3414
3478
|
}
|
|
3415
3479
|
declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
|
|
3416
3480
|
import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from '@wayke-se/components-react/src/utils/pubsub/Actions';
|
|
3417
|
-
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';
|
|
3418
3482
|
export type EventSubscriptions = {
|
|
3419
3483
|
HashRouteChange: EventHashRouteChange[];
|
|
3420
3484
|
ItemClicked: EventItemClicked[];
|
|
3421
|
-
|
|
3422
|
-
EcomOnUserEvent: EventEcomOnUser[];
|
|
3423
|
-
EcomOnExit: EventEcomOnExit[];
|
|
3485
|
+
Ecom: EventEcom[];
|
|
3424
3486
|
ImagesClick: EventImagesClick[];
|
|
3425
3487
|
OptionsClick: EventOptionsClick[];
|
|
3426
3488
|
PhonenumberVisible: EventPhonenumberVisible[];
|
|
3427
3489
|
PhonenumberCall: EventPhonenumberCall[];
|
|
3428
3490
|
MailVisible: EventMailVisible[];
|
|
3491
|
+
InsuranceOpen: EventInsuranceOpen[];
|
|
3492
|
+
InsuranceClose: EventInsuranceClose[];
|
|
3429
3493
|
InsuranceInterest: EventInsuranceInterest[];
|
|
3494
|
+
FinanceOpen: EventFinanceOpen[];
|
|
3495
|
+
FinanceClose: EventFinanceClose[];
|
|
3430
3496
|
FinanceInterest: EventFinanceInterest[];
|
|
3497
|
+
Search: EventSearch[];
|
|
3498
|
+
FilterApply: EventFilterApply[];
|
|
3431
3499
|
All: EventAll[];
|
|
3432
3500
|
};
|
|
3433
3501
|
export type ActionSubscriptions = {
|