nuxeo-development-framework 4.4.4 → 4.4.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.
@@ -20674,6 +20674,9 @@
20674
20674
  _this.fileManagerService = fileManagerService;
20675
20675
  _this.customToastrService = customToastrService;
20676
20676
  _this.nuxeoDialogService = nuxeoDialogService;
20677
+ _this.createOperation = "Collection.Create";
20678
+ _this.addOperation = "Document.AddToCollection";
20679
+ _this.getCollectionPP = "PP_DMS_User_Collections";
20677
20680
  _this.visibleChange = new i0.EventEmitter();
20678
20681
  _this.rtlEnabled = false;
20679
20682
  _this.isSelected = true;
@@ -20684,16 +20687,16 @@
20684
20687
  e.preventDefault();
20685
20688
  _this.loading = true;
20686
20689
  return _this.fileManagerService
20687
- .addToCollection(_this.selectedItems, _this.collectionid)
20690
+ .addToCollection(_this.selectedItems, _this.collectionid, _this.addOperation)
20688
20691
  .pipe(operators.tap(function (res) {
20689
20692
  _this.loading = false;
20690
20693
  _this.form.instance.resetValues();
20691
20694
  _this.selectedTags = null;
20692
20695
  _this.visible = false;
20693
- _this.customToastrService.show('success', 'TOASTER.SUCCESS', 'TOASTER.DOCUMENT_ADDED_TO_COLLECTION');
20696
+ _this.customToastrService.show("success", "TOASTER.SUCCESS", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION");
20694
20697
  }, function (err) {
20695
20698
  _this.loading = false;
20696
- _this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_ADDED_TO_COLLECTION_ERROR');
20699
+ _this.customToastrService.show("error", "TOASTER.ERROR", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION_ERROR");
20697
20700
  }));
20698
20701
  };
20699
20702
  return _this;
@@ -20721,12 +20724,12 @@
20721
20724
  var options = {
20722
20725
  component: NdfNuxeoDialog,
20723
20726
  //TODO [Asem] how to put the wrapper ID
20724
- panelClass: 'popUpParent',
20727
+ panelClass: "popUpParent",
20725
20728
  config: {
20726
- title: this.translateService.instant('FILE_MANAGER.ADD_TO_COLLECTION'),
20729
+ title: this.translateService.instant("FILE_MANAGER.ADD_TO_COLLECTION"),
20727
20730
  contentTemplate: this.contentTemplate,
20728
- actionsTemplate: this.actionsTemplate
20729
- }
20731
+ actionsTemplate: this.actionsTemplate,
20732
+ },
20730
20733
  };
20731
20734
  this.nuxeoDialogService
20732
20735
  .open(options)
@@ -20739,7 +20742,7 @@
20739
20742
  var _this = this;
20740
20743
  if (this.isSelected) {
20741
20744
  this.fileManagerService
20742
- .createNewCollection(event.displayLabel)
20745
+ .createNewCollection(event.displayLabel, this.createOperation)
20743
20746
  .subscribe(function (res) {
20744
20747
  _this.collectionid = res.uid;
20745
20748
  });
@@ -20749,22 +20752,26 @@
20749
20752
  };
20750
20753
  AddToCollectionComponent.prototype.loadItems = function () {
20751
20754
  var _this = this;
20752
- var searchterm = '';
20755
+ var searchterm = "";
20753
20756
  this.isSelected = false;
20754
20757
  var mycategories = [];
20755
- this.items$ = rxjs.concat(this.fileManagerService.getCollectionFromPP(searchterm).pipe(operators.switchMap(function (res) {
20758
+ this.items$ = rxjs.concat(this.fileManagerService
20759
+ .getCollectionFromPP(searchterm, this.getCollectionPP)
20760
+ .pipe(operators.switchMap(function (res) {
20756
20761
  res.entries.map(function (entry) {
20757
20762
  mycategories.push({
20758
20763
  displayLabel: entry.title,
20759
20764
  id: entry.uid,
20760
20765
  path: entry.path,
20761
- icon: entry.properties['common:icon']
20766
+ icon: entry.properties["common:icon"],
20762
20767
  });
20763
20768
  });
20764
20769
  return rxjs.of(mycategories);
20765
20770
  })), // default items
20766
20771
  this.tagsInput$.pipe(operators.debounceTime(200), operators.distinctUntilChanged(), operators.tap(function () { return (_this.tagsLoading = true); }), operators.switchMap(function (searchterm) {
20767
- return _this.fileManagerService.getCollectionFromPP(searchterm).pipe(operators.catchError(function () { return rxjs.of([]); }), // empty list on error
20772
+ return _this.fileManagerService
20773
+ .getCollectionFromPP(searchterm, _this.getCollectionPP)
20774
+ .pipe(operators.catchError(function () { return rxjs.of([]); }), // empty list on error
20768
20775
  operators.switchMap(function (searchCat) {
20769
20776
  var myInerCateg = [];
20770
20777
  _this.tagsLoading = false;
@@ -20774,7 +20781,7 @@
20774
20781
  displayLabel: entry.title,
20775
20782
  id: entry.uid,
20776
20783
  path: entry.path,
20777
- icon: entry.properties['common:icon']
20784
+ icon: entry.properties["common:icon"],
20778
20785
  });
20779
20786
  });
20780
20787
  return rxjs.of(myInerCateg);
@@ -20784,23 +20791,29 @@
20784
20791
  return AddToCollectionComponent;
20785
20792
  }(BaseComponent));
20786
20793
  AddToCollectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AddToCollectionComponent, deps: [{ token: FileManagerService }, { token: CustomToastrService }, { token: NuxeoDialogService }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
20787
- AddToCollectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AddToCollectionComponent, selector: "app-add-to-collection", inputs: { visible: "visible", rtlEnabled: "rtlEnabled", selectedItems: "selectedItems" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: i4$4.DxFormComponent, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #contentTemplate>\r\n\t<form>\r\n\t\t<dx-form\r\n\t\t\tclass=\"collection-form-wrapper\"\r\n\t\t\t#createForm\r\n\t\t\t[formData]=\"formData\"\r\n\t\t\t[disabled]=\"loading\"\r\n\t\t>\r\n\t\t\t<dxi-item editorType=\"dxTextBox\">\r\n\t\t\t\t<ng-select\r\n\t\t\t\t\t[items]=\"items$ | async\"\r\n\t\t\t\t\tbindLabel=\"displayLabel\"\r\n\t\t\t\t\t[addTag]=\"true\"\r\n\t\t\t\t\taddTagText=\"Add collection\"\r\n\t\t\t\t\t[multiple]=\"false\"\r\n\t\t\t\t\t[hideSelected]=\"true\"\r\n\t\t\t\t\t[minTermLength]=\"0\"\r\n\t\t\t\t\t[loading]=\"tagsLoading\"\r\n\t\t\t\t\ttypeToSearchText=\"search\"\r\n\t\t\t\t\t[typeahead]=\"tagsInput$\"\r\n\t\t\t\t\t[(ngModel)]=\"selectedTags\"\r\n\t\t\t\t\trequired\r\n\t\t\t\t\tplaceholder=\"{{ 'VOCABULARY.SELECT_ITEM' | translate }}\"\r\n\t\t\t\t\tname=\"selectedItem\"\r\n\t\t\t\t\t(change)=\"emitSelection($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t</ng-select>\r\n\t\t\t</dxi-item>\r\n\t\t</dx-form>\r\n\t</form>\r\n</ng-template>\r\n\r\n<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t<span\r\n\t\tclass=\"dx-button-text\"\r\n\t\t(click)=\"dialog.executeAction(onFormCollectionSubmit, [$event])\"\r\n\t>\r\n\t\t{{ 'FILE_MANAGER.ADD' | translate }}\r\n\t</span>\r\n</ng-template>\r\n", styles: [""], components: [{ type: i4__namespace$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__namespace$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__namespace$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__namespace$6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace$6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
20794
+ AddToCollectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AddToCollectionComponent, selector: "app-add-to-collection", inputs: { createOperation: "createOperation", addOperation: "addOperation", getCollectionPP: "getCollectionPP", visible: "visible", rtlEnabled: "rtlEnabled", selectedItems: "selectedItems" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "form", first: true, predicate: i4$4.DxFormComponent, descendants: true }, { propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #contentTemplate>\r\n\t<form>\r\n\t\t<dx-form\r\n\t\t\tclass=\"collection-form-wrapper\"\r\n\t\t\t#createForm\r\n\t\t\t[formData]=\"formData\"\r\n\t\t\t[disabled]=\"loading\"\r\n\t\t>\r\n\t\t\t<dxi-item editorType=\"dxTextBox\">\r\n\t\t\t\t<ng-select\r\n\t\t\t\t\t[items]=\"items$ | async\"\r\n\t\t\t\t\tbindLabel=\"displayLabel\"\r\n\t\t\t\t\t[addTag]=\"true\"\r\n\t\t\t\t\taddTagText=\"Add collection\"\r\n\t\t\t\t\t[multiple]=\"false\"\r\n\t\t\t\t\t[hideSelected]=\"true\"\r\n\t\t\t\t\t[minTermLength]=\"0\"\r\n\t\t\t\t\t[loading]=\"tagsLoading\"\r\n\t\t\t\t\ttypeToSearchText=\"search\"\r\n\t\t\t\t\t[typeahead]=\"tagsInput$\"\r\n\t\t\t\t\t[(ngModel)]=\"selectedTags\"\r\n\t\t\t\t\trequired\r\n\t\t\t\t\tplaceholder=\"{{ 'VOCABULARY.SELECT_ITEM' | translate }}\"\r\n\t\t\t\t\tname=\"selectedItem\"\r\n\t\t\t\t\t(change)=\"emitSelection($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t</ng-select>\r\n\t\t\t</dxi-item>\r\n\t\t</dx-form>\r\n\t</form>\r\n</ng-template>\r\n\r\n<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t<span\r\n\t\tclass=\"dx-button-text\"\r\n\t\t(click)=\"dialog.executeAction(onFormCollectionSubmit, [$event])\"\r\n\t>\r\n\t\t{{ 'FILE_MANAGER.ADD' | translate }}\r\n\t</span>\r\n</ng-template>\r\n", styles: [""], components: [{ type: i4__namespace$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__namespace$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__namespace$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__namespace$6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2__namespace$6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2__namespace$6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
20788
20795
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AddToCollectionComponent, decorators: [{
20789
20796
  type: i0.Component,
20790
20797
  args: [{
20791
- selector: 'app-add-to-collection',
20792
- templateUrl: './add-to-collection.component.html',
20793
- styleUrls: ['./add-to-collection.component.scss']
20798
+ selector: "app-add-to-collection",
20799
+ templateUrl: "./add-to-collection.component.html",
20800
+ styleUrls: ["./add-to-collection.component.scss"],
20794
20801
  }]
20795
20802
  }], ctorParameters: function () { return [{ type: FileManagerService }, { type: CustomToastrService }, { type: NuxeoDialogService }, { type: i0__namespace.Injector }]; }, propDecorators: { form: [{
20796
20803
  type: i0.ViewChild,
20797
20804
  args: [i4$4.DxFormComponent, { static: false }]
20798
20805
  }], contentTemplate: [{
20799
20806
  type: i0.ViewChild,
20800
- args: ['contentTemplate']
20807
+ args: ["contentTemplate"]
20801
20808
  }], actionsTemplate: [{
20802
20809
  type: i0.ViewChild,
20803
- args: ['actionsTemplate']
20810
+ args: ["actionsTemplate"]
20811
+ }], createOperation: [{
20812
+ type: i0.Input
20813
+ }], addOperation: [{
20814
+ type: i0.Input
20815
+ }], getCollectionPP: [{
20816
+ type: i0.Input
20804
20817
  }], visible: [{
20805
20818
  type: i0.Input
20806
20819
  }], visibleChange: [{