Skip to content

Commit 4872122

Browse files
committed
chore: update CHANGELOG and bump package version
1 parent c6fe1c0 commit 4872122

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## 17.3.0
4+
5+
Pull request: https://github.com/philenius/ngx-annotate-text/pull/29
6+
7+
- Adds the optional input `annotationRendererComponent` that defines which Angular component shall be used for rendering the annotations. By default, it uses the provided `NgxAnnotationRendererComponent`. You can implement your own annotation rendering component to customize the visualization of annotations. The custom component must implement the interface `NgxAnnotationRendererComponentInterface`. This implements feature request https://github.com/philenius/ngx-annotate-text/issues/9.
8+
- Update dependencies
9+
310
## 17.2.0
411

512
Pull request: https://github.com/philenius/ngx-annotate-text/pull/22

projects/ngx-annotate-text/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "ngx-annotate-text",
3-
"version": "17.2.0",
3+
"version": "17.3.0",
44
"author": "Philipp Perez, (https://philenius.github.io)",
55
"license": "MIT",
6-
"description": "An Angular component library for interactively highlighting / annotating parts of text.",
6+
"description": "This Angular component library is perfect for tasks like visualizing named entity recognition, part of speech tagging, or annotating text datasets. It allows for interactively highlighting and annotating parts of text.",
77
"peerDependencies": {
88
"@angular/common": "^17.2.0",
99
"@angular/core": "^17.2.0"
@@ -15,14 +15,23 @@
1515
"Angular",
1616
"TypeScript library",
1717
"Angular component",
18+
"Angular component library",
1819
"annotate",
1920
"annotation documents",
2021
"annotation tool",
2122
"annotate text",
22-
"mark entities",
23+
"annotate parts of text",
24+
"annotate entities",
25+
"highlighting",
26+
"highlight text",
27+
"highlight entities",
28+
"highlight words",
29+
"named entity recognition",
30+
"NER",
31+
"part of speech tagging",
32+
"pos-tagging",
2333
"NLP",
24-
"entities",
25-
"pos-tagging"
34+
"entities"
2635
],
2736
"repository": {
2837
"type": "git",

projects/ngx-annotate-text/src/lib/components/annotation-renderer/annotation-renderer.component.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ describe('AnnotationRendererComponent', () => {
1818
beforeEach(() => {
1919
fixture = TestBed.createComponent(NgxAnnotationRendererComponent);
2020
component = fixture.componentInstance;
21+
component.clickAnnotation = () => {};
22+
component.removeAnnotation = () => {};
2123
fixture.detectChanges();
2224
});
2325

@@ -84,7 +86,6 @@ describe('AnnotationRendererComponent', () => {
8486
});
8587

8688
it("should call the callback function 'removeAnnotation' when a user clicks on the remove button", async () => {
87-
component.removeAnnotation = () => {};
8889
spyOn(component, 'removeAnnotation');
8990

9091
const annotation = new Annotation(0, 13, 'City', 'rgb(60, 65, 75)');
@@ -102,7 +103,6 @@ describe('AnnotationRendererComponent', () => {
102103
});
103104

104105
it("should call the callback function 'clickAnnotation' when a user clicks on the annotation's box", async () => {
105-
component.clickAnnotation = () => {};
106106
spyOn(component, 'clickAnnotation');
107107

108108
const annotation = new Annotation(0, 13, 'City', 'rgb(60, 65, 75)');
@@ -119,7 +119,6 @@ describe('AnnotationRendererComponent', () => {
119119
});
120120

121121
it("should call the callback function 'clickAnnotation' when the user clicks on the annotation's text", async () => {
122-
component.clickAnnotation = () => {};
123122
spyOn(component, 'clickAnnotation');
124123

125124
const annotation = new Annotation(0, 11, 'City', 'rgb(0, 255, 255)');
@@ -136,7 +135,6 @@ describe('AnnotationRendererComponent', () => {
136135
});
137136

138137
it("should call the callback function 'clickAnnotation' when the user clicks on the annotation's label", async () => {
139-
component.clickAnnotation = () => {};
140138
spyOn(component, 'clickAnnotation');
141139

142140
const annotation = new Annotation(0, 9, 'City', 'rgb(255, 255, 0)');

src/app/my-annotation-renderer/my-annotation-renderer.component.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { MyAnnotationRendererComponent } from './my-annotation-renderer.component';
4+
import { Annotation } from '../../../projects/ngx-annotate-text/src/public-api';
45

56
describe('MyAnnotationRendererComponent', () => {
67
let component: MyAnnotationRendererComponent;
78
let fixture: ComponentFixture<MyAnnotationRendererComponent>;
89

910
beforeEach(async () => {
10-
await TestBed.configureTestingModule({
11-
imports: [MyAnnotationRendererComponent]
12-
})
13-
.compileComponents();
14-
11+
await TestBed.configureTestingModule({ imports: [MyAnnotationRendererComponent] }).compileComponents();
12+
1513
fixture = TestBed.createComponent(MyAnnotationRendererComponent);
1614
component = fixture.componentInstance;
15+
component.annotation = new Annotation(7, 12, 'noun', 'red');
16+
component.clickAnnotation = () => {};
17+
component.removeAnnotation = () => {};
1718
fixture.detectChanges();
1819
});
1920

0 commit comments

Comments
 (0)