diff --git a/CHANGELOG.md b/CHANGELOG.md index 74dec58..530537b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 9.3.0 (2024-08-22) +- Added `actionClick` callback to notify box add-in when action has been clicked. + # 9.2.0 (2024-06-20) - Added `AddinClientConfigService` abstract service to allow additional host origins to be supplied for the `AddinClientService`. diff --git a/package-lock.json b/package-lock.json index f680983..b626b0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@angular/platform-browser": "17.3.6", "@angular/platform-browser-dynamic": "17.3.6", "@angular/router": "17.3.6", - "@blackbaud/sky-addin-client": "1.3.0", + "@blackbaud/sky-addin-client": "1.4.0", "@skyux/assets": "10.7.0", "@skyux/config": "10.7.0", "@skyux/core": "10.7.0", @@ -2394,9 +2394,10 @@ } }, "node_modules/@blackbaud/sky-addin-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@blackbaud/sky-addin-client/-/sky-addin-client-1.3.0.tgz", - "integrity": "sha512-q3Pok6D/VPPHKleP9UT+KxXp92nJJHRgnSw3pOjJPbKxqZ0u9bMPNZQ1pWco8tajyhr1Ng2ueedPQPEWcNrWew==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@blackbaud/sky-addin-client/-/sky-addin-client-1.4.0.tgz", + "integrity": "sha512-4ulCz9YkeyATOjT7UumTDMCpcOgvHge0bldlAqYUcFVmJ5WchrKQnk53On8mOiDJHO9QXYHLAOSydkFhFddY1Q==", + "license": "MIT" }, "node_modules/@blackbaud/skyux-design-tokens": { "version": "0.0.28", diff --git a/package.json b/package.json index b69e989..a8bf697 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@angular/platform-browser": "17.3.6", "@angular/platform-browser-dynamic": "17.3.6", "@angular/router": "17.3.6", - "@blackbaud/sky-addin-client": "1.3.0", + "@blackbaud/sky-addin-client": "1.4.0", "@skyux/assets": "10.7.0", "@skyux/config": "10.7.0", "@skyux/core": "10.7.0", diff --git a/projects/addin-client/package.json b/projects/addin-client/package.json index cbfc50d..0899a96 100644 --- a/projects/addin-client/package.json +++ b/projects/addin-client/package.json @@ -1,6 +1,6 @@ { "name": "@blackbaud/skyux-lib-addin-client", - "version": "9.2.0", + "version": "9.3.0", "peerDependencies": { "@angular/common": "^17.3.6", "@angular/core": "^17.3.6", @@ -8,7 +8,7 @@ "@skyux/theme": "^10.7.0" }, "dependencies": { - "@blackbaud/sky-addin-client": "^1.3.0", + "@blackbaud/sky-addin-client": "^1.4.0", "tslib": "^2.6.2" } } diff --git a/projects/addin-client/src/src/addin-client.service.spec.ts b/projects/addin-client/src/src/addin-client.service.spec.ts index 3008b77..daf5756 100644 --- a/projects/addin-client/src/src/addin-client.service.spec.ts +++ b/projects/addin-client/src/src/addin-client.service.spec.ts @@ -102,6 +102,18 @@ describe('Addin Client Service', () => { addinClientArgs.callbacks.init(initArgs); }); + it('service consumer can subscribe to actionClick', (done) => { + let addinClientArgs = (addinClientService.addinClient as any).args; + + spyOn(addinClientService.actionClick, 'emit').and.callThrough(); + + addinClientArgs.callbacks.actionClick(); + + expect(addinClientService.actionClick.emit).toHaveBeenCalled(); + + done(); + }); + it('service consumer can subscribe to buttonClick', (done) => { let addinClientArgs = (addinClientService.addinClient as any).args; @@ -770,7 +782,7 @@ describe('Addin Client Service', () => { }; } } - + let addinClientService: AddinClientService; let addinConfigService: AddinClientConfigService; diff --git a/projects/addin-client/src/src/addin-client.service.ts b/projects/addin-client/src/src/addin-client.service.ts index 378ff3f..158fc86 100644 --- a/projects/addin-client/src/src/addin-client.service.ts +++ b/projects/addin-client/src/src/addin-client.service.ts @@ -52,6 +52,11 @@ export class AddinClientService { public args: Observable = this._args.asObservable(); // Addin Client Events + /** + * Event emitted for box add-ins indicating that a control action button was clicked. + */ + public actionClick: EventEmitter = new EventEmitter(true); + /** * Event emitted for button add-ins indicating that the button was clicked. */ @@ -96,6 +101,9 @@ export class AddinClientService { this._args.next(args); this._args.complete(); }, + actionClick: (action: string) => { + this.actionClick.emit(action); + }, buttonClick: () => { this.buttonClick.emit(); },