From 8ad54b5739772eb8d96d23e1be04ebb426dfa596 Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Fri, 21 Oct 2022 00:17:34 -0400 Subject: [PATCH] feat(core): expose EventPubSub Service on SlickerGridInstance (#780) --- .../src/components/slick-vanilla-grid-bundle.ts | 1 + .../src/interfaces/slickerGridInstance.interface.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts index 23d12e4a7..f7b1c7e4a 100644 --- a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts +++ b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts @@ -637,6 +637,7 @@ export class SlickVanillaGridBundle { // return all available Services (non-singleton) backendService: this.gridOptions?.backendServiceApi?.service, + eventPubSubService: this._eventPubSubService, filterService: this.filterService, gridEventService: this.gridEventService, gridStateService: this.gridStateService, diff --git a/packages/vanilla-bundle/src/interfaces/slickerGridInstance.interface.ts b/packages/vanilla-bundle/src/interfaces/slickerGridInstance.interface.ts index 03ea05443..af5d139f8 100644 --- a/packages/vanilla-bundle/src/interfaces/slickerGridInstance.interface.ts +++ b/packages/vanilla-bundle/src/interfaces/slickerGridInstance.interface.ts @@ -14,6 +14,7 @@ import { SortService, TreeDataService, } from '@slickgrid-universal/common'; +import { EventPubSubService } from '@slickgrid-universal/event-pub-sub'; export interface SlickerGridInstance { /** Slick DataView object */ @@ -34,6 +35,9 @@ export interface SlickerGridInstance { /** Backend Service, when available */ backendService?: BackendService; + /** EventPubSub Service instance that is used internal by the lib and could be used externally to subscribe to Slickgrid-Universal events */ + eventPubSubService?: EventPubSubService; + /** Extension (Controls & Plugins) Service */ extensionService: ExtensionService;