nuxeo-development-framework 4.5.3 → 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.
- package/bundles/nuxeo-development-framework.umd.js +360 -210
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/file-manger/components/add-to-collection/add-to-collection.component.js +40 -32
- package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +209 -167
- package/esm2015/lib/components/pdf-tron/pdftron/silent-pdftron.service.js +94 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/nuxeo-development-framework.js +325 -187
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/file-manger/components/add-to-collection/add-to-collection.component.d.ts +8 -8
- package/lib/components/pdf-tron/pdftron/pdftron.component.d.ts +8 -8
- package/lib/components/pdf-tron/pdftron/silent-pdftron.service.d.ts +16 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -19142,27 +19142,28 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19142
19142
|
this.fileManagerService = fileManagerService;
|
|
19143
19143
|
this.customToastrService = customToastrService;
|
|
19144
19144
|
this.nuxeoDialogService = nuxeoDialogService;
|
|
19145
|
-
this.createOperation =
|
|
19146
|
-
this.addOperation =
|
|
19147
|
-
this.getCollectionPP =
|
|
19145
|
+
this.createOperation = "Collection.Create";
|
|
19146
|
+
this.addOperation = "Document.AddToCollection";
|
|
19147
|
+
this.getCollectionPP = "PP_DMS_User_Collections";
|
|
19148
19148
|
this.visibleChange = new EventEmitter();
|
|
19149
19149
|
this.rtlEnabled = false;
|
|
19150
19150
|
this.isSelected = true;
|
|
19151
19151
|
this.tagsInput$ = new Subject();
|
|
19152
19152
|
this.tagsLoading = false;
|
|
19153
19153
|
this._visible = false;
|
|
19154
|
-
this.onFormCollectionSubmit = (
|
|
19155
|
-
e.preventDefault();
|
|
19154
|
+
this.onFormCollectionSubmit = () => {
|
|
19156
19155
|
this.loading = true;
|
|
19157
|
-
return this.fileManagerService
|
|
19156
|
+
return this.fileManagerService
|
|
19157
|
+
.addToCollection(this.selectedItems, this.collectionid, this.addOperation)
|
|
19158
|
+
.pipe(tap((res) => {
|
|
19158
19159
|
this.loading = false;
|
|
19159
19160
|
this.form.instance.resetValues();
|
|
19160
19161
|
this.selectedTags = null;
|
|
19161
19162
|
this.visible = false;
|
|
19162
|
-
this.customToastrService.show(
|
|
19163
|
+
this.customToastrService.show("success", "TOASTER.SUCCESS", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION");
|
|
19163
19164
|
}, (err) => {
|
|
19164
19165
|
this.loading = false;
|
|
19165
|
-
this.customToastrService.show(
|
|
19166
|
+
this.customToastrService.show("error", "TOASTER.ERROR", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION_ERROR");
|
|
19166
19167
|
}));
|
|
19167
19168
|
};
|
|
19168
19169
|
}
|
|
@@ -19185,12 +19186,12 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19185
19186
|
const options = {
|
|
19186
19187
|
component: NdfNuxeoDialog,
|
|
19187
19188
|
//TODO [Asem] how to put the wrapper ID
|
|
19188
|
-
panelClass:
|
|
19189
|
+
panelClass: "popUpParent",
|
|
19189
19190
|
config: {
|
|
19190
|
-
title: this.translateService.instant(
|
|
19191
|
+
title: this.translateService.instant("FILE_MANAGER.ADD_TO_COLLECTION"),
|
|
19191
19192
|
contentTemplate: this.contentTemplate,
|
|
19192
|
-
actionsTemplate: this.actionsTemplate
|
|
19193
|
-
}
|
|
19193
|
+
actionsTemplate: this.actionsTemplate,
|
|
19194
|
+
},
|
|
19194
19195
|
};
|
|
19195
19196
|
this.nuxeoDialogService
|
|
19196
19197
|
.open(options)
|
|
@@ -19201,7 +19202,9 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19201
19202
|
}
|
|
19202
19203
|
emitSelection(event) {
|
|
19203
19204
|
if (this.isSelected) {
|
|
19204
|
-
this.fileManagerService
|
|
19205
|
+
this.fileManagerService
|
|
19206
|
+
.createNewCollection(event.displayLabel, this.createOperation)
|
|
19207
|
+
.subscribe((res) => {
|
|
19205
19208
|
this.collectionid = res.uid;
|
|
19206
19209
|
});
|
|
19207
19210
|
}
|
|
@@ -19209,24 +19212,29 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19209
19212
|
this.collectionid = event.id;
|
|
19210
19213
|
}
|
|
19211
19214
|
loadItems() {
|
|
19212
|
-
let searchterm =
|
|
19215
|
+
let searchterm = "";
|
|
19213
19216
|
this.isSelected = false;
|
|
19214
19217
|
let mycategories = [];
|
|
19215
|
-
this.items$ = concat(this.fileManagerService
|
|
19218
|
+
this.items$ = concat(this.fileManagerService
|
|
19219
|
+
.getCollectionFromPP(searchterm, this.getCollectionPP)
|
|
19220
|
+
.pipe(switchMap((res) => {
|
|
19216
19221
|
res.entries.map((entry) => {
|
|
19217
|
-
if (!this.enableMemberInCollections ||
|
|
19222
|
+
if (!this.enableMemberInCollections ||
|
|
19223
|
+
!this.memberInCollections.includes(entry.id)) {
|
|
19218
19224
|
mycategories.push({
|
|
19219
19225
|
displayLabel: entry.title,
|
|
19220
19226
|
id: entry.uid,
|
|
19221
19227
|
path: entry.path,
|
|
19222
|
-
icon: entry.properties[
|
|
19228
|
+
icon: entry.properties["common:icon"],
|
|
19223
19229
|
});
|
|
19224
19230
|
}
|
|
19225
19231
|
});
|
|
19226
19232
|
return of(mycategories);
|
|
19227
19233
|
})), // default items
|
|
19228
19234
|
this.tagsInput$.pipe(debounceTime(200), distinctUntilChanged(), tap(() => (this.tagsLoading = true)), switchMap((searchterm) => {
|
|
19229
|
-
return this.fileManagerService
|
|
19235
|
+
return this.fileManagerService
|
|
19236
|
+
.getCollectionFromPP(searchterm, this.getCollectionPP)
|
|
19237
|
+
.pipe(catchError(() => of([])), // empty list on error
|
|
19230
19238
|
switchMap((searchCat) => {
|
|
19231
19239
|
let myInerCateg = [];
|
|
19232
19240
|
this.tagsLoading = false;
|
|
@@ -19236,7 +19244,7 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19236
19244
|
displayLabel: entry.title,
|
|
19237
19245
|
id: entry.uid,
|
|
19238
19246
|
path: entry.path,
|
|
19239
|
-
icon: entry.properties[
|
|
19247
|
+
icon: entry.properties["common:icon"],
|
|
19240
19248
|
});
|
|
19241
19249
|
});
|
|
19242
19250
|
return of(myInerCateg);
|
|
@@ -19245,23 +19253,23 @@ class AddToCollectionComponent extends BaseComponent {
|
|
|
19245
19253
|
}
|
|
19246
19254
|
}
|
|
19247
19255
|
AddToCollectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AddToCollectionComponent, deps: [{ token: FileManagerService }, { token: CustomToastrService }, { token: NuxeoDialogService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
19248
|
-
AddToCollectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AddToCollectionComponent, selector: "app-add-to-collection", inputs: { createOperation: "createOperation", addOperation: "addOperation", getCollectionPP: "getCollectionPP", memberInCollections: "memberInCollections", enableMemberInCollections: "enableMemberInCollections", visible: "visible", rtlEnabled: "rtlEnabled", selectedItems: "selectedItems" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: DxFormComponent, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #contentTemplate>\r\n
|
|
19256
|
+
AddToCollectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AddToCollectionComponent, selector: "app-add-to-collection", inputs: { createOperation: "createOperation", addOperation: "addOperation", getCollectionPP: "getCollectionPP", memberInCollections: "memberInCollections", enableMemberInCollections: "enableMemberInCollections", visible: "visible", rtlEnabled: "rtlEnabled", selectedItems: "selectedItems" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: DxFormComponent, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #contentTemplate>\r\n <form>\r\n <dx-form\r\n class=\"collection-form-wrapper\"\r\n #createForm\r\n [formData]=\"formData\"\r\n [disabled]=\"loading\"\r\n >\r\n <dxi-item editorType=\"dxTextBox\">\r\n <ng-select\r\n [items]=\"items$ | async\"\r\n bindLabel=\"displayLabel\"\r\n [addTag]=\"true\"\r\n addTagText=\"Add collection\"\r\n [multiple]=\"false\"\r\n [hideSelected]=\"true\"\r\n [minTermLength]=\"0\"\r\n [loading]=\"tagsLoading\"\r\n typeToSearchText=\"search\"\r\n [typeahead]=\"tagsInput$\"\r\n [(ngModel)]=\"selectedTags\"\r\n required\r\n placeholder=\"{{ 'VOCABULARY.SELECT_ITEM' | translate }}\"\r\n name=\"selectedItem\"\r\n (change)=\"emitSelection($event)\"\r\n >\r\n </ng-select>\r\n </dxi-item>\r\n </dx-form>\r\n </form>\r\n</ng-template>\r\n\r\n<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n <span\r\n class=\"submission-button px-5\"\r\n (click)=\"dialog.executeAction(onFormCollectionSubmit)\"\r\n >\r\n {{ \"FILE_MANAGER.ADD\" | translate }}\r\n </span>\r\n</ng-template>\r\n", styles: [""], components: [{ type: i4$4.DxFormComponent, selector: "dx-form", inputs: ["accessKey", "activeStateEnabled", "alignItemLabels", "alignItemLabelsInAllGroups", "colCount", "colCountByScreen", "customizeItem", "disabled", "elementAttr", "focusStateEnabled", "formData", "height", "hint", "hoverStateEnabled", "items", "labelLocation", "labelMode", "minColWidth", "optionalMark", "readOnly", "requiredMark", "requiredMessage", "rtlEnabled", "screenByWidth", "scrollingEnabled", "showColonAfterLabel", "showOptionalMark", "showRequiredMark", "showValidationSummary", "tabIndex", "validationGroup", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onEditorEnterKey", "onFieldDataChanged", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "alignItemLabelsChange", "alignItemLabelsInAllGroupsChange", "colCountChange", "colCountByScreenChange", "customizeItemChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "formDataChange", "heightChange", "hintChange", "hoverStateEnabledChange", "itemsChange", "labelLocationChange", "labelModeChange", "minColWidthChange", "optionalMarkChange", "readOnlyChange", "requiredMarkChange", "requiredMessageChange", "rtlEnabledChange", "screenByWidthChange", "scrollingEnabledChange", "showColonAfterLabelChange", "showOptionalMarkChange", "showRequiredMarkChange", "showValidationSummaryChange", "tabIndexChange", "validationGroupChange", "visibleChange", "widthChange"] }, { type: i5$2.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { type: i3$3.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], directives: [{ type: i2$6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2$6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4$1.AsyncPipe, "translate": i1.TranslatePipe } });
|
|
19249
19257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AddToCollectionComponent, decorators: [{
|
|
19250
19258
|
type: Component,
|
|
19251
19259
|
args: [{
|
|
19252
|
-
selector:
|
|
19253
|
-
templateUrl:
|
|
19254
|
-
styleUrls: [
|
|
19260
|
+
selector: "app-add-to-collection",
|
|
19261
|
+
templateUrl: "./add-to-collection.component.html",
|
|
19262
|
+
styleUrls: ["./add-to-collection.component.scss"],
|
|
19255
19263
|
}]
|
|
19256
19264
|
}], ctorParameters: function () { return [{ type: FileManagerService }, { type: CustomToastrService }, { type: NuxeoDialogService }, { type: i0.Injector }]; }, propDecorators: { form: [{
|
|
19257
19265
|
type: ViewChild,
|
|
19258
19266
|
args: [DxFormComponent, { static: false }]
|
|
19259
19267
|
}], contentTemplate: [{
|
|
19260
19268
|
type: ViewChild,
|
|
19261
|
-
args: [
|
|
19269
|
+
args: ["contentTemplate"]
|
|
19262
19270
|
}], actionsTemplate: [{
|
|
19263
19271
|
type: ViewChild,
|
|
19264
|
-
args: [
|
|
19272
|
+
args: ["actionsTemplate"]
|
|
19265
19273
|
}], createOperation: [{
|
|
19266
19274
|
type: Input
|
|
19267
19275
|
}], addOperation: [{
|
|
@@ -27780,6 +27788,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
27780
27788
|
}]
|
|
27781
27789
|
}], ctorParameters: function () { return []; } });
|
|
27782
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;
|
|
27783
27879
|
/**
|
|
27784
27880
|
* A reusable file viewer based on PDFTron Library
|
|
27785
27881
|
* @title
|
|
@@ -27794,15 +27890,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
27794
27890
|
* </app-pdftron>
|
|
27795
27891
|
*/
|
|
27796
27892
|
class PdftronComponent {
|
|
27797
|
-
constructor(cdr, pdftronService, nuxeo, baseHref,
|
|
27893
|
+
constructor(cdr, pdftronService, nuxeo, baseHref, translationService, silentPdfTronService, environment) {
|
|
27798
27894
|
this.cdr = cdr;
|
|
27799
27895
|
this.pdftronService = pdftronService;
|
|
27800
27896
|
this.nuxeo = nuxeo;
|
|
27801
27897
|
this.baseHref = baseHref;
|
|
27802
|
-
this.securePipe = securePipe;
|
|
27803
27898
|
this.translationService = translationService;
|
|
27804
|
-
this.
|
|
27899
|
+
this.silentPdfTronService = silentPdfTronService;
|
|
27805
27900
|
this.environment = environment;
|
|
27901
|
+
_PdftronComponent_instances.add(this);
|
|
27806
27902
|
this.actionClicked = false; // used to know if there is action clicked outside to start edit mode or not
|
|
27807
27903
|
this.DOCUMENT_TYPE = 'application/pdf';
|
|
27808
27904
|
this.fitMode = 'FitWidth';
|
|
@@ -27817,8 +27913,18 @@ class PdftronComponent {
|
|
|
27817
27913
|
this.events = new EventEmitter();
|
|
27818
27914
|
this.SignatureEvent = new EventEmitter(); // used to export signature to outside
|
|
27819
27915
|
this.firstTimeLoad = true; //flage to control importing signatures in the first time load only
|
|
27820
|
-
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
|
|
27821
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
|
+
});
|
|
27822
27928
|
this.savedAnotations = [];
|
|
27823
27929
|
this.fileWithOcr = false;
|
|
27824
27930
|
this.newAnnotations = [];
|
|
@@ -27827,7 +27933,7 @@ class PdftronComponent {
|
|
|
27827
27933
|
this.searchFn = (searchValue, options) => {
|
|
27828
27934
|
this.mySearchStringResults = [];
|
|
27829
27935
|
if (this.savedAnotations.length > 0) {
|
|
27830
|
-
this.savedAnotations.map(annotation => {
|
|
27936
|
+
this.savedAnotations.map((annotation) => {
|
|
27831
27937
|
annotation.Hidden = true;
|
|
27832
27938
|
// Always redraw annotation if rendering was updated
|
|
27833
27939
|
this.webViewerInstance.annotManager.redrawAnnotation(annotation);
|
|
@@ -27844,13 +27950,13 @@ class PdftronComponent {
|
|
|
27844
27950
|
this.pages.pages.forEach((page, index) => {
|
|
27845
27951
|
this.pageHeight = page.page_height;
|
|
27846
27952
|
this.pageWidth = page.page_width;
|
|
27847
|
-
this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(
|
|
27848
|
-
this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(
|
|
27849
|
-
page.zones.forEach(zone => {
|
|
27850
|
-
zone.paragraphs.forEach(paragraph => {
|
|
27851
|
-
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) => {
|
|
27852
27958
|
if (line.text.includes(searchValue)) {
|
|
27853
|
-
this.SearchForWordInLine(mySearch, line,
|
|
27959
|
+
this.SearchForWordInLine(mySearch, line, index + 1, page);
|
|
27854
27960
|
}
|
|
27855
27961
|
});
|
|
27856
27962
|
});
|
|
@@ -27858,7 +27964,7 @@ class PdftronComponent {
|
|
|
27858
27964
|
});
|
|
27859
27965
|
}
|
|
27860
27966
|
else {
|
|
27861
|
-
// then i am searching with only one word
|
|
27967
|
+
// then i am searching with only one word
|
|
27862
27968
|
this.searchForWordInAllPages(searchValue);
|
|
27863
27969
|
}
|
|
27864
27970
|
this.webViewerInstance.docViewer.clearSearchResults();
|
|
@@ -27872,69 +27978,44 @@ class PdftronComponent {
|
|
|
27872
27978
|
}
|
|
27873
27979
|
ngOnInit() {
|
|
27874
27980
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27875
|
-
this.transelationSubscrition = this.translationService.isArabic.subscribe(res => {
|
|
27981
|
+
this.transelationSubscrition = this.translationService.isArabic.subscribe((res) => {
|
|
27876
27982
|
this.isArabic = res;
|
|
27877
27983
|
});
|
|
27878
|
-
});
|
|
27879
|
-
}
|
|
27880
|
-
ngAfterViewInit() {
|
|
27881
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27882
27984
|
this.recivedSearchStringsArray = this.searchString.trim() ? this.searchString.split(',') : [];
|
|
27883
27985
|
if (this.fileTitle) {
|
|
27884
27986
|
if (this.fileTitle.endsWith('.ppt')) {
|
|
27885
27987
|
this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
|
|
27886
27988
|
}
|
|
27887
27989
|
else if (this.fileTitle.endsWith('.pptx')) {
|
|
27888
|
-
this.DOCUMENT_TYPE =
|
|
27889
|
-
'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
27990
|
+
this.DOCUMENT_TYPE = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
27890
27991
|
}
|
|
27891
27992
|
else if (this.fileTitle.endsWith('.doc')) {
|
|
27892
27993
|
this.DOCUMENT_TYPE = 'application/msword';
|
|
27893
27994
|
}
|
|
27894
27995
|
else if (this.fileTitle.endsWith('.docx')) {
|
|
27895
|
-
this.DOCUMENT_TYPE =
|
|
27896
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
27996
|
+
this.DOCUMENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
27897
27997
|
}
|
|
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 {
|
|
27898
28007
|
WebViewer({
|
|
27899
28008
|
path: this.baseHref + '/assets/pdftrons',
|
|
27900
28009
|
forceClientSideInit: true,
|
|
27901
28010
|
streaming: true,
|
|
27902
28011
|
licenseKey: this.environment.pdftronLicenceKey,
|
|
27903
|
-
css: this.isArabic
|
|
28012
|
+
css: this.isArabic
|
|
28013
|
+
? this.baseHref + '/assets/styles/ar-mypdftron.css'
|
|
28014
|
+
: this.baseHref + '/assets/styles/en-mypdftron.css',
|
|
27904
28015
|
annotationUser: this.nuxeo.nuxeoClient.user.properties.firstName + ' ' + this.nuxeo.nuxeoClient.user.properties.lastName,
|
|
27905
|
-
disabledElements: ['downloadButton', 'printButton']
|
|
28016
|
+
disabledElements: ['downloadButton', 'printButton']
|
|
27906
28017
|
}, this.viewerRef.nativeElement).then((instance) => __awaiter(this, void 0, void 0, function* () {
|
|
27907
|
-
this
|
|
27908
|
-
this.pdftronService.instance = this.webViewerInstance = instance;
|
|
27909
|
-
if (this.correspondance.facets.indexOf('ctocr') > -1) {
|
|
27910
|
-
this.fileWithOcr = true;
|
|
27911
|
-
this.pages = JSON.parse(this.correspondance.properties['ctocr:recognizedJson']);
|
|
27912
|
-
// override search funtion to use our search in ocr not defult search
|
|
27913
|
-
instance.overrideSearchExecution(this.searchFn);
|
|
27914
|
-
}
|
|
27915
|
-
else {
|
|
27916
|
-
// if no ocr then add search lisner to lisne to internal search and catch results
|
|
27917
|
-
this.addSearchListner();
|
|
27918
|
-
}
|
|
27919
|
-
this.addPrintButton();
|
|
27920
|
-
this.addDownloadButton();
|
|
27921
|
-
this.importSignature();
|
|
27922
|
-
this.exportingSignature();
|
|
27923
|
-
this.deleteAnnotation();
|
|
27924
|
-
this.exportingSavedSignature();
|
|
27925
|
-
if (this.useOutsideAnotations) {
|
|
27926
|
-
this.importAnotationsFromOutside();
|
|
27927
|
-
this.exportAnotationsToOutside();
|
|
27928
|
-
}
|
|
27929
|
-
this.webViewerInstance.docViewer.setSearchHighlightColors({
|
|
27930
|
-
// setSearchHighlightColors accepts both Annotations.Color objects or 'rgba' strings
|
|
27931
|
-
searchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
27932
|
-
activeSearchResult: new this.webViewerInstance.Annotations.Color(250, 206, 0, 0.50196),
|
|
27933
|
-
});
|
|
27934
|
-
if (this.recivedSearchStringsArray.length !== 0) {
|
|
27935
|
-
this.automaticSearch(this.recivedSearchStringsArray);
|
|
27936
|
-
}
|
|
27937
|
-
this.loadDocument();
|
|
28018
|
+
__classPrivateFieldGet(this, _PdftronComponent_instances, "m", _PdftronComponent_afterLoadWebViewer).call(this, instance);
|
|
27938
28019
|
}));
|
|
27939
28020
|
}
|
|
27940
28021
|
});
|
|
@@ -27955,7 +28036,7 @@ class PdftronComponent {
|
|
|
27955
28036
|
this.webViewerInstance.annotManager.on('annotationChanged', (annotations, action, { imported }) => {
|
|
27956
28037
|
if (imported)
|
|
27957
28038
|
return;
|
|
27958
|
-
this.webViewerInstance.annotManager.exportAnnotations().then(exctractedAnotations => {
|
|
28039
|
+
this.webViewerInstance.annotManager.exportAnnotations().then((exctractedAnotations) => {
|
|
27959
28040
|
this.onAddingAnotation.emit(exctractedAnotations);
|
|
27960
28041
|
});
|
|
27961
28042
|
// if tracking signature location is enable then emit signature outside with every changes in it
|
|
@@ -27984,7 +28065,6 @@ class PdftronComponent {
|
|
|
27984
28065
|
}
|
|
27985
28066
|
this.firstSignatureLoad = false;
|
|
27986
28067
|
});
|
|
27987
|
-
;
|
|
27988
28068
|
}
|
|
27989
28069
|
exportingSignature() {
|
|
27990
28070
|
const documentViewer = this.webViewerInstance.docViewer;
|
|
@@ -27996,11 +28076,10 @@ class PdftronComponent {
|
|
|
27996
28076
|
console.log(annotation);
|
|
27997
28077
|
}
|
|
27998
28078
|
});
|
|
27999
|
-
;
|
|
28000
28079
|
}
|
|
28001
28080
|
extractAnotation(annotation, documentViewer) {
|
|
28002
28081
|
if (annotation['image']) {
|
|
28003
|
-
// convert base64 signature into file and emit it to out side
|
|
28082
|
+
// convert base64 signature into file and emit it to out side
|
|
28004
28083
|
let base64Img = annotation['image']['currentSrc'];
|
|
28005
28084
|
var arr = base64Img.split(','), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
|
|
28006
28085
|
while (n--) {
|
|
@@ -28047,7 +28126,10 @@ class PdftronComponent {
|
|
|
28047
28126
|
});
|
|
28048
28127
|
}
|
|
28049
28128
|
addDownloadButton() {
|
|
28050
|
-
if (this.allowDownloadSecretFile ||
|
|
28129
|
+
if (this.allowDownloadSecretFile ||
|
|
28130
|
+
(!this.allowDownloadSecretFile &&
|
|
28131
|
+
this.correspondance.properties[this.secrecyProperty] &&
|
|
28132
|
+
this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
|
|
28051
28133
|
this.webViewerInstance.setHeaderItems((header) => {
|
|
28052
28134
|
header.push({
|
|
28053
28135
|
type: 'actionButton',
|
|
@@ -28080,29 +28162,30 @@ class PdftronComponent {
|
|
|
28080
28162
|
// this.events.next('download');
|
|
28081
28163
|
// });
|
|
28082
28164
|
// }
|
|
28083
|
-
})
|
|
28165
|
+
})
|
|
28084
28166
|
});
|
|
28085
28167
|
});
|
|
28086
28168
|
}
|
|
28087
28169
|
}
|
|
28088
28170
|
addPrintButton() {
|
|
28089
|
-
if (this.allowPrintSecretFile ||
|
|
28171
|
+
if (this.allowPrintSecretFile ||
|
|
28172
|
+
(!this.allowPrintSecretFile &&
|
|
28173
|
+
this.correspondance.properties[this.secrecyProperty] &&
|
|
28174
|
+
this.correspondance.properties[this.secrecyProperty] === 'Normal')) {
|
|
28090
28175
|
this.webViewerInstance.setHeaderItems((header) => {
|
|
28091
28176
|
header.push({
|
|
28092
28177
|
type: 'actionButton',
|
|
28093
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>',
|
|
28094
|
-
title: this.isArabic ?
|
|
28179
|
+
title: this.isArabic ? 'طباعة' : 'Print',
|
|
28095
28180
|
onClick: () => {
|
|
28096
28181
|
this.pdftronService.instance.print();
|
|
28097
28182
|
this.events.next('print');
|
|
28098
|
-
}
|
|
28183
|
+
}
|
|
28099
28184
|
});
|
|
28100
28185
|
});
|
|
28101
28186
|
}
|
|
28102
28187
|
else {
|
|
28103
|
-
this.webViewerInstance.disableElements([
|
|
28104
|
-
'printModal',
|
|
28105
|
-
]);
|
|
28188
|
+
this.webViewerInstance.disableElements(['printModal']);
|
|
28106
28189
|
}
|
|
28107
28190
|
}
|
|
28108
28191
|
addWatermark() {
|
|
@@ -28118,16 +28201,7 @@ class PdftronComponent {
|
|
|
28118
28201
|
return;
|
|
28119
28202
|
}
|
|
28120
28203
|
const { docViewer, annotManager, Annotations } = this.webViewerInstance;
|
|
28121
|
-
docViewer.on('documentLoaded', (
|
|
28122
|
-
let fitMode = this.webViewerInstance.FitMode.FitWidth;
|
|
28123
|
-
if (this.fitMode === 'FitPage') {
|
|
28124
|
-
fitMode = this.webViewerInstance.FitMode.FitPage;
|
|
28125
|
-
}
|
|
28126
|
-
else if (this.fitMode === 'Zoom') {
|
|
28127
|
-
fitMode = this.webViewerInstance.FitMode.Zoom;
|
|
28128
|
-
}
|
|
28129
|
-
this.webViewerInstance.setFitMode(fitMode);
|
|
28130
|
-
});
|
|
28204
|
+
docViewer.on('documentLoaded', __classPrivateFieldGet(this, _PdftronComponent_docLoaded, "f"));
|
|
28131
28205
|
if (!this.editMode) {
|
|
28132
28206
|
this.webViewerInstance.annotManager.setReadOnly(true);
|
|
28133
28207
|
// instance.enableTools([]);
|
|
@@ -28136,24 +28210,25 @@ class PdftronComponent {
|
|
|
28136
28210
|
this.webViewerInstance.loadDocument(this.fileURL, {
|
|
28137
28211
|
xodstreaming: true,
|
|
28138
28212
|
customHeaders: {
|
|
28139
|
-
Authorization: this.authHeader
|
|
28140
|
-
}
|
|
28213
|
+
Authorization: this.authHeader
|
|
28214
|
+
}
|
|
28141
28215
|
// withCredentials: true,
|
|
28142
28216
|
});
|
|
28143
28217
|
}
|
|
28144
28218
|
else {
|
|
28145
28219
|
this.webViewerInstance.loadDocument(new Blob([new Uint8Array(this.fileData)], { type: this.DOCUMENT_TYPE }), {
|
|
28146
|
-
filename: this.fileTitle
|
|
28220
|
+
filename: this.fileTitle
|
|
28147
28221
|
});
|
|
28148
28222
|
}
|
|
28149
28223
|
this.isFetching = false;
|
|
28150
28224
|
// if not negelcting adding water mark then check conditions for adding it
|
|
28151
28225
|
if (!this.negelectAddingWaterMark) {
|
|
28152
28226
|
if (this.correspondance !== undefined) {
|
|
28153
|
-
// 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
|
|
28154
28228
|
if (this.environment.enableViewerWaterMark && this.secrecyProperty) {
|
|
28155
28229
|
// check for secrecy level befor adding watermark
|
|
28156
|
-
if (this.correspondance.properties[this.secrecyProperty] &&
|
|
28230
|
+
if (this.correspondance.properties[this.secrecyProperty] &&
|
|
28231
|
+
this.correspondance.properties[this.secrecyProperty] !== 'Normal') {
|
|
28157
28232
|
this.addWatermark();
|
|
28158
28233
|
}
|
|
28159
28234
|
}
|
|
@@ -28170,7 +28245,7 @@ class PdftronComponent {
|
|
|
28170
28245
|
const xfdfString = yield this.webViewerInstance.annotManager.exportAnnotations();
|
|
28171
28246
|
const data = yield doc.getFileData({
|
|
28172
28247
|
// saves the document with annotations in it
|
|
28173
|
-
xfdfString
|
|
28248
|
+
xfdfString
|
|
28174
28249
|
});
|
|
28175
28250
|
const arr = new Uint8Array(data);
|
|
28176
28251
|
const blob = new Blob([arr], { type: this.DOCUMENT_TYPE });
|
|
@@ -28184,7 +28259,7 @@ class PdftronComponent {
|
|
|
28184
28259
|
'toolbarGroup-Shapes',
|
|
28185
28260
|
'toolbarGroup-Edit',
|
|
28186
28261
|
'toolbarGroup-Insert',
|
|
28187
|
-
'toolbarGroup-Annotate'
|
|
28262
|
+
'toolbarGroup-Annotate'
|
|
28188
28263
|
]);
|
|
28189
28264
|
this.webViewerInstance.annotManager.setReadOnly(true);
|
|
28190
28265
|
}
|
|
@@ -28195,20 +28270,14 @@ class PdftronComponent {
|
|
|
28195
28270
|
'toolbarGroup-Shapes',
|
|
28196
28271
|
'toolbarGroup-Edit',
|
|
28197
28272
|
'toolbarGroup-Insert',
|
|
28198
|
-
'toolbarGroup-Annotate'
|
|
28273
|
+
'toolbarGroup-Annotate'
|
|
28199
28274
|
]);
|
|
28200
28275
|
let group;
|
|
28201
28276
|
if (this.editingType === 'signDoc') {
|
|
28202
|
-
this.webViewerInstance.enableElements([
|
|
28203
|
-
'toolbarGroup-Insert'
|
|
28204
|
-
]);
|
|
28277
|
+
this.webViewerInstance.enableElements(['toolbarGroup-Insert']);
|
|
28205
28278
|
}
|
|
28206
28279
|
else if (this.editingType === 'annotate') {
|
|
28207
|
-
this.webViewerInstance.enableElements([
|
|
28208
|
-
'toolbarGroup-Shapes',
|
|
28209
|
-
'toolbarGroup-Edit',
|
|
28210
|
-
'toolbarGroup-Annotate',
|
|
28211
|
-
]);
|
|
28280
|
+
this.webViewerInstance.enableElements(['toolbarGroup-Shapes', 'toolbarGroup-Edit', 'toolbarGroup-Annotate']);
|
|
28212
28281
|
}
|
|
28213
28282
|
}
|
|
28214
28283
|
else {
|
|
@@ -28216,7 +28285,7 @@ class PdftronComponent {
|
|
|
28216
28285
|
'toolbarGroup-Shapes',
|
|
28217
28286
|
'toolbarGroup-Edit',
|
|
28218
28287
|
'toolbarGroup-Insert',
|
|
28219
|
-
'toolbarGroup-Annotate'
|
|
28288
|
+
'toolbarGroup-Annotate'
|
|
28220
28289
|
]);
|
|
28221
28290
|
}
|
|
28222
28291
|
this.webViewerInstance.annotManager.setReadOnly(false);
|
|
@@ -28228,11 +28297,9 @@ class PdftronComponent {
|
|
|
28228
28297
|
this.toggleEdit();
|
|
28229
28298
|
if (changes.urlFileContent &&
|
|
28230
28299
|
changes.urlFileContent.previousValue &&
|
|
28231
|
-
changes.urlFileContent.previousValue !==
|
|
28232
|
-
changes.urlFileContent.currentValue) {
|
|
28300
|
+
changes.urlFileContent.previousValue !== changes.urlFileContent.currentValue) {
|
|
28233
28301
|
this.ngOnDestroy();
|
|
28234
28302
|
this.ngOnInit();
|
|
28235
|
-
this.ngAfterViewInit();
|
|
28236
28303
|
}
|
|
28237
28304
|
}
|
|
28238
28305
|
}
|
|
@@ -28248,7 +28315,7 @@ class PdftronComponent {
|
|
|
28248
28315
|
const searchListener = (searchPattern, options, results) => {
|
|
28249
28316
|
this.mySearchStringResults = [];
|
|
28250
28317
|
if (this.savedAnotations.length > 0) {
|
|
28251
|
-
this.savedAnotations.map(annotation => {
|
|
28318
|
+
this.savedAnotations.map((annotation) => {
|
|
28252
28319
|
annotation.Hidden = true;
|
|
28253
28320
|
// Always redraw annotation if rendering was updated
|
|
28254
28321
|
annotManager.redrawAnnotation(annotation);
|
|
@@ -28257,9 +28324,9 @@ class PdftronComponent {
|
|
|
28257
28324
|
// don't do any search until there is a search pattern
|
|
28258
28325
|
if (searchPattern.trim().length > 0) {
|
|
28259
28326
|
// add redaction annotation for each search result
|
|
28260
|
-
this.newAnnotations = results.map(result => {
|
|
28327
|
+
this.newAnnotations = results.map((result) => {
|
|
28261
28328
|
const annotation = new Annotations.TextHighlightAnnotation();
|
|
28262
|
-
annotation.Quads = result.quads.map(quad => quad.getPoints());
|
|
28329
|
+
annotation.Quads = result.quads.map((quad) => quad.getPoints());
|
|
28263
28330
|
annotation.PageNumber = result.pageNum;
|
|
28264
28331
|
annotation.StrokeColor = new Annotations.Color(250, 206, 0, 0.50196);
|
|
28265
28332
|
annotation.Author = this.webViewerInstance.annotManager.getCurrentUser();
|
|
@@ -28277,31 +28344,33 @@ class PdftronComponent {
|
|
|
28277
28344
|
this.webViewerInstance.addSearchListener(searchListener);
|
|
28278
28345
|
});
|
|
28279
28346
|
}
|
|
28280
|
-
// perform automatic search when intering the page
|
|
28347
|
+
// perform automatic search when intering the page
|
|
28281
28348
|
automaticSearch(searchTextArray) {
|
|
28282
28349
|
const { annotManager, docViewer, Annotations } = this.webViewerInstance;
|
|
28283
28350
|
let searchOptions;
|
|
28284
28351
|
this.webViewerInstance.openElements(['searchPanel']);
|
|
28285
28352
|
docViewer.on('documentLoaded', () => {
|
|
28286
|
-
const mode = this.webViewerInstance.CoreControls.Search.Mode.PAGE_STOP |
|
|
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;
|
|
28287
28356
|
this.mySearchStringResults = []; // empty my search result when starting new search
|
|
28288
28357
|
if (this.fileWithOcr) {
|
|
28289
28358
|
// add redaction annotation for each search result
|
|
28290
28359
|
const annotation = new Annotations.TextHighlightAnnotation();
|
|
28291
|
-
searchTextArray.map(searchText => {
|
|
28360
|
+
searchTextArray.map((searchText) => {
|
|
28292
28361
|
let mySearch = searchText.split(' ');
|
|
28293
28362
|
if (mySearch.length > 1) {
|
|
28294
28363
|
// then i am searching with more than one word
|
|
28295
28364
|
this.pages.pages.forEach((page, index) => {
|
|
28296
28365
|
this.pageHeight = page.page_height;
|
|
28297
28366
|
this.pageWidth = page.page_width;
|
|
28298
|
-
this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(
|
|
28299
|
-
this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(
|
|
28300
|
-
page.zones.forEach(zone => {
|
|
28301
|
-
zone.paragraphs.forEach(paragraph => {
|
|
28302
|
-
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) => {
|
|
28303
28372
|
if (line.text.includes(searchText)) {
|
|
28304
|
-
this.SearchForWordInLine(mySearch, line,
|
|
28373
|
+
this.SearchForWordInLine(mySearch, line, index + 1, page);
|
|
28305
28374
|
}
|
|
28306
28375
|
});
|
|
28307
28376
|
});
|
|
@@ -28309,7 +28378,7 @@ class PdftronComponent {
|
|
|
28309
28378
|
});
|
|
28310
28379
|
}
|
|
28311
28380
|
else {
|
|
28312
|
-
// then i am searching with only one word
|
|
28381
|
+
// then i am searching with only one word
|
|
28313
28382
|
this.searchForWordInAllPages(searchText);
|
|
28314
28383
|
}
|
|
28315
28384
|
});
|
|
@@ -28321,11 +28390,11 @@ class PdftronComponent {
|
|
|
28321
28390
|
// If true, a search of the entire document will be performed. Otherwise, a single search will be performed.
|
|
28322
28391
|
fullSearch: true,
|
|
28323
28392
|
// The callback function that is called when the search returns a result.
|
|
28324
|
-
onResult: result => {
|
|
28393
|
+
onResult: (result) => {
|
|
28325
28394
|
// with 'PAGE_STOP' mode, the callback is invoked after each page has been searched.
|
|
28326
28395
|
if (result.resultCode === this.webViewerInstance.CoreControls.Search.ResultCode.FOUND) {
|
|
28327
28396
|
const annotation = new Annotations.TextHighlightAnnotation();
|
|
28328
|
-
annotation.Quads = result.quads.map(quad => quad.getPoints());
|
|
28397
|
+
annotation.Quads = result.quads.map((quad) => quad.getPoints());
|
|
28329
28398
|
console.log(annotation.Quads);
|
|
28330
28399
|
annotation.PageNumber = result.pageNum;
|
|
28331
28400
|
annotation.StrokeColor = new Annotations.Color(250, 206, 0, 0.50196);
|
|
@@ -28337,37 +28406,39 @@ class PdftronComponent {
|
|
|
28337
28406
|
}
|
|
28338
28407
|
}
|
|
28339
28408
|
};
|
|
28340
|
-
searchTextArray.map(searchedText => {
|
|
28409
|
+
searchTextArray.map((searchedText) => {
|
|
28341
28410
|
docViewer.textSearchInit(searchedText, mode, searchOptions);
|
|
28342
28411
|
});
|
|
28343
28412
|
}
|
|
28344
28413
|
});
|
|
28345
28414
|
}
|
|
28346
|
-
// search for single word in all pages
|
|
28415
|
+
// search for single word in all pages
|
|
28347
28416
|
searchForWordInAllPages(searchedWord) {
|
|
28348
28417
|
this.pages.pages.forEach((page, index) => {
|
|
28349
28418
|
this.pageHeight = page.page_height;
|
|
28350
28419
|
this.pageWidth = page.page_width;
|
|
28351
|
-
this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(
|
|
28352
|
-
this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(
|
|
28353
|
-
const x =
|
|
28354
|
-
const y =
|
|
28355
|
-
page.zones.forEach(zone => {
|
|
28356
|
-
zone.paragraphs.forEach(paragraph => {
|
|
28357
|
-
paragraph.lines.forEach(line => {
|
|
28358
|
-
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) => {
|
|
28359
28428
|
if (word.text.includes(searchedWord)) {
|
|
28360
28429
|
// annotation.PageNumber = index+1;
|
|
28361
|
-
let quads = [
|
|
28362
|
-
|
|
28363
|
-
|
|
28364
|
-
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28368
|
-
|
|
28369
|
-
|
|
28370
|
-
|
|
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
|
+
];
|
|
28371
28442
|
this.higlightText(quads, index + 1);
|
|
28372
28443
|
this.constructSearchResult(searchedWord, index + 1, quads, line.text);
|
|
28373
28444
|
}
|
|
@@ -28377,14 +28448,14 @@ class PdftronComponent {
|
|
|
28377
28448
|
});
|
|
28378
28449
|
});
|
|
28379
28450
|
}
|
|
28380
|
-
// search for word in single line
|
|
28451
|
+
// search for word in single line
|
|
28381
28452
|
SearchForWordInLine(listOfSearchedWords, line, pagenumber, page) {
|
|
28382
28453
|
this.pageHeight = page.page_height;
|
|
28383
28454
|
this.pageWidth = page.page_width;
|
|
28384
|
-
this.standardHeight = this.webViewerInstance.docViewer.getPageHeight(
|
|
28385
|
-
this.standardWidth = this.webViewerInstance.docViewer.getPageWidth(
|
|
28386
|
-
const x =
|
|
28387
|
-
const y =
|
|
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
|
|
28388
28459
|
// find only words related to my search form the line
|
|
28389
28460
|
let myFoundedResults = [];
|
|
28390
28461
|
let correctResults = [];
|
|
@@ -28395,27 +28466,29 @@ class PdftronComponent {
|
|
|
28395
28466
|
});
|
|
28396
28467
|
// find only words exist in my search sentence and not single and repeated word
|
|
28397
28468
|
myFoundedResults.map((result, index) => {
|
|
28398
|
-
if (
|
|
28399
|
-
(myFoundedResults[index
|
|
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'])) {
|
|
28400
28473
|
correctResults.push(result);
|
|
28401
28474
|
}
|
|
28402
28475
|
});
|
|
28403
28476
|
// highliht these words after eleminating all repeated and related words
|
|
28404
28477
|
// must be for loop sp i can control the step in each loop
|
|
28405
28478
|
let quads = [];
|
|
28406
|
-
for (let i = 0; i < correctResults.length;
|
|
28479
|
+
for (let i = 0; i < correctResults.length; i = i + listOfSearchedWords.length) {
|
|
28407
28480
|
quads.push({
|
|
28408
|
-
x1:
|
|
28409
|
-
x2:
|
|
28410
|
-
x3:
|
|
28411
|
-
x4:
|
|
28412
|
-
y1:
|
|
28413
|
-
y2:
|
|
28414
|
-
y3:
|
|
28415
|
-
y4:
|
|
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
|
|
28416
28489
|
});
|
|
28417
28490
|
this.higlightText(quads, pagenumber);
|
|
28418
|
-
this.constructSearchResult(listOfSearchedWords.join(
|
|
28491
|
+
this.constructSearchResult(listOfSearchedWords.join(' '), pagenumber, quads, line.text);
|
|
28419
28492
|
}
|
|
28420
28493
|
}
|
|
28421
28494
|
constructSearchResult(searchedText, pageNum, quads, line) {
|
|
@@ -28428,7 +28501,8 @@ class PdftronComponent {
|
|
|
28428
28501
|
resultStrEnd: mySeearchedTextEndIndex,
|
|
28429
28502
|
pageNum: pageNum,
|
|
28430
28503
|
resultCode: 2,
|
|
28431
|
-
quads: [
|
|
28504
|
+
quads: [
|
|
28505
|
+
{
|
|
28432
28506
|
ea: quads[0]['y3'],
|
|
28433
28507
|
fa: quads[0]['y4'],
|
|
28434
28508
|
ha: quads[0]['x1'],
|
|
@@ -28437,7 +28511,8 @@ class PdftronComponent {
|
|
|
28437
28511
|
qB: quads[0]['x4'],
|
|
28438
28512
|
rB: quads[0]['y1'],
|
|
28439
28513
|
sB: quads[0]['y2']
|
|
28440
|
-
}
|
|
28514
|
+
}
|
|
28515
|
+
]
|
|
28441
28516
|
};
|
|
28442
28517
|
this.mySearchStringResults.push(searchResultObject);
|
|
28443
28518
|
console.log(this.mySearchStringResults);
|
|
@@ -28461,34 +28536,97 @@ class PdftronComponent {
|
|
|
28461
28536
|
}
|
|
28462
28537
|
// ------------------------------------------------------------------------ ------------------------------------------
|
|
28463
28538
|
ngOnDestroy() {
|
|
28464
|
-
if (this.
|
|
28465
|
-
this
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
|
|
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;
|
|
28469
28550
|
}
|
|
28470
|
-
this.transelationSubscrition ? this.transelationSubscrition.unsubscribe() : null;
|
|
28471
28551
|
}
|
|
28472
28552
|
}
|
|
28473
|
-
|
|
28474
|
-
|
|
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: [""] });
|
|
28475
28613
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PdftronComponent, decorators: [{
|
|
28476
28614
|
type: Component,
|
|
28477
28615
|
args: [{
|
|
28478
28616
|
selector: 'app-pdftron',
|
|
28479
28617
|
templateUrl: './pdftron.component.html',
|
|
28480
28618
|
styleUrls: ['./pdftron.component.scss'],
|
|
28481
|
-
providers: [SecurePipe]
|
|
28619
|
+
providers: [SecurePipe]
|
|
28482
28620
|
}]
|
|
28483
28621
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: PdftronService }, { type: NuxeoService }, { type: undefined, decorators: [{
|
|
28484
28622
|
type: Inject,
|
|
28485
28623
|
args: [APP_BASE_HREF]
|
|
28486
|
-
}] }, { type:
|
|
28624
|
+
}] }, { type: TranslationService }, { type: SilentPdfTronService }, { type: undefined, decorators: [{
|
|
28487
28625
|
type: Inject,
|
|
28488
28626
|
args: ['environment']
|
|
28489
28627
|
}] }]; }, propDecorators: { viewerRef: [{
|
|
28490
28628
|
type: ViewChild,
|
|
28491
|
-
args: ['fileViewer']
|
|
28629
|
+
args: ['fileViewer', { static: true }]
|
|
28492
28630
|
}], editMode: [{
|
|
28493
28631
|
type: Input
|
|
28494
28632
|
}], actionClicked: [{
|
|
@@ -33575,5 +33713,5 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
33575
33713
|
* Generated bundle index. Do not edit.
|
|
33576
33714
|
*/
|
|
33577
33715
|
|
|
33578
|
-
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 };
|
|
33579
33717
|
//# sourceMappingURL=nuxeo-development-framework.js.map
|