nuxeo-development-framework 4.5.4 → 4.5.5

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.
@@ -27788,6 +27788,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
27788
27788
  }]
27789
27789
  }], ctorParameters: function () { return []; } });
27790
27790
 
27791
+ var _SilentPdfTronService_instances, _SilentPdfTronService_webViewerInstance, _SilentPdfTronService_webViewerElement, _SilentPdfTronService_isInitialized, _SilentPdfTronService_initializationPromise, _SilentPdfTronService_isArabic, _SilentPdfTronService_isEnabled, _SilentPdfTronService_initializeWebViewer;
27792
+ class SilentPdfTronService {
27793
+ constructor(baseHref, translationService, environment, nuxeo) {
27794
+ this.baseHref = baseHref;
27795
+ this.translationService = translationService;
27796
+ this.environment = environment;
27797
+ this.nuxeo = nuxeo;
27798
+ _SilentPdfTronService_instances.add(this);
27799
+ _SilentPdfTronService_webViewerInstance.set(this, void 0);
27800
+ _SilentPdfTronService_webViewerElement.set(this, null);
27801
+ _SilentPdfTronService_isInitialized.set(this, false);
27802
+ _SilentPdfTronService_initializationPromise.set(this, null);
27803
+ _SilentPdfTronService_isArabic.set(this, void 0);
27804
+ _SilentPdfTronService_isEnabled.set(this, void 0);
27805
+ }
27806
+ get isEnabled() {
27807
+ return __classPrivateFieldGet(this, _SilentPdfTronService_isEnabled, "f");
27808
+ }
27809
+ start() {
27810
+ __classPrivateFieldSet(this, _SilentPdfTronService_isEnabled, true, "f");
27811
+ this.translationService.isArabic.subscribe((res) => {
27812
+ __classPrivateFieldSet(this, _SilentPdfTronService_isArabic, res, "f");
27813
+ if (!__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f")) {
27814
+ __classPrivateFieldSet(this, _SilentPdfTronService_webViewerElement, document.createElement('div'), "f");
27815
+ __classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f").id = 'silent-viewer';
27816
+ Object.assign(__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f").style, {
27817
+ display: 'none',
27818
+ width: '100%',
27819
+ height: '100%'
27820
+ });
27821
+ document.body.appendChild(__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f"));
27822
+ }
27823
+ __classPrivateFieldGet(this, _SilentPdfTronService_instances, "m", _SilentPdfTronService_initializeWebViewer).call(this);
27824
+ });
27825
+ }
27826
+ getWebViewer() {
27827
+ if (__classPrivateFieldGet(this, _SilentPdfTronService_isInitialized, "f") && __classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f") && __classPrivateFieldGet(this, _SilentPdfTronService_webViewerInstance, "f")) {
27828
+ return Promise.resolve([__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f"), __classPrivateFieldGet(this, _SilentPdfTronService_webViewerInstance, "f")]);
27829
+ }
27830
+ return __classPrivateFieldGet(this, _SilentPdfTronService_instances, "m", _SilentPdfTronService_initializeWebViewer).call(this).then(() => {
27831
+ if (!__classPrivateFieldGet(this, _SilentPdfTronService_isInitialized, "f") || !__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f") || !__classPrivateFieldGet(this, _SilentPdfTronService_webViewerInstance, "f")) {
27832
+ return Promise.reject(new Error('WebViewer initialization failed.'));
27833
+ }
27834
+ return [__classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f"), __classPrivateFieldGet(this, _SilentPdfTronService_webViewerInstance, "f")];
27835
+ });
27836
+ }
27837
+ }
27838
+ _SilentPdfTronService_webViewerInstance = new WeakMap(), _SilentPdfTronService_webViewerElement = new WeakMap(), _SilentPdfTronService_isInitialized = new WeakMap(), _SilentPdfTronService_initializationPromise = new WeakMap(), _SilentPdfTronService_isArabic = new WeakMap(), _SilentPdfTronService_isEnabled = new WeakMap(), _SilentPdfTronService_instances = new WeakSet(), _SilentPdfTronService_initializeWebViewer = function _SilentPdfTronService_initializeWebViewer() {
27839
+ if (__classPrivateFieldGet(this, _SilentPdfTronService_isInitialized, "f"))
27840
+ return Promise.resolve();
27841
+ if (__classPrivateFieldGet(this, _SilentPdfTronService_initializationPromise, "f"))
27842
+ return __classPrivateFieldGet(this, _SilentPdfTronService_initializationPromise, "f");
27843
+ __classPrivateFieldSet(this, _SilentPdfTronService_initializationPromise, WebViewer({
27844
+ path: `${this.baseHref}/assets/pdftrons`,
27845
+ forceClientSideInit: true,
27846
+ streaming: true,
27847
+ licenseKey: this.environment.pdftronLicenceKey,
27848
+ css: `${this.baseHref}/assets/styles/${__classPrivateFieldGet(this, _SilentPdfTronService_isArabic, "f") ? 'ar' : 'en'}-mypdftron.css`,
27849
+ annotationUser: `${this.nuxeo.nuxeoClient.user.properties.firstName} ${this.nuxeo.nuxeoClient.user.properties.lastName}`,
27850
+ disabledElements: ['downloadButton', 'printButton']
27851
+ }, __classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f"))
27852
+ .then((instance) => {
27853
+ __classPrivateFieldSet(this, _SilentPdfTronService_webViewerInstance, instance, "f");
27854
+ __classPrivateFieldSet(this, _SilentPdfTronService_isInitialized, true, "f");
27855
+ })
27856
+ .catch((error) => {
27857
+ console.error('Failed to initialize WebViewer:', error);
27858
+ __classPrivateFieldSet(this, _SilentPdfTronService_initializationPromise, null, "f");
27859
+ return Promise.reject(error);
27860
+ }), "f");
27861
+ return __classPrivateFieldGet(this, _SilentPdfTronService_initializationPromise, "f");
27862
+ };
27863
+ SilentPdfTronService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SilentPdfTronService, deps: [{ token: APP_BASE_HREF }, { token: TranslationService }, { token: 'environment' }, { token: NuxeoService }], target: i0.ɵɵFactoryTarget.Injectable });
27864
+ SilentPdfTronService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SilentPdfTronService, providedIn: 'root' });
27865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SilentPdfTronService, decorators: [{
27866
+ type: Injectable,
27867
+ args: [{
27868
+ providedIn: 'root'
27869
+ }]
27870
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
27871
+ type: Inject,
27872
+ args: [APP_BASE_HREF]
27873
+ }] }, { type: TranslationService }, { type: undefined, decorators: [{
27874
+ type: Inject,
27875
+ args: ['environment']
27876
+ }] }, { type: NuxeoService }]; } });
27877
+
27878
+ var _PdftronComponent_instances, _PdftronComponent_updateSilentPdfTron, _PdftronComponent_afterLoadWebViewer, _PdftronComponent_docLoaded, _PdftronComponent_reset;
27791
27879
  /**
27792
27880
  * A reusable file viewer based on PDFTron Library
27793
27881
  * @title
@@ -27802,15 +27890,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
27802
27890
  * </app-pdftron>
27803
27891
  */
27804
27892
  class PdftronComponent {
27805
- constructor(cdr, pdftronService, nuxeo, baseHref, securePipe, translationService, toaster, environment) {
27893
+ constructor(cdr, pdftronService, nuxeo, baseHref, translationService, silentPdfTronService, environment) {
27806
27894
  this.cdr = cdr;
27807
27895
  this.pdftronService = pdftronService;
27808
27896
  this.nuxeo = nuxeo;
27809
27897
  this.baseHref = baseHref;
27810
- this.securePipe = securePipe;
27811
27898
  this.translationService = translationService;
27812
- this.toaster = toaster;
27899
+ this.silentPdfTronService = silentPdfTronService;
27813
27900
  this.environment = environment;
27901
+ _PdftronComponent_instances.add(this);
27814
27902
  this.actionClicked = false; // used to know if there is action clicked outside to start edit mode or not
27815
27903
  this.DOCUMENT_TYPE = 'application/pdf';
27816
27904
  this.fitMode = 'FitWidth';
@@ -27825,8 +27913,18 @@ class PdftronComponent {
27825
27913
  this.events = new EventEmitter();
27826
27914
  this.SignatureEvent = new EventEmitter(); // used to export signature to outside
27827
27915
  this.firstTimeLoad = true; //flage to control importing signatures in the first time load only
27828
- this.firstSignatureLoad = true; // flage to pass first load of imported signatures without emitting the event
27916
+ this.firstSignatureLoad = true; // flage to pass first load of imported signatures without emitting the event
27829
27917
  this.newSignCreation = false; // flage to indicate signature creation is created or choosed from stored ones
27918
+ _PdftronComponent_docLoaded.set(this, () => {
27919
+ let fitMode = this.webViewerInstance.FitMode.FitWidth;
27920
+ if (this.fitMode === 'FitPage') {
27921
+ fitMode = this.webViewerInstance.FitMode.FitPage;
27922
+ }
27923
+ else if (this.fitMode === 'Zoom') {
27924
+ fitMode = this.webViewerInstance.FitMode.Zoom;
27925
+ }
27926
+ this.webViewerInstance.setFitMode(fitMode);
27927
+ });
27830
27928
  this.savedAnotations = [];
27831
27929
  this.fileWithOcr = false;
27832
27930
  this.newAnnotations = [];
@@ -27835,7 +27933,7 @@ class PdftronComponent {
27835
27933
  this.searchFn = (searchValue, options) => {
27836
27934
  this.mySearchStringResults = [];
27837
27935
  if (this.savedAnotations.length > 0) {
27838
- this.savedAnotations.map(annotation => {
27936
+ this.savedAnotations.map((annotation) => {
27839
27937
  annotation.Hidden = true;
27840
27938
  // Always redraw annotation if rendering was updated
27841
27939
  this.webViewerInstance.annotManager.redrawAnnotation(annotation);
@@ -27852,13 +27950,13 @@ class PdftronComponent {
27852
27950
  this.pages.pages.forEach((page, index) => {
27853
27951
  this.pageHeight = page.page_height;
27854
27952
  this.pageWidth = page.page_width;
27855
- this.standardHeight = this.webViewerInstance.docViewer.getPageHeight((index + 1));
27856
- this.standardWidth = this.webViewerInstance.docViewer.getPageWidth((index + 1));
27857
- page.zones.forEach(zone => {
27858
- zone.paragraphs.forEach(paragraph => {
27859
- paragraph.lines.forEach(line => {
27953
+ this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(index + 1);
27954
+ this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(index + 1);
27955
+ page.zones.forEach((zone) => {
27956
+ zone.paragraphs.forEach((paragraph) => {
27957
+ paragraph.lines.forEach((line) => {
27860
27958
  if (line.text.includes(searchValue)) {
27861
- this.SearchForWordInLine(mySearch, line, (index + 1), page);
27959
+ this.SearchForWordInLine(mySearch, line, index + 1, page);
27862
27960
  }
27863
27961
  });
27864
27962
  });
@@ -27866,7 +27964,7 @@ class PdftronComponent {
27866
27964
  });
27867
27965
  }
27868
27966
  else {
27869
- // then i am searching with only one word
27967
+ // then i am searching with only one word
27870
27968
  this.searchForWordInAllPages(searchValue);
27871
27969
  }
27872
27970
  this.webViewerInstance.docViewer.clearSearchResults();
@@ -27880,71 +27978,46 @@ class PdftronComponent {
27880
27978
  }
27881
27979
  ngOnInit() {
27882
27980
  return __awaiter(this, void 0, void 0, function* () {
27883
- this.transelationSubscrition = this.translationService.isArabic.subscribe(res => {
27981
+ this.transelationSubscrition = this.translationService.isArabic.subscribe((res) => {
27884
27982
  this.isArabic = res;
27885
27983
  });
27886
- });
27887
- }
27888
- ngAfterViewInit() {
27889
- return __awaiter(this, void 0, void 0, function* () {
27890
27984
  this.recivedSearchStringsArray = this.searchString.trim() ? this.searchString.split(',') : [];
27891
27985
  if (this.fileTitle) {
27892
27986
  if (this.fileTitle.endsWith('.ppt')) {
27893
27987
  this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
27894
27988
  }
27895
27989
  else if (this.fileTitle.endsWith('.pptx')) {
27896
- this.DOCUMENT_TYPE =
27897
- 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
27990
+ this.DOCUMENT_TYPE = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
27898
27991
  }
27899
27992
  else if (this.fileTitle.endsWith('.doc')) {
27900
27993
  this.DOCUMENT_TYPE = 'application/msword';
27901
27994
  }
27902
27995
  else if (this.fileTitle.endsWith('.docx')) {
27903
- this.DOCUMENT_TYPE =
27904
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
27905
- }
27906
- }
27907
- WebViewer({
27908
- path: this.baseHref + '/assets/pdftrons',
27909
- forceClientSideInit: true,
27910
- streaming: true,
27911
- licenseKey: this.environment.pdftronLicenceKey,
27912
- css: this.isArabic ? (this.baseHref + '/assets/styles/ar-mypdftron.css') : (this.baseHref + '/assets/styles/en-mypdftron.css'),
27913
- annotationUser: this.nuxeo.nuxeoClient.user.properties.firstName + ' ' + this.nuxeo.nuxeoClient.user.properties.lastName,
27914
- disabledElements: ['downloadButton', 'printButton'],
27915
- }, this.viewerRef.nativeElement).then((instance) => __awaiter(this, void 0, void 0, function* () {
27916
- this.isArabic ? instance.setLanguage('ar') : instance.setLanguage('en');
27917
- this.pdftronService.instance = this.webViewerInstance = instance;
27918
- if (this.correspondance.facets.indexOf('ctocr') > -1) {
27919
- this.fileWithOcr = true;
27920
- this.pages = JSON.parse(this.correspondance.properties['ctocr:recognizedJson']);
27921
- // override search funtion to use our search in ocr not defult search
27922
- instance.overrideSearchExecution(this.searchFn);
27996
+ this.DOCUMENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
27923
27997
  }
27924
- else {
27925
- // if no ocr then add search lisner to lisne to internal search and catch results
27926
- this.addSearchListner();
27927
- }
27928
- this.addPrintButton();
27929
- this.addDownloadButton();
27930
- this.importSignature();
27931
- this.exportingSignature();
27932
- this.deleteAnnotation();
27933
- this.exportingSavedSignature();
27934
- if (this.useOutsideAnotations) {
27935
- this.importAnotationsFromOutside();
27936
- this.exportAnotationsToOutside();
27937
- }
27938
- this.webViewerInstance.docViewer.setSearchHighlightColors({
27939
- // setSearchHighlightColors accepts both Annotations.Color objects or 'rgba' strings
27940
- searchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
27941
- activeSearchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
27942
- });
27943
- if (this.recivedSearchStringsArray.length !== 0) {
27944
- this.automaticSearch(this.recivedSearchStringsArray);
27945
- }
27946
- this.loadDocument();
27947
- }));
27998
+ }
27999
+ if (this.silentPdfTronService.isEnabled) {
28000
+ [this.silentPdfTron, this.webViewerInstance] = yield this.silentPdfTronService.getWebViewer();
28001
+ __classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_afterLoadWebViewer).call(this, this.webViewerInstance);
28002
+ this.resizeObserver = new ResizeObserver(() => __classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_updateSilentPdfTron).call(this));
28003
+ this.resizeObserver.observe(this.viewerRef.nativeElement);
28004
+ __classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_updateSilentPdfTron).call(this);
28005
+ }
28006
+ else {
28007
+ WebViewer({
28008
+ path: this.baseHref + '/assets/pdftrons',
28009
+ forceClientSideInit: true,
28010
+ streaming: true,
28011
+ licenseKey: this.environment.pdftronLicenceKey,
28012
+ css: this.isArabic
28013
+ ? this.baseHref + '/assets/styles/ar-mypdftron.css'
28014
+ : this.baseHref + '/assets/styles/en-mypdftron.css',
28015
+ annotationUser: this.nuxeo.nuxeoClient.user.properties.firstName + ' ' + this.nuxeo.nuxeoClient.user.properties.lastName,
28016
+ disabledElements: ['downloadButton', 'printButton']
28017
+ }, this.viewerRef.nativeElement).then((instance) => __awaiter(this, void 0, void 0, function* () {
28018
+ __classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_afterLoadWebViewer).call(this, instance);
28019
+ }));
28020
+ }
27948
28021
  });
27949
28022
  }
27950
28023
  importAnotationsFromOutside() {
@@ -27963,7 +28036,7 @@ class PdftronComponent {
27963
28036
  this.webViewerInstance.annotManager.on('annotationChanged', (annotations, action, { imported }) => {
27964
28037
  if (imported)
27965
28038
  return;
27966
- this.webViewerInstance.annotManager.exportAnnotations().then(exctractedAnotations => {
28039
+ this.webViewerInstance.annotManager.exportAnnotations().then((exctractedAnotations) => {
27967
28040
  this.onAddingAnotation.emit(exctractedAnotations);
27968
28041
  });
27969
28042
  // if tracking signature location is enable then emit signature outside with every changes in it
@@ -27992,7 +28065,6 @@ class PdftronComponent {
27992
28065
  }
27993
28066
  this.firstSignatureLoad = false;
27994
28067
  });
27995
- ;
27996
28068
  }
27997
28069
  exportingSignature() {
27998
28070
  const documentViewer = this.webViewerInstance.docViewer;
@@ -28004,11 +28076,10 @@ class PdftronComponent {
28004
28076
  console.log(annotation);
28005
28077
  }
28006
28078
  });
28007
- ;
28008
28079
  }
28009
28080
  extractAnotation(annotation, documentViewer) {
28010
28081
  if (annotation['image']) {
28011
- // convert base64 signature into file and emit it to out side
28082
+ // convert base64 signature into file and emit it to out side
28012
28083
  let base64Img = annotation['image']['currentSrc'];
28013
28084
  var arr = base64Img.split(','), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
28014
28085
  while (n--) {
@@ -28055,7 +28126,10 @@ class PdftronComponent {
28055
28126
  });
28056
28127
  }
28057
28128
  addDownloadButton() {
28058
- if (this.allowDownloadSecretFile || (!this.allowDownloadSecretFile && this.correspondance.properties[this.secrecyProperty] && this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
28129
+ if (this.allowDownloadSecretFile ||
28130
+ (!this.allowDownloadSecretFile &&
28131
+ this.correspondance.properties[this.secrecyProperty] &&
28132
+ this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
28059
28133
  this.webViewerInstance.setHeaderItems((header) => {
28060
28134
  header.push({
28061
28135
  type: 'actionButton',
@@ -28088,29 +28162,30 @@ class PdftronComponent {
28088
28162
  // this.events.next('download');
28089
28163
  // });
28090
28164
  // }
28091
- }),
28165
+ })
28092
28166
  });
28093
28167
  });
28094
28168
  }
28095
28169
  }
28096
28170
  addPrintButton() {
28097
- if (this.allowPrintSecretFile || (!this.allowPrintSecretFile && this.correspondance.properties[this.secrecyProperty] && this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
28171
+ if (this.allowPrintSecretFile ||
28172
+ (!this.allowPrintSecretFile &&
28173
+ this.correspondance.properties[this.secrecyProperty] &&
28174
+ this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
28098
28175
  this.webViewerInstance.setHeaderItems((header) => {
28099
28176
  header.push({
28100
28177
  type: 'actionButton',
28101
28178
  img: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.cls-1{fill:#abb0c4;}</style></defs><title>icon - header - print - line</title><path class="cls-1" d="M20,6H18V2H6V6H4A2,2,0,0,0,2,8v9a2,2,0,0,0,2,2H6v3H18V19h2a2,2,0,0,0,2-2V8A2,2,0,0,0,20,6ZM8,4h8V6H8Zm8,16H8V16h8Zm4-3H18V14H6v3H4V8H20Zm-4-7h2v2H16Zm-3,0h2v2H13Z"></path></svg>',
28102
- title: this.isArabic ? "طباعة" : 'Print',
28179
+ title: this.isArabic ? 'طباعة' : 'Print',
28103
28180
  onClick: () => {
28104
28181
  this.pdftronService.instance.print();
28105
28182
  this.events.next('print');
28106
- },
28183
+ }
28107
28184
  });
28108
28185
  });
28109
28186
  }
28110
28187
  else {
28111
- this.webViewerInstance.disableElements([
28112
- 'printModal',
28113
- ]);
28188
+ this.webViewerInstance.disableElements(['printModal']);
28114
28189
  }
28115
28190
  }
28116
28191
  addWatermark() {
@@ -28126,16 +28201,7 @@ class PdftronComponent {
28126
28201
  return;
28127
28202
  }
28128
28203
  const { docViewer, annotManager, Annotations } = this.webViewerInstance;
28129
- docViewer.on('documentLoaded', () => {
28130
- let fitMode = this.webViewerInstance.FitMode.FitWidth;
28131
- if (this.fitMode === 'FitPage') {
28132
- fitMode = this.webViewerInstance.FitMode.FitPage;
28133
- }
28134
- else if (this.fitMode === 'Zoom') {
28135
- fitMode = this.webViewerInstance.FitMode.Zoom;
28136
- }
28137
- this.webViewerInstance.setFitMode(fitMode);
28138
- });
28204
+ docViewer.on('documentLoaded', __classPrivateFieldGet(this, _PdftronComponent_docLoaded, "f"));
28139
28205
  if (!this.editMode) {
28140
28206
  this.webViewerInstance.annotManager.setReadOnly(true);
28141
28207
  // instance.enableTools([]);
@@ -28144,24 +28210,25 @@ class PdftronComponent {
28144
28210
  this.webViewerInstance.loadDocument(this.fileURL, {
28145
28211
  xodstreaming: true,
28146
28212
  customHeaders: {
28147
- Authorization: this.authHeader,
28148
- },
28213
+ Authorization: this.authHeader
28214
+ }
28149
28215
  // withCredentials: true,
28150
28216
  });
28151
28217
  }
28152
28218
  else {
28153
28219
  this.webViewerInstance.loadDocument(new Blob([new Uint8Array(this.fileData)], { type: this.DOCUMENT_TYPE }), {
28154
- filename: this.fileTitle,
28220
+ filename: this.fileTitle
28155
28221
  });
28156
28222
  }
28157
28223
  this.isFetching = false;
28158
28224
  // if not negelcting adding water mark then check conditions for adding it
28159
28225
  if (!this.negelectAddingWaterMark) {
28160
28226
  if (this.correspondance !== undefined) {
28161
- // if we need to check on secrecy level for adding water mark or not
28227
+ // if we need to check on secrecy level for adding water mark or not
28162
28228
  if (this.environment.enableViewerWaterMark && this.secrecyProperty) {
28163
28229
  // check for secrecy level befor adding watermark
28164
- if (this.correspondance.properties[this.secrecyProperty] && this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
28230
+ if (this.correspondance.properties[this.secrecyProperty] &&
28231
+ this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
28165
28232
  this.addWatermark();
28166
28233
  }
28167
28234
  }
@@ -28178,7 +28245,7 @@ class PdftronComponent {
28178
28245
  const xfdfString = yield this.webViewerInstance.annotManager.exportAnnotations();
28179
28246
  const data = yield doc.getFileData({
28180
28247
  // saves the document with annotations in it
28181
- xfdfString,
28248
+ xfdfString
28182
28249
  });
28183
28250
  const arr = new Uint8Array(data);
28184
28251
  const blob = new Blob([arr], { type: this.DOCUMENT_TYPE });
@@ -28192,7 +28259,7 @@ class PdftronComponent {
28192
28259
  'toolbarGroup-Shapes',
28193
28260
  'toolbarGroup-Edit',
28194
28261
  'toolbarGroup-Insert',
28195
- 'toolbarGroup-Annotate',
28262
+ 'toolbarGroup-Annotate'
28196
28263
  ]);
28197
28264
  this.webViewerInstance.annotManager.setReadOnly(true);
28198
28265
  }
@@ -28203,20 +28270,14 @@ class PdftronComponent {
28203
28270
  'toolbarGroup-Shapes',
28204
28271
  'toolbarGroup-Edit',
28205
28272
  'toolbarGroup-Insert',
28206
- 'toolbarGroup-Annotate',
28273
+ 'toolbarGroup-Annotate'
28207
28274
  ]);
28208
28275
  let group;
28209
28276
  if (this.editingType === 'signDoc') {
28210
- this.webViewerInstance.enableElements([
28211
- 'toolbarGroup-Insert'
28212
- ]);
28277
+ this.webViewerInstance.enableElements(['toolbarGroup-Insert']);
28213
28278
  }
28214
28279
  else if (this.editingType === 'annotate') {
28215
- this.webViewerInstance.enableElements([
28216
- 'toolbarGroup-Shapes',
28217
- 'toolbarGroup-Edit',
28218
- 'toolbarGroup-Annotate',
28219
- ]);
28280
+ this.webViewerInstance.enableElements(['toolbarGroup-Shapes', 'toolbarGroup-Edit', 'toolbarGroup-Annotate']);
28220
28281
  }
28221
28282
  }
28222
28283
  else {
@@ -28224,7 +28285,7 @@ class PdftronComponent {
28224
28285
  'toolbarGroup-Shapes',
28225
28286
  'toolbarGroup-Edit',
28226
28287
  'toolbarGroup-Insert',
28227
- 'toolbarGroup-Annotate',
28288
+ 'toolbarGroup-Annotate'
28228
28289
  ]);
28229
28290
  }
28230
28291
  this.webViewerInstance.annotManager.setReadOnly(false);
@@ -28236,11 +28297,9 @@ class PdftronComponent {
28236
28297
  this.toggleEdit();
28237
28298
  if (changes.urlFileContent &&
28238
28299
  changes.urlFileContent.previousValue &&
28239
- changes.urlFileContent.previousValue !==
28240
- changes.urlFileContent.currentValue) {
28300
+ changes.urlFileContent.previousValue !== changes.urlFileContent.currentValue) {
28241
28301
  this.ngOnDestroy();
28242
28302
  this.ngOnInit();
28243
- this.ngAfterViewInit();
28244
28303
  }
28245
28304
  }
28246
28305
  }
@@ -28256,7 +28315,7 @@ class PdftronComponent {
28256
28315
  const searchListener = (searchPattern, options, results) => {
28257
28316
  this.mySearchStringResults = [];
28258
28317
  if (this.savedAnotations.length > 0) {
28259
- this.savedAnotations.map(annotation => {
28318
+ this.savedAnotations.map((annotation) => {
28260
28319
  annotation.Hidden = true;
28261
28320
  // Always redraw annotation if rendering was updated
28262
28321
  annotManager.redrawAnnotation(annotation);
@@ -28265,9 +28324,9 @@ class PdftronComponent {
28265
28324
  // don't do any search until there is a search pattern
28266
28325
  if (searchPattern.trim().length > 0) {
28267
28326
  // add redaction annotation for each search result
28268
- this.newAnnotations = results.map(result => {
28327
+ this.newAnnotations = results.map((result) => {
28269
28328
  const annotation = new Annotations.TextHighlightAnnotation();
28270
- annotation.Quads = result.quads.map(quad => quad.getPoints());
28329
+ annotation.Quads = result.quads.map((quad) => quad.getPoints());
28271
28330
  annotation.PageNumber = result.pageNum;
28272
28331
  annotation.StrokeColor = new Annotations.Color(250, 206, 0, 0.50196);
28273
28332
  annotation.Author = this.webViewerInstance.annotManager.getCurrentUser();
@@ -28285,31 +28344,33 @@ class PdftronComponent {
28285
28344
  this.webViewerInstance.addSearchListener(searchListener);
28286
28345
  });
28287
28346
  }
28288
- // perform automatic search when intering the page
28347
+ // perform automatic search when intering the page
28289
28348
  automaticSearch(searchTextArray) {
28290
28349
  const { annotManager, docViewer, Annotations } = this.webViewerInstance;
28291
28350
  let searchOptions;
28292
28351
  this.webViewerInstance.openElements(['searchPanel']);
28293
28352
  docViewer.on('documentLoaded', () => {
28294
- const mode = this.webViewerInstance.CoreControls.Search.Mode.PAGE_STOP | this.webViewerInstance.CoreControls.Search.Mode.HIGHLIGHT | this.webViewerInstance.CoreControls.Search.Mode.AMBIENT_STRING;
28353
+ const mode = this.webViewerInstance.CoreControls.Search.Mode.PAGE_STOP |
28354
+ this.webViewerInstance.CoreControls.Search.Mode.HIGHLIGHT |
28355
+ this.webViewerInstance.CoreControls.Search.Mode.AMBIENT_STRING;
28295
28356
  this.mySearchStringResults = []; // empty my search result when starting new search
28296
28357
  if (this.fileWithOcr) {
28297
28358
  // add redaction annotation for each search result
28298
28359
  const annotation = new Annotations.TextHighlightAnnotation();
28299
- searchTextArray.map(searchText => {
28360
+ searchTextArray.map((searchText) => {
28300
28361
  let mySearch = searchText.split(' ');
28301
28362
  if (mySearch.length > 1) {
28302
28363
  // then i am searching with more than one word
28303
28364
  this.pages.pages.forEach((page, index) => {
28304
28365
  this.pageHeight = page.page_height;
28305
28366
  this.pageWidth = page.page_width;
28306
- this.standardHeight = this.webViewerInstance.docViewer.getPageHeight((index + 1));
28307
- this.standardWidth = this.webViewerInstance.docViewer.getPageWidth((index + 1));
28308
- page.zones.forEach(zone => {
28309
- zone.paragraphs.forEach(paragraph => {
28310
- paragraph.lines.forEach(line => {
28367
+ this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(index + 1);
28368
+ this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(index + 1);
28369
+ page.zones.forEach((zone) => {
28370
+ zone.paragraphs.forEach((paragraph) => {
28371
+ paragraph.lines.forEach((line) => {
28311
28372
  if (line.text.includes(searchText)) {
28312
- this.SearchForWordInLine(mySearch, line, (index + 1), page);
28373
+ this.SearchForWordInLine(mySearch, line, index + 1, page);
28313
28374
  }
28314
28375
  });
28315
28376
  });
@@ -28317,7 +28378,7 @@ class PdftronComponent {
28317
28378
  });
28318
28379
  }
28319
28380
  else {
28320
- // then i am searching with only one word
28381
+ // then i am searching with only one word
28321
28382
  this.searchForWordInAllPages(searchText);
28322
28383
  }
28323
28384
  });
@@ -28329,11 +28390,11 @@ class PdftronComponent {
28329
28390
  // If true, a search of the entire document will be performed. Otherwise, a single search will be performed.
28330
28391
  fullSearch: true,
28331
28392
  // The callback function that is called when the search returns a result.
28332
- onResult: result => {
28393
+ onResult: (result) => {
28333
28394
  // with 'PAGE_STOP' mode, the callback is invoked after each page has been searched.
28334
28395
  if (result.resultCode === this.webViewerInstance.CoreControls.Search.ResultCode.FOUND) {
28335
28396
  const annotation = new Annotations.TextHighlightAnnotation();
28336
- annotation.Quads = result.quads.map(quad => quad.getPoints());
28397
+ annotation.Quads = result.quads.map((quad) => quad.getPoints());
28337
28398
  console.log(annotation.Quads);
28338
28399
  annotation.PageNumber = result.pageNum;
28339
28400
  annotation.StrokeColor = new Annotations.Color(250, 206, 0, 0.50196);
@@ -28345,37 +28406,39 @@ class PdftronComponent {
28345
28406
  }
28346
28407
  }
28347
28408
  };
28348
- searchTextArray.map(searchedText => {
28409
+ searchTextArray.map((searchedText) => {
28349
28410
  docViewer.textSearchInit(searchedText, mode, searchOptions);
28350
28411
  });
28351
28412
  }
28352
28413
  });
28353
28414
  }
28354
- // search for single word in all pages
28415
+ // search for single word in all pages
28355
28416
  searchForWordInAllPages(searchedWord) {
28356
28417
  this.pages.pages.forEach((page, index) => {
28357
28418
  this.pageHeight = page.page_height;
28358
28419
  this.pageWidth = page.page_width;
28359
- this.standardHeight = this.webViewerInstance.docViewer.getPageHeight((index + 1));
28360
- this.standardWidth = this.webViewerInstance.docViewer.getPageWidth((index + 1));
28361
- const x = (this.pageWidth / this.standardWidth); // width ratio
28362
- const y = (this.pageHeight / this.standardHeight); // height ratio
28363
- page.zones.forEach(zone => {
28364
- zone.paragraphs.forEach(paragraph => {
28365
- paragraph.lines.forEach(line => {
28366
- line.words.forEach(word => {
28420
+ this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(index + 1);
28421
+ this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(index + 1);
28422
+ const x = this.pageWidth / this.standardWidth; // width ratio
28423
+ const y = this.pageHeight / this.standardHeight; // height ratio
28424
+ page.zones.forEach((zone) => {
28425
+ zone.paragraphs.forEach((paragraph) => {
28426
+ paragraph.lines.forEach((line) => {
28427
+ line.words.forEach((word) => {
28367
28428
  if (word.text.includes(searchedWord)) {
28368
28429
  // annotation.PageNumber = index+1;
28369
- let quads = [{
28370
- x1: (word.coordinates.upper_left.x / x),
28371
- x2: (word.coordinates.bottom_right.x / x),
28372
- x3: (word.coordinates.bottom_right.x / x),
28373
- x4: (word.coordinates.upper_left.x / x),
28374
- y1: (word.coordinates.upper_left.y / y),
28375
- y2: (word.coordinates.upper_left.y / y),
28376
- y3: (word.coordinates.bottom_right.y / y),
28377
- y4: (word.coordinates.bottom_right.y / y),
28378
- }];
28430
+ let quads = [
28431
+ {
28432
+ x1: word.coordinates.upper_left.x / x,
28433
+ x2: word.coordinates.bottom_right.x / x,
28434
+ x3: word.coordinates.bottom_right.x / x,
28435
+ x4: word.coordinates.upper_left.x / x,
28436
+ y1: word.coordinates.upper_left.y / y,
28437
+ y2: word.coordinates.upper_left.y / y,
28438
+ y3: word.coordinates.bottom_right.y / y,
28439
+ y4: word.coordinates.bottom_right.y / y
28440
+ }
28441
+ ];
28379
28442
  this.higlightText(quads, index + 1);
28380
28443
  this.constructSearchResult(searchedWord, index + 1, quads, line.text);
28381
28444
  }
@@ -28385,14 +28448,14 @@ class PdftronComponent {
28385
28448
  });
28386
28449
  });
28387
28450
  }
28388
- // search for word in single line
28451
+ // search for word in single line
28389
28452
  SearchForWordInLine(listOfSearchedWords, line, pagenumber, page) {
28390
28453
  this.pageHeight = page.page_height;
28391
28454
  this.pageWidth = page.page_width;
28392
- this.standardHeight = this.webViewerInstance.docViewer.getPageHeight((pagenumber));
28393
- this.standardWidth = this.webViewerInstance.docViewer.getPageWidth((pagenumber));
28394
- const x = (this.pageWidth / this.standardWidth); // width ratio
28395
- const y = (this.pageHeight / this.standardHeight); // height ratio
28455
+ this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(pagenumber);
28456
+ this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(pagenumber);
28457
+ const x = this.pageWidth / this.standardWidth; // width ratio
28458
+ const y = this.pageHeight / this.standardHeight; // height ratio
28396
28459
  // find only words related to my search form the line
28397
28460
  let myFoundedResults = [];
28398
28461
  let correctResults = [];
@@ -28403,27 +28466,29 @@ class PdftronComponent {
28403
28466
  });
28404
28467
  // find only words exist in my search sentence and not single and repeated word
28405
28468
  myFoundedResults.map((result, index) => {
28406
- if ((myFoundedResults[index]['wordIndex'] - 1 === (myFoundedResults[index - 1] && myFoundedResults[index - 1]['wordIndex'])) ||
28407
- (myFoundedResults[index + 1] && (myFoundedResults[index + 1]['wordIndex'] - 1 === myFoundedResults[index]['wordIndex']))) {
28469
+ if (myFoundedResults[index]['wordIndex'] - 1 ===
28470
+ (myFoundedResults[index - 1] && myFoundedResults[index - 1]['wordIndex']) ||
28471
+ (myFoundedResults[index + 1] &&
28472
+ myFoundedResults[index + 1]['wordIndex'] - 1 === myFoundedResults[index]['wordIndex'])) {
28408
28473
  correctResults.push(result);
28409
28474
  }
28410
28475
  });
28411
28476
  // highliht these words after eleminating all repeated and related words
28412
28477
  // must be for loop sp i can control the step in each loop
28413
28478
  let quads = [];
28414
- for (let i = 0; i < correctResults.length; (i = i + listOfSearchedWords.length)) {
28479
+ for (let i = 0; i < correctResults.length; i = i + listOfSearchedWords.length) {
28415
28480
  quads.push({
28416
- x1: (correctResults[((i + listOfSearchedWords.length) - 1)].word.coordinates.upper_left.x / x),
28417
- x2: (correctResults[i].word.coordinates.bottom_right.x / x),
28418
- x3: (correctResults[i].word.coordinates.bottom_right.x / x),
28419
- x4: (correctResults[((i + listOfSearchedWords.length) - 1)].word.coordinates.upper_left.x / x),
28420
- y1: (correctResults[i].word.coordinates.upper_left.y / y),
28421
- y2: (correctResults[((i + listOfSearchedWords.length) - 1)].word.coordinates.upper_left.y / y),
28422
- y3: (correctResults[((i + listOfSearchedWords.length) - 1)].word.coordinates.bottom_right.y / y),
28423
- y4: (correctResults[i].word.coordinates.bottom_right.y / y),
28481
+ x1: correctResults[i + listOfSearchedWords.length - 1].word.coordinates.upper_left.x / x,
28482
+ x2: correctResults[i].word.coordinates.bottom_right.x / x,
28483
+ x3: correctResults[i].word.coordinates.bottom_right.x / x,
28484
+ x4: correctResults[i + listOfSearchedWords.length - 1].word.coordinates.upper_left.x / x,
28485
+ y1: correctResults[i].word.coordinates.upper_left.y / y,
28486
+ y2: correctResults[i + listOfSearchedWords.length - 1].word.coordinates.upper_left.y / y,
28487
+ y3: correctResults[i + listOfSearchedWords.length - 1].word.coordinates.bottom_right.y / y,
28488
+ y4: correctResults[i].word.coordinates.bottom_right.y / y
28424
28489
  });
28425
28490
  this.higlightText(quads, pagenumber);
28426
- this.constructSearchResult(listOfSearchedWords.join(" "), pagenumber, quads, line.text);
28491
+ this.constructSearchResult(listOfSearchedWords.join(' '), pagenumber, quads, line.text);
28427
28492
  }
28428
28493
  }
28429
28494
  constructSearchResult(searchedText, pageNum, quads, line) {
@@ -28436,7 +28501,8 @@ class PdftronComponent {
28436
28501
  resultStrEnd: mySeearchedTextEndIndex,
28437
28502
  pageNum: pageNum,
28438
28503
  resultCode: 2,
28439
- quads: [{
28504
+ quads: [
28505
+ {
28440
28506
  ea: quads[0]['y3'],
28441
28507
  fa: quads[0]['y4'],
28442
28508
  ha: quads[0]['x1'],
@@ -28445,7 +28511,8 @@ class PdftronComponent {
28445
28511
  qB: quads[0]['x4'],
28446
28512
  rB: quads[0]['y1'],
28447
28513
  sB: quads[0]['y2']
28448
- }]
28514
+ }
28515
+ ]
28449
28516
  };
28450
28517
  this.mySearchStringResults.push(searchResultObject);
28451
28518
  console.log(this.mySearchStringResults);
@@ -28469,34 +28536,97 @@ class PdftronComponent {
28469
28536
  }
28470
28537
  // ------------------------------------------------------------------------ ------------------------------------------
28471
28538
  ngOnDestroy() {
28472
- if (this.webViewerInstance) {
28473
- this.webViewerInstance.closeDocument().then(() => {
28474
- console.log('document closed!');
28475
- });
28476
- this.pdftronService.instance = this.webViewerInstance = null;
28539
+ if (this.silentPdfTronService.isEnabled) {
28540
+ __classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_reset).call(this);
28541
+ }
28542
+ else {
28543
+ if (this.webViewerInstance) {
28544
+ this.webViewerInstance.closeDocument().then(() => {
28545
+ console.log('document closed!');
28546
+ });
28547
+ this.pdftronService.instance = this.webViewerInstance = null;
28548
+ }
28549
+ this.transelationSubscrition ? this.transelationSubscrition.unsubscribe() : null;
28477
28550
  }
28478
- this.transelationSubscrition ? this.transelationSubscrition.unsubscribe() : null;
28479
28551
  }
28480
28552
  }
28481
- PdftronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService }, { token: APP_BASE_HREF }, { token: SecurePipe }, { token: TranslationService }, { token: CustomToastrService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
28482
- PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance", secrecyProperty: "secrecyProperty", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark" }, outputs: { onSignatureTracking: "onSignatureTracking", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
28553
+ _PdftronComponent_docLoaded = new WeakMap(), _PdftronComponent_instances = new WeakSet(), _PdftronComponent_updateSilentPdfTron = function _PdftronComponent_updateSilentPdfTron() {
28554
+ const rect = this.viewerRef.nativeElement.getBoundingClientRect();
28555
+ Object.assign(this.silentPdfTron.style, {
28556
+ position: 'absolute',
28557
+ top: `${rect.top}px`,
28558
+ left: `${rect.left}px`,
28559
+ width: `${rect.width}px`,
28560
+ height: `${rect.height}px`,
28561
+ zIndex: '9999',
28562
+ display: 'block'
28563
+ });
28564
+ }, _PdftronComponent_afterLoadWebViewer = function _PdftronComponent_afterLoadWebViewer(instance) {
28565
+ this.isArabic ? instance.setLanguage('ar') : instance.setLanguage('en');
28566
+ this.pdftronService.instance = this.webViewerInstance = instance;
28567
+ if (this.correspondance.facets.indexOf('ctocr') > -1) {
28568
+ this.fileWithOcr = true;
28569
+ this.pages = JSON.parse(this.correspondance.properties['ctocr:recognizedJson']);
28570
+ // override search funtion to use our search in ocr not defult search
28571
+ instance.overrideSearchExecution(this.searchFn);
28572
+ }
28573
+ else {
28574
+ // if no ocr then add search lisner to lisne to internal search and catch results
28575
+ this.addSearchListner();
28576
+ }
28577
+ this.addPrintButton();
28578
+ this.addDownloadButton();
28579
+ this.importSignature();
28580
+ this.exportingSignature();
28581
+ this.deleteAnnotation();
28582
+ this.exportingSavedSignature();
28583
+ if (this.useOutsideAnotations) {
28584
+ this.importAnotationsFromOutside();
28585
+ this.exportAnotationsToOutside();
28586
+ }
28587
+ this.webViewerInstance.docViewer.setSearchHighlightColors({
28588
+ // setSearchHighlightColors accepts both Annotations.Color objects or 'rgba' strings
28589
+ searchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
28590
+ activeSearchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196)
28591
+ });
28592
+ if (this.recivedSearchStringsArray.length !== 0) {
28593
+ this.automaticSearch(this.recivedSearchStringsArray);
28594
+ }
28595
+ this.loadDocument();
28596
+ }, _PdftronComponent_reset = function _PdftronComponent_reset() {
28597
+ var _a;
28598
+ this.webViewerInstance.closeDocument().then(() => {
28599
+ console.log('document closed!');
28600
+ });
28601
+ this.pdftronService.instance = null;
28602
+ this.transelationSubscrition ? this.transelationSubscrition.unsubscribe() : null;
28603
+ this.silentPdfTron.style.display = 'none';
28604
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
28605
+ this.webViewerInstance.setHeaderItems((header) => {
28606
+ header.headers.default = header.headers.default.filter((q) => { var _a; return !((_a = q.img) === null || _a === void 0 ? void 0 : _a.includes('<svg')); });
28607
+ });
28608
+ this.webViewerInstance.docViewer.off('documentLoaded', __classPrivateFieldGet(this, _PdftronComponent_docLoaded, "f"));
28609
+ // maybe will need to reset signature & annotations
28610
+ };
28611
+ PdftronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: PdftronService }, { token: NuxeoService }, { token: APP_BASE_HREF }, { token: TranslationService }, { token: SilentPdfTronService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Component });
28612
+ PdftronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PdftronComponent, selector: "app-pdftron", inputs: { editMode: "editMode", actionClicked: "actionClicked", fileTitle: "fileTitle", docId: "docId", DOCUMENT_TYPE: "DOCUMENT_TYPE", fileData: "fileData", fitMode: "fitMode", authHeader: "authHeader", fileURL: "fileURL", correspondance: "correspondance", secrecyProperty: "secrecyProperty", editingType: "editingType", userSignatures: "userSignatures", searchString: "searchString", trackSignature: "trackSignature", useOutsideAnotations: "useOutsideAnotations", importedAnotations: "importedAnotations", allowDownloadSecretFile: "allowDownloadSecretFile", allowPrintSecretFile: "allowPrintSecretFile", negelectAddingWaterMark: "negelectAddingWaterMark" }, outputs: { onSignatureTracking: "onSignatureTracking", onAddingAnotation: "onAddingAnotation", events: "events", SignatureEvent: "SignatureEvent" }, providers: [SecurePipe], viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["fileViewer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #fileViewer style=\"width: 100%; height: 100%;\"></div>\r\n", styles: [""] });
28483
28613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, decorators: [{
28484
28614
  type: Component,
28485
28615
  args: [{
28486
28616
  selector: 'app-pdftron',
28487
28617
  templateUrl: './pdftron.component.html',
28488
28618
  styleUrls: ['./pdftron.component.scss'],
28489
- providers: [SecurePipe],
28619
+ providers: [SecurePipe]
28490
28620
  }]
28491
28621
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: PdftronService }, { type: NuxeoService }, { type: undefined, decorators: [{
28492
28622
  type: Inject,
28493
28623
  args: [APP_BASE_HREF]
28494
- }] }, { type: SecurePipe }, { type: TranslationService }, { type: CustomToastrService }, { type: undefined, decorators: [{
28624
+ }] }, { type: TranslationService }, { type: SilentPdfTronService }, { type: undefined, decorators: [{
28495
28625
  type: Inject,
28496
28626
  args: ['environment']
28497
28627
  }] }]; }, propDecorators: { viewerRef: [{
28498
28628
  type: ViewChild,
28499
- args: ['fileViewer']
28629
+ args: ['fileViewer', { static: true }]
28500
28630
  }], editMode: [{
28501
28631
  type: Input
28502
28632
  }], actionClicked: [{
@@ -33583,5 +33713,5 @@ var index = /*#__PURE__*/Object.freeze({
33583
33713
  * Generated bundle index. Do not edit.
33584
33714
  */
33585
33715
 
33586
- export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseChartComponent, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CHART_DEFAULTS_OPTIONS, CHART_MAIN_COLOR, COLORS_COUNT, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartComponent, ChartDataService, index$1 as ChartDefaults, index as ChartPlugins, index$2 as ChartUtils, ChartsModule, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ConnectionLabelComponent, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationCreateFormComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataChartComponent, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramUtils, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicCustomComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EditDeleteModalComponent, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GatewayNodeComponent, GatewayPortsComponent, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, InputPort, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_GATEWAY_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NodePortsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, OutputPort, PAGINATION_MODE, PANEL_MODE, PageSizesListComponent, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SingleActivityComponent, Socket, SpellCheckerFieldModule, SpellCheckerTextFieldComponent, SpinnerComponent, StatisticService, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$, extensionJsonsFactory, filterEnabled, getConnections, getRandomNumber, getValue, mergeArrays, mergeObjects, minute$1 as minute, provideExtensionConfig, reduceEmptyMenus, reduceSeparators, removeConnections, removeNode, removeNodeAndConnections, serializeControl, serializePort, sortByOrder };
33716
+ export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseChartComponent, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CHART_DEFAULTS_OPTIONS, CHART_MAIN_COLOR, COLORS_COUNT, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartComponent, ChartDataService, index$1 as ChartDefaults, index as ChartPlugins, index$2 as ChartUtils, ChartsModule, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ConnectionLabelComponent, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationCreateFormComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataChartComponent, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramUtils, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicCustomComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EditDeleteModalComponent, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GatewayNodeComponent, GatewayPortsComponent, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, InputPort, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_GATEWAY_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NodePortsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, OutputPort, PAGINATION_MODE, PANEL_MODE, PageSizesListComponent, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SilentPdfTronService, SingleActivityComponent, Socket, SpellCheckerFieldModule, SpellCheckerTextFieldComponent, SpinnerComponent, StatisticService, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$, extensionJsonsFactory, filterEnabled, getConnections, getRandomNumber, getValue, mergeArrays, mergeObjects, minute$1 as minute, provideExtensionConfig, reduceEmptyMenus, reduceSeparators, removeConnections, removeNode, removeNodeAndConnections, serializeControl, serializePort, sortByOrder };
33587
33717
  //# sourceMappingURL=nuxeo-development-framework.js.map