@studyportals/inlinesearch-interfaces 1.0.3 → 1.0.4

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.
@@ -2,5 +2,6 @@ export declare enum InlineSearchCommands {
2
2
  INLINE_SEARCH_READY_EVENT = "InlineSearch:ReadyEvent",
3
3
  INLINE_SEARCH_APP_RENDER_EVENT = "InlineSearch:AppRenderEvent",
4
4
  INLINE_SEARCH_APP_USER_INPUT_EVENT = "InlineSearch:AppUserInputEvent",
5
- INLINE_SEARCH_SUGGESTION_CLICK_EVENT = "InlineSearch:SuggestionClickEvent"
5
+ INLINE_SEARCH_SUGGESTION_CLICK_EVENT = "InlineSearch:SuggestionClickEvent",
6
+ INLINE_SEARCH_APP_USER_KEYBOARD_EVENT = "InlineSearch:AppUserKeyboardEvent"
6
7
  }
@@ -7,4 +7,5 @@ var InlineSearchCommands;
7
7
  InlineSearchCommands["INLINE_SEARCH_APP_RENDER_EVENT"] = "InlineSearch:AppRenderEvent";
8
8
  InlineSearchCommands["INLINE_SEARCH_APP_USER_INPUT_EVENT"] = "InlineSearch:AppUserInputEvent";
9
9
  InlineSearchCommands["INLINE_SEARCH_SUGGESTION_CLICK_EVENT"] = "InlineSearch:SuggestionClickEvent";
10
+ InlineSearchCommands["INLINE_SEARCH_APP_USER_KEYBOARD_EVENT"] = "InlineSearch:AppUserKeyboardEvent";
10
11
  })(InlineSearchCommands || (exports.InlineSearchCommands = InlineSearchCommands = {}));
@@ -0,0 +1,10 @@
1
+ import { IEvent } from '@studyportals/event-aggregation-service-interface';
2
+ import { InlineSearchCommands } from '../enums';
3
+ export declare class InlineSearchAppUserKeyboardEvent implements IEvent {
4
+ static readonly EventType = InlineSearchCommands.INLINE_SEARCH_APP_USER_KEYBOARD_EVENT;
5
+ readonly timestamp: Date;
6
+ readonly eventType = InlineSearchCommands.INLINE_SEARCH_APP_USER_KEYBOARD_EVENT;
7
+ readonly keyboardEvent: KeyboardEvent;
8
+ constructor(keyboardEvent: KeyboardEvent);
9
+ static is(event: IEvent): event is InlineSearchAppUserKeyboardEvent;
10
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InlineSearchAppUserKeyboardEvent = void 0;
4
+ const enums_1 = require("../enums");
5
+ class InlineSearchAppUserKeyboardEvent {
6
+ constructor(keyboardEvent) {
7
+ this.timestamp = new Date();
8
+ this.eventType = InlineSearchAppUserKeyboardEvent.EventType;
9
+ this.keyboardEvent = keyboardEvent;
10
+ }
11
+ static is(event) {
12
+ return (event.eventType === InlineSearchAppUserKeyboardEvent.EventType);
13
+ }
14
+ }
15
+ exports.InlineSearchAppUserKeyboardEvent = InlineSearchAppUserKeyboardEvent;
16
+ InlineSearchAppUserKeyboardEvent.EventType = enums_1.InlineSearchCommands.INLINE_SEARCH_APP_USER_KEYBOARD_EVENT;
package/events/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './InlineSearchAppRenderEvent';
2
2
  export * from './InlineSearchAppUserInputEvent';
3
3
  export * from './InlineSearchReadyEvent';
4
4
  export * from './InlineSearchSuggestionClickEvent';
5
+ export * from './InlineSearchAppUserKeyboardEvent';
package/events/index.js CHANGED
@@ -18,3 +18,4 @@ __exportStar(require("./InlineSearchAppRenderEvent"), exports);
18
18
  __exportStar(require("./InlineSearchAppUserInputEvent"), exports);
19
19
  __exportStar(require("./InlineSearchReadyEvent"), exports);
20
20
  __exportStar(require("./InlineSearchSuggestionClickEvent"), exports);
21
+ __exportStar(require("./InlineSearchAppUserKeyboardEvent"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/inlinesearch-interfaces",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "The interfaces exposed by InlineSearch-Service",
5
5
  "main": "index.js",
6
6
  "scripts": {