@alfresco/adf-process-services 8.2.0-17234132289 → 8.2.0

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.
@@ -4341,21 +4341,11 @@ class FileViewerWidgetComponent extends BaseViewerWidgetComponent {
4341
4341
  super(formService);
4342
4342
  }
4343
4343
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileViewerWidgetComponent, deps: [{ token: i1.FormService }], target: i0.ɵɵFactoryTarget.Component }); }
4344
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FileViewerWidgetComponent, isStandalone: true, selector: "file-viewer-widget", host: { listeners: { "click": "event($event)", "blur": "event($event)", "change": "event($event)", "focus": "event($event)", "focusin": "event($event)", "focusout": "event($event)", "input": "event($event)", "invalid": "event($event)", "select": "event($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"adf-file-viewer-widget {{field.className}}\" [class.adf-invalid]=\"!field.isValid\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n <adf-alfresco-viewer [nodeId]=\"field.value\" [showViewer]=\"field.value\" [allowGoBack]=\"false\" />\n <error-widget [error]=\"field.validationSummary\" />\n</div>\n", styles: ["file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer{position:relative}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer .adf-viewer-container .adf-viewer-content>div{height:90vh}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "hideInfoButton", "closeButtonPosition", "sidebarRightTemplate", "sidebarLeftTemplate", "readOnly", "showToolbarDividers"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }], encapsulation: i0.ViewEncapsulation.None }); }
4344
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FileViewerWidgetComponent, isStandalone: true, selector: "file-viewer-widget", usesInheritance: true, ngImport: i0, template: "<div class=\"adf-file-viewer-widget {{field.className}}\" [class.adf-invalid]=\"!field.isValid\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n <adf-alfresco-viewer [nodeId]=\"field.value\" [showViewer]=\"field.value\" [allowGoBack]=\"false\" />\n <error-widget [error]=\"field.validationSummary\" />\n</div>\n", styles: ["file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer{position:relative}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer .adf-viewer-container .adf-viewer-content>div{height:90vh}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "hideInfoButton", "closeButtonPosition", "sidebarRightTemplate", "sidebarLeftTemplate", "readOnly", "showToolbarDividers"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }], encapsulation: i0.ViewEncapsulation.None }); }
4345
4345
  }
4346
4346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileViewerWidgetComponent, decorators: [{
4347
4347
  type: Component,
4348
- args: [{ selector: 'file-viewer-widget', imports: [CommonModule, TranslatePipe, AlfrescoViewerComponent, ErrorWidgetComponent], host: {
4349
- '(click)': 'event($event)',
4350
- '(blur)': 'event($event)',
4351
- '(change)': 'event($event)',
4352
- '(focus)': 'event($event)',
4353
- '(focusin)': 'event($event)',
4354
- '(focusout)': 'event($event)',
4355
- '(input)': 'event($event)',
4356
- '(invalid)': 'event($event)',
4357
- '(select)': 'event($event)'
4358
- }, encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-file-viewer-widget {{field.className}}\" [class.adf-invalid]=\"!field.isValid\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n <adf-alfresco-viewer [nodeId]=\"field.value\" [showViewer]=\"field.value\" [allowGoBack]=\"false\" />\n <error-widget [error]=\"field.validationSummary\" />\n</div>\n", styles: ["file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer{position:relative}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer .adf-viewer-container .adf-viewer-content>div{height:90vh}\n"] }]
4348
+ args: [{ selector: 'file-viewer-widget', imports: [CommonModule, TranslatePipe, AlfrescoViewerComponent, ErrorWidgetComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-file-viewer-widget {{field.className}}\" [class.adf-invalid]=\"!field.isValid\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n <adf-alfresco-viewer [nodeId]=\"field.value\" [showViewer]=\"field.value\" [allowGoBack]=\"false\" />\n <error-widget [error]=\"field.validationSummary\" />\n</div>\n", styles: ["file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget{height:100%;width:100%}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer{position:relative}file-viewer-widget .adf-file-viewer-widget adf-viewer.adf-viewer .adf-viewer-container .adf-viewer-content>div{height:90vh}\n"] }]
4359
4349
  }], ctorParameters: () => [{ type: i1.FormService }] });
4360
4350
 
4361
4351
  /*!
@@ -5786,7 +5776,7 @@ class AttachFileWidgetComponent extends UploadWidgetComponent {
5786
5776
  if (file.isExternal || (!file.sourceId && (this.isStartProcessPage || !file.contentAvailable))) {
5787
5777
  return;
5788
5778
  }
5789
- if (this.isTemporaryFile(file)) {
5779
+ if (this.isTemporaryFile(file) || file.sourceId) {
5790
5780
  this.formService.formContentClicked.next(file);
5791
5781
  }
5792
5782
  else {
@@ -5886,21 +5876,11 @@ class AttachFileWidgetComponent extends UploadWidgetComponent {
5886
5876
  return result[1];
5887
5877
  }
5888
5878
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AttachFileWidgetComponent, deps: [{ token: i1.FormService }, { token: i1.ThumbnailService }, { token: ProcessContentService }, { token: ActivitiContentService }, { token: i1$1.ContentService }, { token: i1$1.ContentNodeDialogService }, { token: i1.AppConfigService }, { token: i1.DownloadService }, { token: i5.Router }, { token: i5.ActivatedRoute }, { token: AttachFileWidgetDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
5889
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: AttachFileWidgetComponent, isStandalone: true, selector: "attach-widget", host: { listeners: { "click": "event($event)", "blur": "event($event)", "change": "event($event)", "focus": "event($event)", "focusin": "event($event)", "focusout": "event($event)", "input": "event($event)", "invalid": "event($event)", "select": "event($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"adf-attach-widget {{ field.className }}\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{ field.name | translate }}\n <span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span>\n </label>\n <div class=\"adf-attach-widget-container\">\n <div id=\"adf-attach-widget-simple-upload\" *ngIf=\"isSimpleUploadButton() && isUploadButtonVisible()\">\n <a mat-raised-button color=\"primary\">\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input #uploadFiles [multiple]=\"multipleOption\" type=\"file\" [id]=\"field.id\" (change)=\"onAttachFileChanged($event)\" />\n </a>\n </div>\n <div class=\"adf-attach-widget__menu-upload\" (focusout)=\"markAsTouched()\" *ngIf=\"isUploadButtonVisible() && isMultipleSourceUpload()\">\n <button mat-raised-button color=\"primary\" [matMenuTriggerFor]=\"menu\" [id]=\"field.id\">\n <mat-icon>attach_file</mat-icon>\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n </button>\n <mat-menu #menu=\"matMenu\" class=\"adf-attach-widget__menu-content\">\n <button mat-menu-item (click)=\"uploadFile.click()\" id=\"attach-local-file\" *ngIf=\"isAllFileSourceSelected()\">\n {{ 'FORM.FIELD.LOCALSTORAGE' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input\n #uploadFile\n class=\"adf-attach-widget__input-type\"\n [multiple]=\"multipleOption\"\n type=\"file\"\n [id]=\"field.id\"\n (change)=\"onAttachFileChanged($event)\"\n />\n </button>\n <button\n mat-menu-item\n *ngIf=\"isDefinedSourceFolder()\"\n id=\"attach-{{ field.params?.fileSource?.name }}\"\n (click)=\"openSelectDialogFromFileSource()\"\n >\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ field.params?.fileSource?.name }}\n </button>\n <div *ngIf=\"!isDefinedSourceFolder()\">\n <button mat-menu-item *ngFor=\"let repo of repositoryList\" id=\"attach-{{ repo?.name }}\" (click)=\"openSelectDialog(repo)\">\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ repo.name }}\n </button>\n </div>\n </mat-menu>\n </div>\n </div>\n</div>\n\n<div data-automation-id=\"adf-attach-widget-readonly-list\">\n <mat-list *ngIf=\"hasFile\">\n <mat-list-item class=\"adf-attach-files-row\" *ngFor=\"let file of field.value; index as i\">\n <mat-icon matListItemIcon>\n <img class=\"adf-attach-widget__icon\"\n [id]=\"'file-'+file.id+'-icon'\"\n [src]=\"file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)\"\n [alt]=\"mimeTypeIcon\"\n (click)=\"onAttachFileClicked(file)\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [attr.aria-label]=\"file.name\"\n [tabindex]=\"i\"/>\n </mat-icon>\n\n <div matListItemLine class=\"adf-attach-widget__label\">\n <span id=\"{{'file-'+file.id}}\"\n (click)=\"onAttachFileClicked(file)\"\n [title]=\"file.name\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [tabindex]=\"i\" class=\"adf-file\">\n {{file.name}}\n </span>\n <button id=\"{{'file-'+file.id+'-option-menu'}}\" mat-icon-button [matMenuTriggerFor]=\"fileActionMenu\"\n [attr.aria-label]=\"'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n <mat-menu #fileActionMenu=\"matMenu\" xPosition=\"before\">\n <button\n id=\"{{ 'file-' + file.id + '-show-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType || (!file.sourceId && (isStartProcessPage || !file.contentAvailable))\"\n mat-menu-item\n (click)=\"onAttachFileClicked(file)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'FORM.FIELD.VIEW_FILE' | translate }}</span>\n </button>\n <button\n id=\"{{ 'file-' + file.id + '-download-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType\"\n mat-menu-item\n (click)=\"downloadContent(file)\"\n >\n <mat-icon>file_download</mat-icon>\n <span>{{ 'FORM.FIELD.DOWNLOAD_FILE' | translate }}</span>\n </button>\n <button\n *ngIf=\"!field.readOnly\"\n mat-menu-item\n [id]=\"'file-' + file.id + '-remove'\"\n (click)=\"onRemoveAttachFile(file)\"\n (keyup.enter)=\"onRemoveAttachFile(file)\"\n >\n <mat-icon class=\"mat-24\">highlight_off</mat-icon>\n <span>{{ 'FORM.FIELD.REMOVE_FILE' | translate }}</span>\n </button>\n </mat-menu>\n </mat-list-item>\n </mat-list>\n</div>\n\n<error-widget [error]=\"field.validationSummary\" />\n<error-widget *ngIf=\"!field.isValid && isTouched() && !isSelected()\" required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\" />\n", styles: [".adf-attach-widget-container{margin-bottom:15px;display:flex;align-items:center}.adf-attach-widget-container input{cursor:pointer;height:100%;right:0;opacity:0;position:absolute;top:0;width:300px;z-index:4}.adf-attach-widget__input-type{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.adf-attach-widget{width:100%;word-break:break-all;padding:.4375em 0;border-top:.8438em solid transparent}.adf-attach-widget__icon{cursor:pointer}.adf-attach-widget__label{display:flex;align-items:center;cursor:pointer}.adf-attach-widget__label:hover{text-decoration:underline}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i11.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i11.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i11.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i11.MatListItemLine, selector: "[matListItemLine]" }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }, { kind: "component", type: AlfrescoIconComponent, selector: "adf-alfresco-icon" }], encapsulation: i0.ViewEncapsulation.None }); }
5879
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: AttachFileWidgetComponent, isStandalone: true, selector: "attach-widget", usesInheritance: true, ngImport: i0, template: "<div class=\"adf-attach-widget {{ field.className }}\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{ field.name | translate }}\n <span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span>\n </label>\n <div class=\"adf-attach-widget-container\">\n <div id=\"adf-attach-widget-simple-upload\" *ngIf=\"isSimpleUploadButton() && isUploadButtonVisible()\">\n <a mat-raised-button color=\"primary\">\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input #uploadFiles [multiple]=\"multipleOption\" type=\"file\" [id]=\"field.id\" (change)=\"onAttachFileChanged($event)\" />\n </a>\n </div>\n <div class=\"adf-attach-widget__menu-upload\" (focusout)=\"markAsTouched()\" *ngIf=\"isUploadButtonVisible() && isMultipleSourceUpload()\">\n <button mat-raised-button color=\"primary\" [matMenuTriggerFor]=\"menu\" [id]=\"field.id\">\n <mat-icon>attach_file</mat-icon>\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n </button>\n <mat-menu #menu=\"matMenu\" class=\"adf-attach-widget__menu-content\">\n <button mat-menu-item (click)=\"uploadFile.click()\" id=\"attach-local-file\" *ngIf=\"isAllFileSourceSelected()\">\n {{ 'FORM.FIELD.LOCALSTORAGE' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input\n #uploadFile\n class=\"adf-attach-widget__input-type\"\n [multiple]=\"multipleOption\"\n type=\"file\"\n [id]=\"field.id\"\n (change)=\"onAttachFileChanged($event)\"\n />\n </button>\n <button\n mat-menu-item\n *ngIf=\"isDefinedSourceFolder()\"\n id=\"attach-{{ field.params?.fileSource?.name }}\"\n (click)=\"openSelectDialogFromFileSource()\"\n >\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ field.params?.fileSource?.name }}\n </button>\n <div *ngIf=\"!isDefinedSourceFolder()\">\n <button mat-menu-item *ngFor=\"let repo of repositoryList\" id=\"attach-{{ repo?.name }}\" (click)=\"openSelectDialog(repo)\">\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ repo.name }}\n </button>\n </div>\n </mat-menu>\n </div>\n </div>\n</div>\n\n<div data-automation-id=\"adf-attach-widget-readonly-list\">\n <mat-list *ngIf=\"hasFile\">\n <mat-list-item class=\"adf-attach-files-row\" *ngFor=\"let file of field.value; index as i\">\n <mat-icon matListItemIcon>\n <img class=\"adf-attach-widget__icon\"\n [id]=\"'file-'+file.id+'-icon'\"\n [src]=\"file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)\"\n [alt]=\"mimeTypeIcon\"\n (click)=\"onAttachFileClicked(file)\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [attr.aria-label]=\"file.name\"\n [tabindex]=\"i\"/>\n </mat-icon>\n\n <div matListItemLine class=\"adf-attach-widget__label\">\n <span id=\"{{'file-'+file.id}}\"\n (click)=\"onAttachFileClicked(file)\"\n [title]=\"file.name\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [tabindex]=\"i\" class=\"adf-file\">\n {{file.name}}\n </span>\n <button id=\"{{'file-'+file.id+'-option-menu'}}\" mat-icon-button [matMenuTriggerFor]=\"fileActionMenu\"\n [attr.aria-label]=\"'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n <mat-menu #fileActionMenu=\"matMenu\" xPosition=\"before\">\n <button\n id=\"{{ 'file-' + file.id + '-show-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType || (!file.sourceId && (isStartProcessPage || !file.contentAvailable))\"\n mat-menu-item\n (click)=\"onAttachFileClicked(file)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'FORM.FIELD.VIEW_FILE' | translate }}</span>\n </button>\n <button\n id=\"{{ 'file-' + file.id + '-download-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType\"\n mat-menu-item\n (click)=\"downloadContent(file)\"\n >\n <mat-icon>file_download</mat-icon>\n <span>{{ 'FORM.FIELD.DOWNLOAD_FILE' | translate }}</span>\n </button>\n <button\n *ngIf=\"!field.readOnly\"\n mat-menu-item\n [id]=\"'file-' + file.id + '-remove'\"\n (click)=\"onRemoveAttachFile(file)\"\n (keyup.enter)=\"onRemoveAttachFile(file)\"\n >\n <mat-icon class=\"mat-24\">highlight_off</mat-icon>\n <span>{{ 'FORM.FIELD.REMOVE_FILE' | translate }}</span>\n </button>\n </mat-menu>\n </mat-list-item>\n </mat-list>\n</div>\n\n<error-widget [error]=\"field.validationSummary\" />\n<error-widget *ngIf=\"!field.isValid && isTouched() && !isSelected()\" required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\" />\n", styles: [".adf-attach-widget-container{margin-bottom:15px;display:flex;align-items:center}.adf-attach-widget-container input{cursor:pointer;height:100%;right:0;opacity:0;position:absolute;top:0;width:300px;z-index:4}.adf-attach-widget__input-type{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.adf-attach-widget{width:100%;word-break:break-all;padding:.4375em 0;border-top:.8438em solid transparent}.adf-attach-widget__icon{cursor:pointer}.adf-attach-widget__label{display:flex;align-items:center;cursor:pointer}.adf-attach-widget__label:hover{text-decoration:underline}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i5$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i11.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i11.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i11.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i11.MatListItemLine, selector: "[matListItemLine]" }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }, { kind: "component", type: AlfrescoIconComponent, selector: "adf-alfresco-icon" }], encapsulation: i0.ViewEncapsulation.None }); }
5890
5880
  }
5891
5881
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AttachFileWidgetComponent, decorators: [{
5892
5882
  type: Component,
5893
- args: [{ selector: 'attach-widget', imports: [CommonModule, TranslatePipe, MatIconModule, MatButtonModule, MatMenuModule, MatListModule, ErrorWidgetComponent, AlfrescoIconComponent], host: {
5894
- '(click)': 'event($event)',
5895
- '(blur)': 'event($event)',
5896
- '(change)': 'event($event)',
5897
- '(focus)': 'event($event)',
5898
- '(focusin)': 'event($event)',
5899
- '(focusout)': 'event($event)',
5900
- '(input)': 'event($event)',
5901
- '(invalid)': 'event($event)',
5902
- '(select)': 'event($event)'
5903
- }, encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-attach-widget {{ field.className }}\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{ field.name | translate }}\n <span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span>\n </label>\n <div class=\"adf-attach-widget-container\">\n <div id=\"adf-attach-widget-simple-upload\" *ngIf=\"isSimpleUploadButton() && isUploadButtonVisible()\">\n <a mat-raised-button color=\"primary\">\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input #uploadFiles [multiple]=\"multipleOption\" type=\"file\" [id]=\"field.id\" (change)=\"onAttachFileChanged($event)\" />\n </a>\n </div>\n <div class=\"adf-attach-widget__menu-upload\" (focusout)=\"markAsTouched()\" *ngIf=\"isUploadButtonVisible() && isMultipleSourceUpload()\">\n <button mat-raised-button color=\"primary\" [matMenuTriggerFor]=\"menu\" [id]=\"field.id\">\n <mat-icon>attach_file</mat-icon>\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n </button>\n <mat-menu #menu=\"matMenu\" class=\"adf-attach-widget__menu-content\">\n <button mat-menu-item (click)=\"uploadFile.click()\" id=\"attach-local-file\" *ngIf=\"isAllFileSourceSelected()\">\n {{ 'FORM.FIELD.LOCALSTORAGE' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input\n #uploadFile\n class=\"adf-attach-widget__input-type\"\n [multiple]=\"multipleOption\"\n type=\"file\"\n [id]=\"field.id\"\n (change)=\"onAttachFileChanged($event)\"\n />\n </button>\n <button\n mat-menu-item\n *ngIf=\"isDefinedSourceFolder()\"\n id=\"attach-{{ field.params?.fileSource?.name }}\"\n (click)=\"openSelectDialogFromFileSource()\"\n >\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ field.params?.fileSource?.name }}\n </button>\n <div *ngIf=\"!isDefinedSourceFolder()\">\n <button mat-menu-item *ngFor=\"let repo of repositoryList\" id=\"attach-{{ repo?.name }}\" (click)=\"openSelectDialog(repo)\">\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ repo.name }}\n </button>\n </div>\n </mat-menu>\n </div>\n </div>\n</div>\n\n<div data-automation-id=\"adf-attach-widget-readonly-list\">\n <mat-list *ngIf=\"hasFile\">\n <mat-list-item class=\"adf-attach-files-row\" *ngFor=\"let file of field.value; index as i\">\n <mat-icon matListItemIcon>\n <img class=\"adf-attach-widget__icon\"\n [id]=\"'file-'+file.id+'-icon'\"\n [src]=\"file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)\"\n [alt]=\"mimeTypeIcon\"\n (click)=\"onAttachFileClicked(file)\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [attr.aria-label]=\"file.name\"\n [tabindex]=\"i\"/>\n </mat-icon>\n\n <div matListItemLine class=\"adf-attach-widget__label\">\n <span id=\"{{'file-'+file.id}}\"\n (click)=\"onAttachFileClicked(file)\"\n [title]=\"file.name\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [tabindex]=\"i\" class=\"adf-file\">\n {{file.name}}\n </span>\n <button id=\"{{'file-'+file.id+'-option-menu'}}\" mat-icon-button [matMenuTriggerFor]=\"fileActionMenu\"\n [attr.aria-label]=\"'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n <mat-menu #fileActionMenu=\"matMenu\" xPosition=\"before\">\n <button\n id=\"{{ 'file-' + file.id + '-show-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType || (!file.sourceId && (isStartProcessPage || !file.contentAvailable))\"\n mat-menu-item\n (click)=\"onAttachFileClicked(file)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'FORM.FIELD.VIEW_FILE' | translate }}</span>\n </button>\n <button\n id=\"{{ 'file-' + file.id + '-download-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType\"\n mat-menu-item\n (click)=\"downloadContent(file)\"\n >\n <mat-icon>file_download</mat-icon>\n <span>{{ 'FORM.FIELD.DOWNLOAD_FILE' | translate }}</span>\n </button>\n <button\n *ngIf=\"!field.readOnly\"\n mat-menu-item\n [id]=\"'file-' + file.id + '-remove'\"\n (click)=\"onRemoveAttachFile(file)\"\n (keyup.enter)=\"onRemoveAttachFile(file)\"\n >\n <mat-icon class=\"mat-24\">highlight_off</mat-icon>\n <span>{{ 'FORM.FIELD.REMOVE_FILE' | translate }}</span>\n </button>\n </mat-menu>\n </mat-list-item>\n </mat-list>\n</div>\n\n<error-widget [error]=\"field.validationSummary\" />\n<error-widget *ngIf=\"!field.isValid && isTouched() && !isSelected()\" required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\" />\n", styles: [".adf-attach-widget-container{margin-bottom:15px;display:flex;align-items:center}.adf-attach-widget-container input{cursor:pointer;height:100%;right:0;opacity:0;position:absolute;top:0;width:300px;z-index:4}.adf-attach-widget__input-type{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.adf-attach-widget{width:100%;word-break:break-all;padding:.4375em 0;border-top:.8438em solid transparent}.adf-attach-widget__icon{cursor:pointer}.adf-attach-widget__label{display:flex;align-items:center;cursor:pointer}.adf-attach-widget__label:hover{text-decoration:underline}\n"] }]
5883
+ args: [{ selector: 'attach-widget', imports: [CommonModule, TranslatePipe, MatIconModule, MatButtonModule, MatMenuModule, MatListModule, ErrorWidgetComponent, AlfrescoIconComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-attach-widget {{ field.className }}\" [class.adf-readonly]=\"field.readOnly\">\n <label class=\"adf-label\" [attr.for]=\"field.id\"\n >{{ field.name | translate }}\n <span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span>\n </label>\n <div class=\"adf-attach-widget-container\">\n <div id=\"adf-attach-widget-simple-upload\" *ngIf=\"isSimpleUploadButton() && isUploadButtonVisible()\">\n <a mat-raised-button color=\"primary\">\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input #uploadFiles [multiple]=\"multipleOption\" type=\"file\" [id]=\"field.id\" (change)=\"onAttachFileChanged($event)\" />\n </a>\n </div>\n <div class=\"adf-attach-widget__menu-upload\" (focusout)=\"markAsTouched()\" *ngIf=\"isUploadButtonVisible() && isMultipleSourceUpload()\">\n <button mat-raised-button color=\"primary\" [matMenuTriggerFor]=\"menu\" [id]=\"field.id\">\n <mat-icon>attach_file</mat-icon>\n {{ 'FORM.FIELD.UPLOAD' | translate }}\n </button>\n <mat-menu #menu=\"matMenu\" class=\"adf-attach-widget__menu-content\">\n <button mat-menu-item (click)=\"uploadFile.click()\" id=\"attach-local-file\" *ngIf=\"isAllFileSourceSelected()\">\n {{ 'FORM.FIELD.LOCALSTORAGE' | translate }}\n <mat-icon>file_upload</mat-icon>\n <input\n #uploadFile\n class=\"adf-attach-widget__input-type\"\n [multiple]=\"multipleOption\"\n type=\"file\"\n [id]=\"field.id\"\n (change)=\"onAttachFileChanged($event)\"\n />\n </button>\n <button\n mat-menu-item\n *ngIf=\"isDefinedSourceFolder()\"\n id=\"attach-{{ field.params?.fileSource?.name }}\"\n (click)=\"openSelectDialogFromFileSource()\"\n >\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ field.params?.fileSource?.name }}\n </button>\n <div *ngIf=\"!isDefinedSourceFolder()\">\n <button mat-menu-item *ngFor=\"let repo of repositoryList\" id=\"attach-{{ repo?.name }}\" (click)=\"openSelectDialog(repo)\">\n <mat-icon>\n <adf-alfresco-icon />\n </mat-icon>\n {{ repo.name }}\n </button>\n </div>\n </mat-menu>\n </div>\n </div>\n</div>\n\n<div data-automation-id=\"adf-attach-widget-readonly-list\">\n <mat-list *ngIf=\"hasFile\">\n <mat-list-item class=\"adf-attach-files-row\" *ngFor=\"let file of field.value; index as i\">\n <mat-icon matListItemIcon>\n <img class=\"adf-attach-widget__icon\"\n [id]=\"'file-'+file.id+'-icon'\"\n [src]=\"file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)\"\n [alt]=\"mimeTypeIcon\"\n (click)=\"onAttachFileClicked(file)\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [attr.aria-label]=\"file.name\"\n [tabindex]=\"i\"/>\n </mat-icon>\n\n <div matListItemLine class=\"adf-attach-widget__label\">\n <span id=\"{{'file-'+file.id}}\"\n (click)=\"onAttachFileClicked(file)\"\n [title]=\"file.name\"\n (keyup.enter)=\"onAttachFileClicked(file)\"\n [tabindex]=\"i\" class=\"adf-file\">\n {{file.name}}\n </span>\n <button id=\"{{'file-'+file.id+'-option-menu'}}\" mat-icon-button [matMenuTriggerFor]=\"fileActionMenu\"\n [attr.aria-label]=\"'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n <mat-menu #fileActionMenu=\"matMenu\" xPosition=\"before\">\n <button\n id=\"{{ 'file-' + file.id + '-show-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType || (!file.sourceId && (isStartProcessPage || !file.contentAvailable))\"\n mat-menu-item\n (click)=\"onAttachFileClicked(file)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'FORM.FIELD.VIEW_FILE' | translate }}</span>\n </button>\n <button\n id=\"{{ 'file-' + file.id + '-download-file' }}\"\n [disabled]=\"file.isExternal || !file.mimeType\"\n mat-menu-item\n (click)=\"downloadContent(file)\"\n >\n <mat-icon>file_download</mat-icon>\n <span>{{ 'FORM.FIELD.DOWNLOAD_FILE' | translate }}</span>\n </button>\n <button\n *ngIf=\"!field.readOnly\"\n mat-menu-item\n [id]=\"'file-' + file.id + '-remove'\"\n (click)=\"onRemoveAttachFile(file)\"\n (keyup.enter)=\"onRemoveAttachFile(file)\"\n >\n <mat-icon class=\"mat-24\">highlight_off</mat-icon>\n <span>{{ 'FORM.FIELD.REMOVE_FILE' | translate }}</span>\n </button>\n </mat-menu>\n </mat-list-item>\n </mat-list>\n</div>\n\n<error-widget [error]=\"field.validationSummary\" />\n<error-widget *ngIf=\"!field.isValid && isTouched() && !isSelected()\" required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\" />\n", styles: [".adf-attach-widget-container{margin-bottom:15px;display:flex;align-items:center}.adf-attach-widget-container input{cursor:pointer;height:100%;right:0;opacity:0;position:absolute;top:0;width:300px;z-index:4}.adf-attach-widget__input-type{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.adf-attach-widget{width:100%;word-break:break-all;padding:.4375em 0;border-top:.8438em solid transparent}.adf-attach-widget__icon{cursor:pointer}.adf-attach-widget__label{display:flex;align-items:center;cursor:pointer}.adf-attach-widget__label:hover{text-decoration:underline}\n"] }]
5904
5884
  }], ctorParameters: () => [{ type: i1.FormService }, { type: i1.ThumbnailService }, { type: ProcessContentService }, { type: ActivitiContentService }, { type: i1$1.ContentService }, { type: i1$1.ContentNodeDialogService }, { type: i1.AppConfigService }, { type: i1.DownloadService }, { type: i5.Router }, { type: i5.ActivatedRoute }, { type: AttachFileWidgetDialogService }] });
5905
5885
 
5906
5886
  /*!