@wayke-se/components-react 4.0.1 → 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 CHANGED
@@ -369,10 +369,13 @@ WaykePubSub.unsubscribe(event);
369
369
  | FinanceInterest | (data) => void | CallbackItemData |
370
370
  | FinanceOpen | (data) => void | CallbackItemData |
371
371
  | FinanceClose | (data) => void | CallbackItemData |
372
- | Search | (data) => void | CallbackSearchData |
372
+ | SearchClearQuery | (data) => void | CallbackSearchClearQueryData |
373
+ | SearchClearAllFilters | (data) => void | CallbackSearchClearAllFiltersQueryData |
374
+ | SearchInitiated | (data) => void | CallbackSearchInitiatedData |
375
+ | SearchCompleted | (data) => void | CallbackSearchCompletedData |
373
376
  | Search | (data) => void | CallbackSearchData |
374
377
  | FilterApply | (data) => void | CallbackFilterApplyData |
375
- | All | (eventName, data) => void | CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchData \| CallbackFilterApplyData |
378
+ | All | (eventName, data) => void | CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchClearQueryData \| CallbackSearchClearAllFiltersQueryData \| CallbackSearchInitiatedData \| CallbackSearchCompletedData \| CallbackSearchData \| CallbackFilterApplyData |
376
379
  * `All` - Subscribes to all events.
377
380
 
378
381
  #### CallbackHashRouteChangeData
@@ -398,6 +401,27 @@ WaykePubSub.unsubscribe(event);
398
401
  | currentStep | EcomStep \| undefined |
399
402
  | data | any \| undefined |
400
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
+
401
425
  #### CallbackSearchData
402
426
  | Property | Type |
403
427
  |-----------|-----------|
package/dist/index.d.ts CHANGED
@@ -1369,11 +1369,13 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/index' {
1369
1369
  import React from 'react';
1370
1370
  import { Facet } from '@wayke-se/components-react/src/@types/search';
1371
1371
  import { SearchFilterTypes } from '@wayke-se/components-react/src/@types/filter';
1372
+ import { QueryFilter } from '@wayke-se/components-react/src/@types/queryFilter';
1372
1373
  export interface FilterProps {
1373
1374
  label: string;
1374
1375
  activeFilters?: number;
1375
1376
  }
1376
1377
  export interface Props {
1378
+ queryFilter: QueryFilter;
1377
1379
  facet?: Facet;
1378
1380
  loading: boolean;
1379
1381
  filteredFacets: Facet[];
@@ -1382,7 +1384,7 @@ declare module '@wayke-se/components-react/src/components/FilterPanel/index' {
1382
1384
  onClose: () => void;
1383
1385
  onFilterUpdate: (nextQuery: string) => void;
1384
1386
  }
1385
- 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;
1386
1388
  export default FilterPanel;
1387
1389
 
1388
1390
  }
@@ -3284,6 +3286,9 @@ declare module '@wayke-se/components-react/src/utils/constants' {
3284
3286
  export const LEASING_PRICE = "leasingPrice";
3285
3287
  export const BUSINESS_LEASING_PRICE = "businessLeasingPrice";
3286
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";
3287
3292
  export const COLOR_WHITE: {
3288
3293
  displayName: string;
3289
3294
  hex: string;
@@ -3403,6 +3408,23 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3403
3408
  query: string;
3404
3409
  }
3405
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;
3406
3428
  export interface CallbackEcomData extends CallbackItemData {
3407
3429
  view: EcomView;
3408
3430
  event: EcomEvent;
@@ -3464,6 +3486,18 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3464
3486
  export interface EventSearch extends EventBase<CallbackSearch> {
3465
3487
  eventName: 'Search';
3466
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
+ }
3467
3501
  export interface EventFilterApply extends EventBase<CallbackFilterApply> {
3468
3502
  eventName: 'FilterApply';
3469
3503
  }
@@ -3471,14 +3505,14 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3471
3505
  export interface EventAll extends EventBase<CallbackAll> {
3472
3506
  eventName: 'All';
3473
3507
  }
3474
- export type EventType = EventHashRouteChange | EventItemClicked | EventEcom | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceOpen | EventInsuranceClose | EventInsuranceInterest | EventFinanceOpen | EventFinanceClose | EventFinanceInterest | EventSearch | EventFilterApply | EventAll;
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;
3475
3509
  export type EventNames = Pick<EventType, 'eventName'>['eventName'];
3476
3510
  export {};
3477
3511
 
3478
3512
  }
3479
3513
  declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
3480
3514
  import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from '@wayke-se/components-react/src/utils/pubsub/Actions';
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';
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';
3482
3516
  export type EventSubscriptions = {
3483
3517
  HashRouteChange: EventHashRouteChange[];
3484
3518
  ItemClicked: EventItemClicked[];
@@ -3495,6 +3529,10 @@ declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
3495
3529
  FinanceClose: EventFinanceClose[];
3496
3530
  FinanceInterest: EventFinanceInterest[];
3497
3531
  Search: EventSearch[];
3532
+ SearchClearQuery: EventSearchClearQuery[];
3533
+ SearchClearAllFilters: EventSearchClearAllFiltersQuery[];
3534
+ SearchInitiated: EventSearchInitiated[];
3535
+ SearchCompleted: EventSearchCompleted[];
3498
3536
  FilterApply: EventFilterApply[];
3499
3537
  All: EventAll[];
3500
3538
  };