@wayke-se/components-react 4.6.0-beta.1 → 4.6.1-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
@@ -355,6 +355,7 @@ WaykePubSub.unsubscribe(event);
355
355
  ### EventBase
356
356
  | eventName | callback | Data |
357
357
  |-----------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------|
358
+ | View | (data) => void | CallbackViewData |
358
359
  | HashRouteChange | (data) => void | CallbackHashRouteChangeData |
359
360
  | ItemClicked | (data) => void | CallbackItemData |
360
361
  | Ecom | (data) => void | CallbackEcomData |
@@ -375,9 +376,23 @@ WaykePubSub.unsubscribe(event);
375
376
  | SearchCompleted | (data) => void | CallbackSearchCompletedData |
376
377
  | Search | (data) => void | CallbackSearchData |
377
378
  | FilterApply | (data) => void | CallbackFilterApplyData |
378
- | All | (eventName, data) => void | CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchClearQueryData \| CallbackSearchClearAllFiltersQueryData \| CallbackSearchInitiatedData \| CallbackSearchCompletedData \| CallbackSearchData \| CallbackFilterApplyData |
379
+ | All | (eventName, data) => void | CallbackViewData \| CallbackHashRouteChangeData \| CallbackEcomOnUserEventData \| CallbackItemData \| CallbackSearchClearQueryData \| CallbackSearchClearAllFiltersQueryData \| CallbackSearchInitiatedData \| CallbackSearchCompletedData \| CallbackSearchData \| CallbackFilterApplyData |
379
380
  * `All` - Subscribes to all events.
380
381
 
382
+ #### CallbackViewData
383
+ Can be either `CallbackViewSearchData` or `CallbackViewItemData`
384
+ ##### CallbackViewSearchData
385
+ | Property | Type |
386
+ |-----------|-----------|
387
+ | type | "search" |
388
+
389
+ ##### CallbackViewItemData
390
+ | Property | Type |
391
+ |-----------|-----------|
392
+ | type | "item" |
393
+ | id | string |
394
+
395
+
381
396
  #### CallbackHashRouteChangeData
382
397
  | Property | Type |
383
398
  |-----------|-----------|
package/dist/index.d.ts CHANGED
@@ -3413,6 +3413,16 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3413
3413
  id: string;
3414
3414
  }
3415
3415
  export type CallbackHashRouteChange = (data: CallbackHashRouteChangeData) => void;
3416
+ interface CallbackViewDataBase<T> {
3417
+ type: T;
3418
+ }
3419
+ interface CallbackViewSearchData extends CallbackViewDataBase<'search'> {
3420
+ }
3421
+ interface CallbackViewItemData extends CallbackViewDataBase<'item'> {
3422
+ id: string;
3423
+ }
3424
+ type CallbackViewData = CallbackViewSearchData | CallbackViewItemData;
3425
+ export type CallbackView = (data: CallbackViewData) => void;
3416
3426
  interface CallbackItemData {
3417
3427
  id: string;
3418
3428
  branchId: string;
@@ -3457,6 +3467,9 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3457
3467
  }
3458
3468
  export type CallbackFilterApply = (data: CallbackFilterApplyData) => void;
3459
3469
  export type CallbackEcom = (data: CallbackEcomData) => void;
3470
+ export interface EventView extends EventBase<CallbackView> {
3471
+ eventName: 'View';
3472
+ }
3460
3473
  export interface EventHashRouteChange extends EventBase<CallbackHashRouteChange> {
3461
3474
  eventName: 'HashRouteChange';
3462
3475
  }
@@ -3521,14 +3534,14 @@ declare module '@wayke-se/components-react/src/utils/pubsub/Events' {
3521
3534
  export interface EventAll extends EventBase<CallbackAll> {
3522
3535
  eventName: 'All';
3523
3536
  }
3524
- export type EventType = EventHashRouteChange | EventItemClicked | EventEcom | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceOpen | EventInsuranceClose | EventInsuranceInterest | EventFinanceOpen | EventFinanceClose | EventFinanceInterest | EventSearch | EventSearchClearQuery | EventSearchClearAllFiltersQuery | EventSearchInitiated | EventSearchCompleted | EventFilterApply | EventAll;
3537
+ export type EventType = EventView | EventHashRouteChange | EventItemClicked | EventEcom | EventImagesClick | EventOptionsClick | EventPhonenumberVisible | EventPhonenumberCall | EventMailVisible | EventInsuranceOpen | EventInsuranceClose | EventInsuranceInterest | EventFinanceOpen | EventFinanceClose | EventFinanceInterest | EventSearch | EventSearchClearQuery | EventSearchClearAllFiltersQuery | EventSearchInitiated | EventSearchCompleted | EventFilterApply | EventAll;
3525
3538
  export type EventNames = Pick<EventType, 'eventName'>['eventName'];
3526
3539
  export {};
3527
3540
 
3528
3541
  }
3529
3542
  declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
3530
3543
  import { ActionAll, ActionNames, ActionOnFilterUpdate, ActionTypes } from '@wayke-se/components-react/src/utils/pubsub/Actions';
3531
- 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';
3544
+ import { EventView, 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';
3532
3545
  export type EventSubscriptions = {
3533
3546
  HashRouteChange: EventHashRouteChange[];
3534
3547
  ItemClicked: EventItemClicked[];
@@ -3550,6 +3563,7 @@ declare module '@wayke-se/components-react/src/utils/pubsub/pubsub' {
3550
3563
  SearchInitiated: EventSearchInitiated[];
3551
3564
  SearchCompleted: EventSearchCompleted[];
3552
3565
  FilterApply: EventFilterApply[];
3566
+ View: EventView[];
3553
3567
  All: EventAll[];
3554
3568
  };
3555
3569
  export type ActionSubscriptions = {