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