nuxeo-development-framework 4.5.3 → 4.5.4
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 +77 -69
- 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 +42 -42
- package/fesm2015/nuxeo-development-framework.js +74 -66
- 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/package.json +1 -1
|
@@ -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: [{
|
|
@@ -27895,48 +27903,48 @@ class PdftronComponent {
|
|
|
27895
27903
|
this.DOCUMENT_TYPE =
|
|
27896
27904
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
27897
27905
|
}
|
|
27898
|
-
WebViewer({
|
|
27899
|
-
path: this.baseHref + '/assets/pdftrons',
|
|
27900
|
-
forceClientSideInit: true,
|
|
27901
|
-
streaming: true,
|
|
27902
|
-
licenseKey: this.environment.pdftronLicenceKey,
|
|
27903
|
-
css: this.isArabic ? (this.baseHref + '/assets/styles/ar-mypdftron.css') : (this.baseHref + '/assets/styles/en-mypdftron.css'),
|
|
27904
|
-
annotationUser: this.nuxeo.nuxeoClient.user.properties.firstName + ' ' + this.nuxeo.nuxeoClient.user.properties.lastName,
|
|
27905
|
-
disabledElements: ['downloadButton', 'printButton'],
|
|
27906
|
-
}, this.viewerRef.nativeElement).then((instance) => __awaiter(this, void 0, void 0, function* () {
|
|
27907
|
-
this.isArabic ? instance.setLanguage('ar') : instance.setLanguage('en');
|
|
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();
|
|
27938
|
-
}));
|
|
27939
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);
|
|
27923
|
+
}
|
|
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
|
+
}));
|
|
27940
27948
|
});
|
|
27941
27949
|
}
|
|
27942
27950
|
importAnotationsFromOutside() {
|