nuxeo-development-framework 5.7.1 → 5.7.2
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.
- package/bundles/nuxeo-development-framework.umd.js +210 -11
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/pdf-tron/directives/index.js +2 -0
- package/esm2015/lib/components/pdf-tron/directives/ndf-tron-extract-text.directive.js +203 -0
- package/esm2015/lib/components/pdf-tron/models/index.js +2 -0
- package/esm2015/lib/components/pdf-tron/models/tron.model.js +2 -0
- package/esm2015/lib/components/pdf-tron/pdf-tron.module.js +7 -12
- package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/nuxeo-development-framework.js +204 -14
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/pdf-tron/directives/index.d.ts +1 -0
- package/lib/components/pdf-tron/directives/ndf-tron-extract-text.directive.d.ts +51 -0
- package/lib/components/pdf-tron/models/index.d.ts +1 -0
- package/lib/components/pdf-tron/models/tron.model.d.ts +35 -0
- package/lib/components/pdf-tron/pdf-tron.module.d.ts +3 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ndf-tron-extract-text.directive';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AfterViewChecked, EventEmitter, Injector, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Coordinates, Page, RectangleCoordinates, RGBA, Word } from '../models';
|
|
3
|
+
import { BaseComponent } from '../../../shared';
|
|
4
|
+
import { PdftronService } from '../pdftron/pdftron.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NdfTronExtractText extends BaseComponent implements AfterViewChecked, OnChanges {
|
|
7
|
+
private readonly pdfTronService;
|
|
8
|
+
private readonly renderer;
|
|
9
|
+
private readonly injector;
|
|
10
|
+
listnerAdded: boolean;
|
|
11
|
+
rect: Coordinates;
|
|
12
|
+
pagesZones: {
|
|
13
|
+
pages: Array<any>;
|
|
14
|
+
};
|
|
15
|
+
detectionRectColor: RGBA;
|
|
16
|
+
focusedField: string;
|
|
17
|
+
focusedFieldPrefix: string;
|
|
18
|
+
onExtractText: EventEmitter<string>;
|
|
19
|
+
extractedText: string;
|
|
20
|
+
currentPageNum: number;
|
|
21
|
+
allWords: Array<Word>;
|
|
22
|
+
targetPage: Page;
|
|
23
|
+
savedCoordinates: Array<{
|
|
24
|
+
fieldName: string;
|
|
25
|
+
coordinates: Array<RectangleCoordinates>;
|
|
26
|
+
}>;
|
|
27
|
+
focusedLabelDimensions: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
constructor(pdfTronService: PdftronService, renderer: Renderer2, injector: Injector);
|
|
32
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
33
|
+
enableAnnotationRectangle(): void;
|
|
34
|
+
ngAfterViewChecked(): void;
|
|
35
|
+
onAnnotationsChange: (annotations: any, action: any) => void;
|
|
36
|
+
setColorOfRectangle(docViewer: any): void;
|
|
37
|
+
addFieldNameToRectangle(docViewer: any, annotManager: any, Annotations: any): void;
|
|
38
|
+
holdDrawedRectangleCoordinates(ratio: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
}): void;
|
|
42
|
+
getAllWordsInThePage(): Array<Word>;
|
|
43
|
+
initiateTextDimensions(): void;
|
|
44
|
+
calculateWidthOfText(): {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
get translatedLabel(): any;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NdfTronExtractText, never>;
|
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NdfTronExtractText, "[ndfTronExtractText]", never, { "pagesZones": "pagesZones"; "detectionRectColor": "detectionRectColor"; "focusedField": "focusedField"; "focusedFieldPrefix": "focusedFieldPrefix"; }, { "onExtractText": "onExtractText"; }, never>;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tron.model';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface Page {
|
|
2
|
+
page_height: number;
|
|
3
|
+
page_width: number;
|
|
4
|
+
zones: Array<any>;
|
|
5
|
+
}
|
|
6
|
+
export interface Word {
|
|
7
|
+
confidence: number;
|
|
8
|
+
coordinates: {
|
|
9
|
+
bottom_right: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
upper_left: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
text: string;
|
|
19
|
+
}
|
|
20
|
+
export declare type RGBA = {
|
|
21
|
+
R: number;
|
|
22
|
+
G: number;
|
|
23
|
+
B: number;
|
|
24
|
+
A: number;
|
|
25
|
+
};
|
|
26
|
+
export declare type Coordinates = {
|
|
27
|
+
x1: number;
|
|
28
|
+
x2: number;
|
|
29
|
+
y1: number;
|
|
30
|
+
y2: number;
|
|
31
|
+
};
|
|
32
|
+
export declare type RectangleCoordinates = {
|
|
33
|
+
pdfTronCoordinate: Coordinates;
|
|
34
|
+
windowCoordinate: Coordinates;
|
|
35
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./pdftron/pdftron.component";
|
|
3
|
-
import * as i2 from "
|
|
3
|
+
import * as i2 from "./directives/ndf-tron-extract-text.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
4
5
|
export declare class PdfTronModule {
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdfTronModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PdfTronModule, [typeof i1.PdftronComponent], [typeof
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PdfTronModule, [typeof i1.PdftronComponent, typeof i2.NdfTronExtractText], [typeof i3.CommonModule], [typeof i1.PdftronComponent, typeof i2.NdfTronExtractText]>;
|
|
7
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<PdfTronModule>;
|
|
8
9
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export * from './lib/components/pdf-tron/pdf-tron.module';
|
|
|
121
121
|
export * from './lib/components/pdf-tron/pdftron/pdftron.component';
|
|
122
122
|
export * from './lib/components/pdf-tron/pdftron/pdftron.service';
|
|
123
123
|
export * from './lib/components/pdf-tron/pdftron/silent-pdftron.service';
|
|
124
|
+
export * from './lib/components/pdf-tron/directives/ndf-tron-extract-text.directive';
|
|
124
125
|
export * from './lib/components/select/select.module';
|
|
125
126
|
export * from './lib/components/select/select/select.component';
|
|
126
127
|
export * from './lib/components/users-card/users-card.component';
|