nuxeo-development-framework 4.5.2 → 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.
@@ -6924,7 +6924,7 @@
6924
6924
  };
6925
6925
  VersionsComponent.prototype.getFileSize = function (version) {
6926
6926
  var file = version.properties['file:content'] || version.properties.content;
6927
- if (file.length) {
6927
+ if (file && file.length) {
6928
6928
  var length = +file.length;
6929
6929
  if (length < 1000000) {
6930
6930
  // trnasfer to KB
@@ -20691,27 +20691,28 @@
20691
20691
  _this.fileManagerService = fileManagerService;
20692
20692
  _this.customToastrService = customToastrService;
20693
20693
  _this.nuxeoDialogService = nuxeoDialogService;
20694
- _this.createOperation = 'Collection.Create';
20695
- _this.addOperation = 'Document.AddToCollection';
20696
- _this.getCollectionPP = 'PP_DMS_User_Collections';
20694
+ _this.createOperation = "Collection.Create";
20695
+ _this.addOperation = "Document.AddToCollection";
20696
+ _this.getCollectionPP = "PP_DMS_User_Collections";
20697
20697
  _this.visibleChange = new i0.EventEmitter();
20698
20698
  _this.rtlEnabled = false;
20699
20699
  _this.isSelected = true;
20700
20700
  _this.tagsInput$ = new rxjs.Subject();
20701
20701
  _this.tagsLoading = false;
20702
20702
  _this._visible = false;
20703
- _this.onFormCollectionSubmit = function (e) {
20704
- e.preventDefault();
20703
+ _this.onFormCollectionSubmit = function () {
20705
20704
  _this.loading = true;
20706
- return _this.fileManagerService.addToCollection(_this.selectedItems, _this.collectionid, _this.addOperation).pipe(operators.tap(function (res) {
20705
+ return _this.fileManagerService
20706
+ .addToCollection(_this.selectedItems, _this.collectionid, _this.addOperation)
20707
+ .pipe(operators.tap(function (res) {
20707
20708
  _this.loading = false;
20708
20709
  _this.form.instance.resetValues();
20709
20710
  _this.selectedTags = null;
20710
20711
  _this.visible = false;
20711
- _this.customToastrService.show('success', 'TOASTER.SUCCESS', 'TOASTER.DOCUMENT_ADDED_TO_COLLECTION');
20712
+ _this.customToastrService.show("success", "TOASTER.SUCCESS", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION");
20712
20713
  }, function (err) {
20713
20714
  _this.loading = false;
20714
- _this.customToastrService.show('error', 'TOASTER.ERROR', 'TOASTER.DOCUMENT_ADDED_TO_COLLECTION_ERROR');
20715
+ _this.customToastrService.show("error", "TOASTER.ERROR", "TOASTER.DOCUMENT_ADDED_TO_COLLECTION_ERROR");
20715
20716
  }));
20716
20717
  };
20717
20718
  return _this;
@@ -20740,12 +20741,12 @@
20740
20741
  var options = {
20741
20742
  component: NdfNuxeoDialog,
20742
20743
  //TODO [Asem] how to put the wrapper ID
20743
- panelClass: 'popUpParent',
20744
+ panelClass: "popUpParent",
20744
20745
  config: {
20745
- title: this.translateService.instant('FILE_MANAGER.ADD_TO_COLLECTION'),
20746
+ title: this.translateService.instant("FILE_MANAGER.ADD_TO_COLLECTION"),
20746
20747
  contentTemplate: this.contentTemplate,
20747
- actionsTemplate: this.actionsTemplate
20748
- }
20748
+ actionsTemplate: this.actionsTemplate,
20749
+ },
20749
20750
  };
20750
20751
  this.nuxeoDialogService
20751
20752
  .open(options)
@@ -20757,7 +20758,9 @@
20757
20758
  AddToCollectionComponent.prototype.emitSelection = function (event) {
20758
20759
  var _this = this;
20759
20760
  if (this.isSelected) {
20760
- this.fileManagerService.createNewCollection(event.displayLabel, this.createOperation).subscribe(function (res) {
20761
+ this.fileManagerService
20762
+ .createNewCollection(event.displayLabel, this.createOperation)
20763
+ .subscribe(function (res) {
20761
20764
  _this.collectionid = res.uid;
20762
20765
  });
20763
20766
  }
@@ -20766,24 +20769,29 @@
20766
20769
  };
20767
20770
  AddToCollectionComponent.prototype.loadItems = function () {
20768
20771
  var _this = this;
20769
- var searchterm = '';
20772
+ var searchterm = "";
20770
20773
  this.isSelected = false;
20771
20774
  var mycategories = [];
20772
- this.items$ = rxjs.concat(this.fileManagerService.getCollectionFromPP(searchterm, this.getCollectionPP).pipe(operators.switchMap(function (res) {
20775
+ this.items$ = rxjs.concat(this.fileManagerService
20776
+ .getCollectionFromPP(searchterm, this.getCollectionPP)
20777
+ .pipe(operators.switchMap(function (res) {
20773
20778
  res.entries.map(function (entry) {
20774
- if (!_this.enableMemberInCollections || !_this.memberInCollections.includes(entry.id)) {
20779
+ if (!_this.enableMemberInCollections ||
20780
+ !_this.memberInCollections.includes(entry.id)) {
20775
20781
  mycategories.push({
20776
20782
  displayLabel: entry.title,
20777
20783
  id: entry.uid,
20778
20784
  path: entry.path,
20779
- icon: entry.properties['common:icon']
20785
+ icon: entry.properties["common:icon"],
20780
20786
  });
20781
20787
  }
20782
20788
  });
20783
20789
  return rxjs.of(mycategories);
20784
20790
  })), // default items
20785
20791
  this.tagsInput$.pipe(operators.debounceTime(200), operators.distinctUntilChanged(), operators.tap(function () { return (_this.tagsLoading = true); }), operators.switchMap(function (searchterm) {
20786
- return _this.fileManagerService.getCollectionFromPP(searchterm, _this.getCollectionPP).pipe(operators.catchError(function () { return rxjs.of([]); }), // empty list on error
20792
+ return _this.fileManagerService
20793
+ .getCollectionFromPP(searchterm, _this.getCollectionPP)
20794
+ .pipe(operators.catchError(function () { return rxjs.of([]); }), // empty list on error
20787
20795
  operators.switchMap(function (searchCat) {
20788
20796
  var myInerCateg = [];
20789
20797
  _this.tagsLoading = false;
@@ -20793,7 +20801,7 @@
20793
20801
  displayLabel: entry.title,
20794
20802
  id: entry.uid,
20795
20803
  path: entry.path,
20796
- icon: entry.properties['common:icon']
20804
+ icon: entry.properties["common:icon"],
20797
20805
  });
20798
20806
  });
20799
20807
  return rxjs.of(myInerCateg);
@@ -20803,23 +20811,23 @@
20803
20811
  return AddToCollectionComponent;
20804
20812
  }(BaseComponent));
20805
20813
  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 });
20806
- 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", memberInCollections: "memberInCollections", enableMemberInCollections: "enableMemberInCollections", 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 class=\"collection-form-wrapper\" #createForm [formData]=\"formData\" [disabled]=\"loading\">\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 class=\"submission-button px-5\" (click)=\"dialog.executeAction(onFormCollectionSubmit, [$event])\">\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 } });
20814
+ 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", memberInCollections: "memberInCollections", enableMemberInCollections: "enableMemberInCollections", 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 <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__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 } });
20807
20815
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AddToCollectionComponent, decorators: [{
20808
20816
  type: i0.Component,
20809
20817
  args: [{
20810
- selector: 'app-add-to-collection',
20811
- templateUrl: './add-to-collection.component.html',
20812
- styleUrls: ['./add-to-collection.component.scss']
20818
+ selector: "app-add-to-collection",
20819
+ templateUrl: "./add-to-collection.component.html",
20820
+ styleUrls: ["./add-to-collection.component.scss"],
20813
20821
  }]
20814
20822
  }], ctorParameters: function () { return [{ type: FileManagerService }, { type: CustomToastrService }, { type: NuxeoDialogService }, { type: i0__namespace.Injector }]; }, propDecorators: { form: [{
20815
20823
  type: i0.ViewChild,
20816
20824
  args: [i4$4.DxFormComponent, { static: false }]
20817
20825
  }], contentTemplate: [{
20818
20826
  type: i0.ViewChild,
20819
- args: ['contentTemplate']
20827
+ args: ["contentTemplate"]
20820
20828
  }], actionsTemplate: [{
20821
20829
  type: i0.ViewChild,
20822
- args: ['actionsTemplate']
20830
+ args: ["actionsTemplate"]
20823
20831
  }], createOperation: [{
20824
20832
  type: i0.Input
20825
20833
  }], addOperation: [{
@@ -29868,19 +29876,21 @@
29868
29876
  var _this = this;
29869
29877
  return __generator(this, function (_a) {
29870
29878
  this.recivedSearchStringsArray = this.searchString.trim() ? this.searchString.split(',') : [];
29871
- if (this.fileTitle.endsWith('.ppt')) {
29872
- this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
29873
- }
29874
- else if (this.fileTitle.endsWith('.pptx')) {
29875
- this.DOCUMENT_TYPE =
29876
- 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
29877
- }
29878
- else if (this.fileTitle.endsWith('.doc')) {
29879
- this.DOCUMENT_TYPE = 'application/msword';
29880
- }
29881
- else if (this.fileTitle.endsWith('.docx')) {
29882
- this.DOCUMENT_TYPE =
29883
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
29879
+ if (this.fileTitle) {
29880
+ if (this.fileTitle.endsWith('.ppt')) {
29881
+ this.DOCUMENT_TYPE = 'application/vnd.ms-powerpoint';
29882
+ }
29883
+ else if (this.fileTitle.endsWith('.pptx')) {
29884
+ this.DOCUMENT_TYPE =
29885
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
29886
+ }
29887
+ else if (this.fileTitle.endsWith('.doc')) {
29888
+ this.DOCUMENT_TYPE = 'application/msword';
29889
+ }
29890
+ else if (this.fileTitle.endsWith('.docx')) {
29891
+ this.DOCUMENT_TYPE =
29892
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
29893
+ }
29884
29894
  }
29885
29895
  WebViewer__default["default"]({
29886
29896
  path: this.baseHref + '/assets/pdftrons',