nuxeo-development-framework 2.0.2 → 2.0.3
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 +30 -24
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +31 -25
- package/fesm2015/nuxeo-development-framework.js +30 -24
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/pdf-tron/pdftron/pdftron.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -19787,6 +19787,7 @@
|
|
|
19787
19787
|
this.fileWithOcr = false;
|
|
19788
19788
|
this.newAnnotations = [];
|
|
19789
19789
|
this.mySearchStringResults = [];
|
|
19790
|
+
this.recivedSearchStringsArray = [];
|
|
19790
19791
|
this.searchFn = function (searchValue, options) {
|
|
19791
19792
|
_this.mySearchStringResults = [];
|
|
19792
19793
|
if (_this.savedAnotations.length > 0) {
|
|
@@ -19848,6 +19849,7 @@
|
|
|
19848
19849
|
return __awaiter(this, void 0, void 0, function () {
|
|
19849
19850
|
var _this = this;
|
|
19850
19851
|
return __generator(this, function (_a) {
|
|
19852
|
+
this.recivedSearchStringsArray = this.searchString.trim() ? this.searchString.split(',') : [];
|
|
19851
19853
|
if (this.fileTitle.endsWith('.ppt')) {
|
|
19852
19854
|
this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
|
|
19853
19855
|
}
|
|
@@ -19899,8 +19901,8 @@
|
|
|
19899
19901
|
searchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
19900
19902
|
activeSearchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
19901
19903
|
});
|
|
19902
|
-
if (this.
|
|
19903
|
-
this.automaticSearch(this.
|
|
19904
|
+
if (this.recivedSearchStringsArray.length !== 0) {
|
|
19905
|
+
this.automaticSearch(this.recivedSearchStringsArray);
|
|
19904
19906
|
}
|
|
19905
19907
|
this.loadDocument();
|
|
19906
19908
|
return [2 /*return*/];
|
|
@@ -20246,7 +20248,7 @@
|
|
|
20246
20248
|
});
|
|
20247
20249
|
};
|
|
20248
20250
|
// perform automatic search when intering the page
|
|
20249
|
-
PdftronComponent.prototype.automaticSearch = function (
|
|
20251
|
+
PdftronComponent.prototype.automaticSearch = function (searchTextArray) {
|
|
20250
20252
|
var _this = this;
|
|
20251
20253
|
var _a = this.webViewerInstance, annotManager = _a.annotManager, docViewer = _a.docViewer, Annotations = _a.Annotations;
|
|
20252
20254
|
var searchOptions;
|
|
@@ -20257,29 +20259,31 @@
|
|
|
20257
20259
|
if (_this.fileWithOcr) {
|
|
20258
20260
|
// add redaction annotation for each search result
|
|
20259
20261
|
var annotation = new Annotations.TextHighlightAnnotation();
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
_this.
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20262
|
+
searchTextArray.map(function (searchText) {
|
|
20263
|
+
var mySearch = searchText.split(' ');
|
|
20264
|
+
if (mySearch.length > 1) {
|
|
20265
|
+
// then i am searching with more than one word
|
|
20266
|
+
_this.pages.pages.forEach(function (page, index) {
|
|
20267
|
+
_this.pageHeight = page.page_height;
|
|
20268
|
+
_this.pageWidth = page.page_width;
|
|
20269
|
+
_this.standardHeight = _this.webViewerInstance.docViewer.getPageHeight((index + 1));
|
|
20270
|
+
_this.standardWidth = _this.webViewerInstance.docViewer.getPageWidth((index + 1));
|
|
20271
|
+
page.zones.forEach(function (zone) {
|
|
20272
|
+
zone.paragraphs.forEach(function (paragraph) {
|
|
20273
|
+
paragraph.lines.forEach(function (line) {
|
|
20274
|
+
if (line.text.includes(searchText)) {
|
|
20275
|
+
_this.SearchForWordInLine(mySearch, line, (index + 1), page);
|
|
20276
|
+
}
|
|
20277
|
+
});
|
|
20274
20278
|
});
|
|
20275
20279
|
});
|
|
20276
20280
|
});
|
|
20277
|
-
}
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
}
|
|
20281
|
+
}
|
|
20282
|
+
else {
|
|
20283
|
+
// then i am searching with only one word
|
|
20284
|
+
_this.searchForWordInAllPages(searchText);
|
|
20285
|
+
}
|
|
20286
|
+
});
|
|
20283
20287
|
docViewer.clearSearchResults();
|
|
20284
20288
|
_this.dispalaySearchResults(docViewer);
|
|
20285
20289
|
}
|
|
@@ -20304,7 +20308,9 @@
|
|
|
20304
20308
|
}
|
|
20305
20309
|
}
|
|
20306
20310
|
};
|
|
20307
|
-
|
|
20311
|
+
searchTextArray.map(function (searchedText) {
|
|
20312
|
+
docViewer.textSearchInit(searchedText, mode, searchOptions);
|
|
20313
|
+
});
|
|
20308
20314
|
}
|
|
20309
20315
|
});
|
|
20310
20316
|
};
|