diff --git a/cwt-angular/package.json b/cwt-angular/package.json index 0921b119..7cb95b95 100644 --- a/cwt-angular/package.json +++ b/cwt-angular/package.json @@ -20,7 +20,7 @@ "@angular/router": "^7", "@fortawesome/fontawesome-free": "^5.15.1", "@ng-bootstrap/ng-bootstrap": "4.x", - "@zemke/tagbox": "https://github.com/zemke/tagbox#v0.1.0", + "@zemke/tagbox": "https://github.com/zemke/tagbox#v0.2.0", "bootstrap": "^4.3.1", "core-js": "^2.5.7", "hamburgers": "^1.1.3", diff --git a/cwt-angular/src/main/webapp/app/custom.d.ts b/cwt-angular/src/main/webapp/app/custom.d.ts index 0656bee2..58443a9b 100644 --- a/cwt-angular/src/main/webapp/app/custom.d.ts +++ b/cwt-angular/src/main/webapp/app/custom.d.ts @@ -469,3 +469,8 @@ export interface MapDto { texture: string; game: GameMinimalDto; } + +export interface ZemkeTagboxElement extends HTMLElement { + zemkeInput: HTMLInputElement; +} + diff --git a/cwt-angular/src/main/webapp/app/message/chat-input.component.ts b/cwt-angular/src/main/webapp/app/message/chat-input.component.ts index a916e115..113a4bc4 100644 --- a/cwt-angular/src/main/webapp/app/message/chat-input.component.ts +++ b/cwt-angular/src/main/webapp/app/message/chat-input.component.ts @@ -6,7 +6,7 @@ import { Input, ViewChild, } from '@angular/core'; -import {MessageCreationDto, UserMinimalDto, MessageDto, JwtUser} from "../custom"; +import {MessageCreationDto, UserMinimalDto, MessageDto, JwtUser, ZemkeTagboxElement} from "../custom"; import {AuthService} from "../_services/auth.service"; import {RequestService} from "../_services/request.service"; @@ -22,7 +22,7 @@ export class ChatInputComponent { @Input() messages: MessageDto[]; - @ViewChild('tagbox') tagbox: ElementRef; + @ViewChild('tagbox') tagbox: ElementRef; @ViewChild('valueEl') valueEl: ElementRef; value = ''; @@ -37,7 +37,7 @@ export class ChatInputComponent { } get chatInputEl() { - return this.tagbox.nativeElement.chatInputEl; + return this.tagbox.nativeElement.zemkeInput; } get disabled() { diff --git a/cwt-angular/yarn.lock b/cwt-angular/yarn.lock index ad69591c..c7ad0e59 100644 --- a/cwt-angular/yarn.lock +++ b/cwt-angular/yarn.lock @@ -1233,9 +1233,9 @@ resolved "https://registry.yarnpkg.com/@zemke/http-mock/-/http-mock-4.0.2.tgz#8d93c0c5d72662ac4bf901766725a361ac6ec9f1" integrity sha512-M8pnl8LGZcpGBNRbHb0l0FchauN1hxmiNoURpZpy4ziFyBN3FgyK821ZszjnQ7+3kFkdx+JvEix3FBgdEscdag== -"@zemke/tagbox@https://github.com/zemke/tagbox#v0.1.0": +"@zemke/tagbox@https://github.com/zemke/tagbox#v0.2.0": version "0.1.0" - resolved "https://github.com/zemke/tagbox#b798ea3dd4c2d2736f8b831a910bef766aee67ba" + resolved "https://github.com/zemke/tagbox#ff406658d23fa9dac1a06df6e784b38bf3cd5f16" abbrev@1: version "1.1.1"